Registers the door properties that come with the Doors plugin ('name', 'title_type', 'skin', 'bodygroups', 'locked', 'ownable' and 'price') and the 'center' title type.
Summary
Functions
Doors:get_status_text) in a smaller font below it.Functions
Creates the text row for the name of the door in the door menu.
Parameters
- _entity Entity the door
- panel Panel the fl_door_menu panel
Returns
- Panel the created property row
Creates the combo box row with all registered title types in the door menu.
Parameters
- _entity Entity the door
- panel Panel the fl_door_menu panel
Returns
- Panel the created property row
Creates the checkbox row for the lock state of the door in the door menu.
Parameters
- _entity Entity the door
- panel Panel the fl_door_menu panel
Returns
- Panel the created property row
Creates the checkbox row that makes the door ownable in the door menu.
Parameters
- _entity Entity the door
- panel Panel the fl_door_menu panel
Returns
- Panel the created property row
Creates the text row for the price of the door in the door menu.
Parameters
- _entity Entity the door
- panel Panel the fl_door_menu panel
Returns
- Panel the created property row
Draws the name of the door on a background box with white bars above and below it,
a quarter of the door's height away from the center of the door, and the status of the
door (see Doors:get_status_text) in a smaller font below it. A door without a name
only gets its status drawn, and nothing is drawn if it has no status either.
Parameters
- entity Entity the door
- _w Number width of the door face in drawing units
- h Number height of the door face in drawing units
- alpha Number opacity that fades with distance, up to 255
Returns the name of the door.
Parameters
- entity Entity the door
Returns
- String the name, or an empty string if the door has no name
Returns the id of the title type of the door.
Parameters
- entity Entity the door
Returns
- String the title type id, or nil if it has never been set
Returns the skin of the door.
Parameters
- entity Entity the door
Returns
- Number the skin index
Returns the bodygroups of the door.
Parameters
- entity Entity the door
Returns
- List the value of every bodygroup of the door, the first entry being that of bodygroup 0
Returns whether the door is locked. Reads the networked value on the client and the internal state of the door on the server.
Parameters
- entity Entity the door
Returns
- Boolean
Returns whether the door can be owned.
Parameters
- entity Entity the door
Returns
- Boolean
Returns the price that staff have set for the door.
Parameters
- entity Entity the door
Returns
- Number the price; if the door has none, an empty string on the client and nil on the server
Sets the networked name of the door.
Parameters
- entity Entity the door
- data String the name
Sets the networked title type of the door.
Parameters
- entity Entity the door
- data String title type id, an empty string to disable the title
Sets the skin of the door.
Parameters
- entity Entity the door
- data Number the skin index
Sets the bodygroups of the door with Entity:SetBodygroup.
Parameters
- entity Entity the door
- data List the bodygroups that were saved by get_save_data; entries that are not numbers are skipped
Locks or unlocks the door and networks its new state. Serverside only.
Parameters
- entity Entity the door
- data Boolean true to lock the door; other values are converted with tobool
Makes the door, and the doors linked with it, ownable or not. The owner of a door that stops being ownable loses it. Serverside only.
Parameters
- entity Entity the door
- data Boolean true to let characters own the door; other values are converted with tobool
Sets the price of the door and of the doors linked with it. Serverside only.
Parameters
- entity Entity the door
- data Number/String the price; anything that is not a number makes the door cost what the door_price config says