#(Behr) :!|:
1 messages · Page 1 of 1 (latest)
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
core
flag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>)
Sets or modifies a flag on any flaggable object.
- flag <player> playstyle:aggressive
- flag <player> just_did_something expire:5m
- flag <npc> location:<npc.location>
- flag <context.damager> damage_dealt:+:<context.damage>
- flag server cool_people:->:<[player]>
... and 5 more.
!lang data actions
Several commands function as a way to modify data values,
including !command flag, !command yaml, and !command define.
These commands each allow for a set of generic data change operations.
These operations can be used with a syntax like "<key>:<action>:<value>"
For example "mykey:+:5" will add 5 to the value at 'mykey'.
The following actions are available:
Actions that take no input value:
Increment: '++': raises the value numerically up by 1. Example: - define x:++
Decrement: '--': lowers the value numerically down by 1. Example: - define x:--
Remove: '!': removes the value entirely. Example: - define x:!
Actions that take an input value:
Add: '+': adds the input value to the value at the key. Example: - define x:+:5
Subtract: '-': subtracts the input value from ...
Useful Lists
it's removed from the data actions, but it's used in the usage examples still
it also does still work in-game after checking
it beats using this, too:
- flag list:!
- flag list:|:<[values]>```
wait but
why not just
- flag list:<[value]>
lol i meant to ping behr but disabled it out of habit
@winged cloak
huh, that did use to force the flag's object type to an element
doesnt seem to anymore, maybe the flag overhaul fixed that?
im pretty sure i remember it being deprecated, so i think the meta's flag command just needs a quick tweak
only if the input is not a list
if it's an object, it stays an object
it won't be an element until you feed a non-object into it
oh no, like, two years ago i remember this being a huge debate with xeane because it definitely didn't work this way before lol
back when i was the one who audited every script that got PR'd into adriftoon
a reference to one time forever ago when it was the case also: #denizen-pre-forum message
tl;dr: user was setting a flag with : data action with the value being a list and the object type was an element so they couldnt use it as a list without .as_list
also damn i was hella repetitive lmao
yeah that was pre flag rewrite
// Added 2021/02/04, deprecate officially by 2024.
// 2022-year-end commonality: #9
public static Warning splitNewDataAction = new FutureWarning("splitNewDataAction", "The 'split to new list' data action ('key:!|:value') is deprecated: this no longer has a purpose, as you can instead just set to the list.");
i'll remove the accidentally left over example in flag command meta
yay
+> YAY!!!