1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-30 13:50:23 +02:00

Create API for registration of fence gate.

This commit is contained in:
Rui914
2016-03-18 16:33:14 +09:00
committed by paramat
parent d90a081722
commit a2ecc51fbc
2 changed files with 104 additions and 48 deletions

View File

@ -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.