flag shenannegins
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'.
21 Replies
dnd5e for instance gets big mad when its flags disappear from an actor.
Unknown Userā¢4y ago
Message Not Public
Sign In & Join Server To View
It seems that core doesn't care
this falls squarely under "play stupid games win stupid prizes" lol
speaking of...
I want to try this with
items
or like data
itself, but am too scaredomg lol
Alright well. TIL
update
has great power and thus comes with great responsibility.Unknown Userā¢4y ago
Message Not Public
Sign In & Join Server To View
[removed gif]
oo no that looks like it actually hurt
no more of that gif thanks
much better
Unknown Userā¢4y ago
Message Not Public
Sign In & Join Server To View
lol
I feel like this is a prime example of Javascript loose casting LOL
and the unfortunate effects
Is this a "bug"?
I would not categorize it as such.
If I got sent a bug with this at work, my reply to it would be "... don't" and I'd WONTFIX it.
Makes sense, thanks
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.š
in all fairness setFlag isn't that low level.
but yes the edge case is small and the validation is probably a WONTFIX
it's a pretty expected result of Javascript casting imo