diff options
author | Pierre-Yves Rollo <dev@pyrollo.com> | 2019-12-31 17:07:27 +0100 |
---|---|---|
committer | Pierre-Yves Rollo <dev@pyrollo.com> | 2019-12-31 17:07:27 +0100 |
commit | d2c7abd98b33007f5fd21558147b4c3f60cec69b (patch) | |
tree | 9d27c4d95ac267fca26c5484a8b09a47b7252b1e /signs_api/README.md | |
parent | ebadeb20d9e35343981485db90cb99aa0c8b93c7 (diff) | |
parent | b837f9d38c3a81dc49c3c1234dbea0d34628b057 (diff) | |
download | display_modpack_no_craft-d2c7abd98b33007f5fd21558147b4c3f60cec69b.tar.gz display_modpack_no_craft-d2c7abd98b33007f5fd21558147b4c3f60cec69b.zip |
Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057'
git-subtree-dir: signs_api
git-subtree-mainline: ebadeb20d9e35343981485db90cb99aa0c8b93c7
git-subtree-split: b837f9d38c3a81dc49c3c1234dbea0d34628b057
Diffstat (limited to 'signs_api/README.md')
-rw-r--r-- | signs_api/README.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/signs_api/README.md b/signs_api/README.md new file mode 100644 index 0000000..38e8d96 --- /dev/null +++ b/signs_api/README.md @@ -0,0 +1,33 @@ +# 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. + +## Changelog +### 2019-03-14 +- __sign_api__: Screwdriver behavior changed. Now, left click rotates and changes direction. |