aboutsummaryrefslogtreecommitdiff
path: root/signs_api/README.md
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-12-03 23:17:35 +0100
committerorwell96 <orwell@bleipb.de>2018-12-03 23:17:35 +0100
commit8928f78ee6305e29ed8d3b9395fcb6564c984fdf (patch)
treecd250c2b98d7131158e3744efe238780cec73fec /signs_api/README.md
parenteccdad46ef2b38cd061aab7ae6bcb252a67c2218 (diff)
parenta3e0d36a68247cac40349d9089fe3c71546d75e8 (diff)
downloaddisplay_modpack-8928f78ee6305e29ed8d3b9395fcb6564c984fdf.tar.gz
display_modpack-8928f78ee6305e29ed8d3b9395fcb6564c984fdf.tar.bz2
display_modpack-8928f78ee6305e29ed8d3b9395fcb6564c984fdf.zip
Merge remote-tracking branch 'upstream/master'HEADmaster
Resolved conflicts by reordering of files
Diffstat (limited to 'signs_api/README.md')
-rw-r--r--signs_api/README.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/signs_api/README.md b/signs_api/README.md
new file mode 100644
index 0000000..99ff20a
--- /dev/null
+++ b/signs_api/README.md
@@ -0,0 +1,29 @@
+# Signs API
+
+This mod provides various helper functions for registereing signs with text display. Text is locked if area is protected.
+No actual signs get registered by this mod, the signs are defined in the sign submod.
+
+For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums.
+
+**Dependancies**: default, display\_lib, font\_lib
+
+**License**: Code under LGPL, Textures and models under CC-BY-SA
+
+## API Functions
+### `signs_api.set_display_text(pos, text)`
+Sets the text of a sign. Usually called in `on_receive_fields`.
+
+### `signs_api.set_formspec(pos)`
+Usually called in `on_construct` to set the formspec.
+
+### `signs_api.on_receive_fields(pos, formname, fields, player)`
+Helper function for `on_receive_fields`. Sets the display text and checks for protection.
+
+### `signs_api.on_place_direction(itemstack, placer, pointed_thing)`
+On place callback for direction signs (chooses which sign according to look direction).
+
+### `signs_api.on_rotate(pos, node, player, mode, new_param2)`
+Handles screwdriver rotation. Direction is affected for direction signs.
+
+### `signs_api.register_sign(mod, name, model)`
+A method to quickly register signs.