1
0
mirror of https://github.com/pyrollo/display_modpack.git synced 2025-10-15 00:35:20 +02:00
Files
display_modpack/signs_api
whosit 0ec62a1732 Make posters dyeable (#20)
* set signs param2 to colorfacedir

- make signs use a color palette and hardware coloring
- add poster coloring crafting recipes and optional depend on dye

* use xcompat

* optipng textures

* make recipe shapeless

* fix spaces/tab mix

* remove xcompat check
2025-03-31 15:27:16 +02:00
..
2023-07-26 21:03:10 +02:00
2025-03-31 15:27:16 +02: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.

Dependencies: xcompat, 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.