Skip to content
This repository was archived by the owner on Jul 25, 2021. It is now read-only.
This repository was archived by the owner on Jul 25, 2021. It is now read-only.

Patch Notes v12.2.2 #15

@omniraptorr

Description

@omniraptorr

new events

  • filterObjectEnterContainer(container, object) - Global version of object.filterObjectEnter
  • onPlayerChangeTeam(player, team) - Called when a player changes team.
  • onObjectHover(player, object) & object.onHover(player) - Called when a player moves their pointer over an object.
  • onObjectNumberTyped(object, number) & object.onNumberTyped(number) - Called when a player types a number on an object. Uses new property object.max_typed_number
  • onObjectStateChange(object, old_guid) & object.onStateChange(old_guid) - Called when an object changes state, after it is in its new state.
  • onObjectCollisionEnter(object, collision_info), onObjectCollisionStay(object, collision_info), onObjectCollisionExit(object, collision_info) - Called when an object collides with another. Objects must be registered with the collision handler before they will trigger these events.

lots of new functions and variables:

  • player.setUITheme(theme_script) - Sets the player's UI theme.
  • object.addContextMenuItem(label, function, keep_open = false) - Adds a right-click context menu to the object.
  • object.clearContextMenu() - Clears all items added by above.
  • addContextMenuItem(label, function, keep_open = false, require_table = false) - Same as above, but global (when user right-clicks empty space, or the table).
  • clearContextMenu() - Clears all items added by above.
  • addHotkey(label, method_name, trigger_on_key_up = false) - Add a bindable control. User may assign a key to it in Options->Game Keys.
  • showHotkeyConfig() - Shows the config window described above.
  • clearHotkeys() - Remove all controls created by above.
  • 'container.remainder' - After using container.takeObject, if there is only one object left in the container (which means the container will be destoyed in the next frame) then this will be set to that last remaining object.
  • object.getGMNotes() & object.setGMNotes(notes) - For new GM notes feature.
  • object.registerCollisions(include_stay_events = false), object.unregisterCollisions() - Objects must be registered in order to trigger the global collision handler events detailed above. Sway events are particularly expensive, so only set that parameter to true if you absolutely require it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions