flag shenannegins

CCalego10/1/2021
TIL you can set the flags key on a document to whatever you want to (e.g. a string). This is a sure fire way to completely ruin someone else's day, or your own day when another module un-does this by setting a flag 'correctly'.

game.actors.getName('A Character').update({
  ['flags']: 'A value'
})

game.actors.getName('A Character').data.flags // 'A value'

game.actors.getName('A Character').setFlag('world', 'someKey', 'some string value')

game.actors.getName('A Character').data.flags // { world: { someKey: 'some string value' }}
CCalego10/1/2021
dnd5e for instance gets big mad when its flags disappear from an actor.
UUUnknown User10/1/2021
Message Not Public
Sign In & Join Server To View
CCalego10/1/2021
It seems that core doesn't care
CCalego10/1/2021
CCalego10/1/2021
this falls squarely under "play stupid games win stupid prizes" lol
CCalego10/1/2021
CCalego10/1/2021
speaking of...
CCalego10/1/2021
I want to try this with items or like data itself, but am too scared
CCalego10/1/2021
omg lol
CCalego10/1/2021
Alright well. TIL update has great power and thus comes with great responsibility.
UUUnknown User10/1/2021
Message Not Public
Sign In & Join Server To View
CCalego10/1/2021
[removed gif]
oo no that looks like it actually hurt
CCalego10/1/2021
no more of that gif thanks
CCalego10/1/2021
much better
UUUnknown User10/1/2021
4 Messages Not Public
Sign In & Join Server To View
CCalego10/1/2021
lol
UUUnknown User10/1/2021
2 Messages Not Public
Sign In & Join Server To View
Aarcanist10/18/2021
Is this a "bug"?
CCalego10/18/2021
I would not categorize it as such.
CCalego10/18/2021
If I got sent a bug with this at work, my reply to it would be "... don't" and I'd WONTFIX it.
Aarcanist10/18/2021
Makes sense, thanks
CCalego10/18/2021
if I couldn't get away with telling them to "just don't" I'd say something like:
The amount of complexity and performance overhead that would be introduced by adding validations to this low-level API do not outweight being able to prevent the edge case described by this issue.
CCalego10/18/2021
😛
UUUnknown User10/18/2021
3 Messages Not Public
Sign In & Join Server To View