1
0
mirror of https://github.com/pyrollo/display_modpack.git synced 2024-11-13 22:00:31 +01:00
display_modpack/signs_api
Pierre-Yves Rollo d2c7abd98b Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057'
git-subtree-dir: signs_api
git-subtree-mainline: ebadeb20d9
git-subtree-split: b837f9d38c
2019-12-31 17:07:27 +01:00
..
locale Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057' 2019-12-31 17:07:27 +01:00
tools Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057' 2019-12-31 17:07:27 +01:00
copyright.txt Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057' 2019-12-31 17:07:27 +01:00
depends.txt Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057' 2019-12-31 17:07:27 +01:00
init.lua Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057' 2019-12-31 17:07:27 +01:00
intllib.lua Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057' 2019-12-31 17:07:27 +01:00
LICENSE.txt Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057' 2019-12-31 17:07:27 +01:00
mod.conf Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057' 2019-12-31 17:07:27 +01:00
README.md Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057' 2019-12-31 17:07:27 +01:00

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