Summary

Hooks

Called after Catwork has loaded all map entities; restores the saved door parents, names and ownability, and the saved open and locked states when doors_save_state is enabled.
Restores the door names, texts and ownability saved for the current map.
Restores the door states saved by cwDoorCmds:SaveDoorStates.
Restores the door parents saved for the current map.
Called just after data is saved; saves the door states when doors_save_state is enabled and at least one player is connected.
Called before halos are drawn; outlines the door parent being edited in orange and its children in cyan.
Saves cwDoorCmds.doorData to the schema data file plugins/doors/<map>.
Saves the position, locked state and open state of every door to the schema data file plugins/doorstates/<map>.
Saves cwDoorCmds.parentData to the schema data file plugins/parents/<map> as door positions.
Sends a player the doors to outline while they set up door parents.

Hooks

cwDoorCmds:ClockworkInitPostEntity()

server gamemodes/catwork/plugins/doorcommands/plugin/sv_hooks.lua:8

Implements hook ClockworkInitPostEntity

Called after Catwork has loaded all map entities; restores the saved door parents, names and ownability, and the saved open and locked states when doors_save_state is enabled.

Restores the door names, texts and ownability saved for the current map.

Reads plugins/doors/<map> from the schema data and matches the saved positions to the map's doors. Entries saved with customName (ownable doors) only get their name back; the others are made unownable with their name and text. The entries are kept in cwDoorCmds.doorData, keyed by door. When the default_doors_hidden config is on, every door without saved data is hidden.

See also

Restores the door states saved by cwDoorCmds:SaveDoorStates.

Doors saved while opening or open are opened, and doors saved locked are locked.

Restores the door parents saved for the current map.

Reads plugins/parents/<map> from the schema data, matches the saved positions to the map's doors, parents each child with cw.entity:SetDoorParent and records it in cwDoorCmds.parentData (child door mapped to parent door). Doors already in parentData are skipped.

See also

Implements hook PostSaveData

Called just after data is saved; saves the door states when doors_save_state is enabled and at least one player is connected.

Called before halos are drawn; outlines the door parent being edited in orange and its children in cyan.

The doors come from the doorParentESP Cable message sent by the door parenting commands.

Saves cwDoorCmds.doorData to the schema data file plugins/doors/<map>.

Each entry keeps the door's position, name, text and customName flag.

Saves the position, locked state and open state of every door to the schema data file plugins/doorstates/<map>.

See also

Saves cwDoorCmds.parentData to the schema data file plugins/parents/<map> as door positions.

cwDoorCmds:SendParentESP(player)

server gamemodes/catwork/plugins/doorcommands/plugin/sv_plugin.lua:113

Sends a player the doors to outline while they set up door parents.

The doorParentESP message holds the player's active parent door under the Parent key, followed by the doors parented to it. It is empty when the player has no active parent door.

Parameters

  • player Player The player setting up door parents

Defined in