1.5 KiB
1.5 KiB
API documentation of rp_door
The API allows you to register doors.
Function reference
door.register_door(name, def)
Registers a door. This will register multiple 'technical' nodes, one for the
top, the other for the bottom door segment, also each in 'open' and
'closed' state. These nodes are not supposed to be gotten by the player.
Also adds a craftitem (with identifier name
) which the players can use.
name
: Door identifier / itemstringdef
: Door definition. This is a table with these fields:description
: Same as in node definitioninventory_image
: Same as in node definitiongroups
: List of groups for door item. It is recommended to always adddoor=1
heretiles_top
: Table of textures for the top door node. The first field is the front/back, the second field is top/bottom/sidetiles_bottom
: Same astiles_top
, except for the bottom door nodesounds
: Node sounds. Same as of node definitionsunlight
: If true, will setsunlight_propagates
of door nodes to truesound_close_door
: Sound to play when door closes (optional, has a default sound)sound_open_door
: Sound to play when door opens (optional, has a default sound)node_box_top
: Custom node box table for top door segment (optional)node_box_bottom
: Custom node box table for bottom door segment (optional)selection_box_top
: Custom selection box table for top door segment (optional)selection_box_bottom
: Custom selection box table for bottom door segment (optional)