Create API for registration of fence gate.
This commit is contained in:
parent
d90a081722
commit
a2ecc51fbc
2 changed files with 104 additions and 48 deletions
14
game_api.txt
14
game_api.txt
|
@ -78,6 +78,12 @@ The doors mod allows modders to register custom doors and trapdoors.
|
|||
* `name` Name for trapdoor
|
||||
* `def` See [#Trapdoor definition]
|
||||
|
||||
`doors.register_fencegate(name, def)`
|
||||
|
||||
* Registers new fence gate
|
||||
* `name` Name for fence gate
|
||||
* `def` See [#Fence gate definition]
|
||||
|
||||
`doors.get(pos)`
|
||||
|
||||
* `pos` A position as a table, e.g `{x = 1, y = 1, z = 1}`
|
||||
|
@ -119,6 +125,14 @@ The doors mod allows modders to register custom doors and trapdoors.
|
|||
sound_close = sound play for close door, -- optional
|
||||
protected = false, -- If true, only placer can open the door (locked for others)
|
||||
|
||||
###Fence gate definition
|
||||
|
||||
description = "Wooden Fence Gate",
|
||||
texture = "default_wood.png",
|
||||
material = "default:wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(), -- optional
|
||||
|
||||
Fence API
|
||||
---------
|
||||
Allows creation of new fences with "fencelike" drawtype.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue