Releases: KallynGowdy/casualos
Releases · KallynGowdy/casualos
v0.11.16
Changes:
- Breaking Changes
- Renamed
onBotDrag
andonBotDrop
toonDrag
andonDrop
respectively. - Renamed
onMod
toonModDrop
. - Removed
onCombine
,onCombineEnter
, andonCombineExit
. - Dropping a mod in an empty space will no longer create a new bot.
- Setting
auxPositioningMode
toabsolute
will no longer prevent mods. - Changed
applyMod()
andsubtractMods()
to not sendonMod()
events. - Renamed the
diffs
property on theonModDrop
argument tomod
.
- Renamed
- Improvements
- Added
onModDropEnter
andonModDropExit
listeners for when a mod is dragged onto or off of a bot.- The bot that the mod will be applied to recieves the
onModDropEnter
andonModDropExit
events.
- The bot that the mod will be applied to recieves the
- If a custom
onModDrop
listener is provided, then the mod will not be applied. It is up to theonModDrop
listener to apply the mod viaapplyMod(this, that.mod)
. - Added
onDropEnter
andonDropExit
listeners for when a bot is dragged onto or off of another bot.- Both the bot that is being dragged and the bot that they are on top of will recieve the
onDropEnter
andonDropExit
events. - Note that
onDropEnter
andonDropExit
events will fire even if one of the bots is not stackable. - They have the following parameters:
draggedBot
- the bot that is being dragged.otherBot
- the bot that the dragged bot is on top of.context
- the context that this is happening in.
- Both the bot that is being dragged and the bot that they are on top of will recieve the
- Improved
onDrop
to be sent to both the dragged bot and the bot that it is dropped on top of.- The event will fire on the other bot even if it has
auxPositioningMode
set toabsolute
.
- The event will fire on the other bot even if it has
- Added the
player.setClipboard()
function that is able to set the user's clipboard to the given text.- ex.
player.setClipboard("abc")
will set the user's clipboard to "abc". - On Chrome and Firefox, the text will be copied directly to the user's clipboard.
- On Safari and all iOS browsers, a popup will be triggered with a copy button allowing the user to copy the text to their clipboard.
- ex.
- Tags that contain listeners will now display with a @ symbol in front of the tag name.
- Tags that contain formulas will now display with a = sign after the tag name.
- Removed the @ symbol from the first line in the code editor when editing a script.
- Added the ability to use an @ symbol while creating a new tag to prefill the editor with an @.
- Added the ability to use @ symbols in tags in
getTag()
,setTag()
,getBot()
,getBots()
,byTag()
,shout()
, andwhisper()
. - Added tag filters for listener tags and formula tags to the bot table.
- Added the ability to detect the
tags
variable in scripts as a reference to tags.- This is useful for knowing when to update a formula.
- Also works with the
raw
variable. - Limitations:
- Does not detect references via the
bot
orthis
variables. (e.g.bot.tags.abc
) - Does not detect references via other bots. (e.g.
otherBot.tags.abc
) - Does not detect references if a function is called on the tag. (e.g.
tags.name.toString()
)
- Does not detect references via the
- If you need to work around the limitations, use the
getTag()
function.
- Added
v0.11.13
test