[Mod] Write Sign [write_sign]

Post Reply
User avatar
mnh48
Member
Posts: 310
Joined: Wed Nov 16, 2016 22:55
GitHub: mnh48
IRC: MNH48
In-game: mnh48
Location: Kuala Lumpur, Malaysia
Contact:

[Mod] Write Sign [write_sign]

by mnh48 » Post

Write Sign mod

This is an extension mod of WorldEdit for Minetest, so you need WorldEdit mod to use this mod.

Image

This mod adds new handy WorldEdit command that enables writing to supported signs. Without this mod, it is already possible to write into signs with the //luatransform command but that command requires admin privilege and server owner might not want to allow full access to it just for writing signs. This mod still needs worldedit privileges just like normal WorldEdit command, so only very trusted players could use it on servers.


Use cases:

This mod could be used in two situations:
  1. When you want to set multiple signs in the region with the same text.
  2. When the signs formspec could not accept certain characters due to Minetest formspec / Minetest built / Minetest running environment limitations but the characters could be written in chat.

Usage:
  1. Select the area where the signs are situated using WorldEdit. (Don't worry for non-signs node, they will not be affected with the command even if they're in the area).
  2. Run the command //writesign <text_string> where text_string is the text to be written to the signs.
  3. Alternatively, you can use the short commands //ws <text_string>.
Note: You can put \n for new lines directly in the text_string, new lines are ignored for signs that only accepts one line and replaced with spaces. You can also use the colour notations for signs_lib, but they will appear literal for display_modpacks signs.


Supported signs:
Spoiler
  1. default (in minetest_game)
    1. default:sign_wall_wood
    2. default:sign_wall_steel
  2. signs_lib
    1. signs:sign_yard
    2. signs:sign_hanging
    3. signs:sign_wall_green
    4. signs:sign_wall_yellow
    5. signs:sign_wall_red
    6. signs:sign_wall_white_red
    7. signs:sign_wall_white_black
    8. signs:sign_wall_orange
    9. signs:sign_wall_blue
    10. signs:sign_wall_brown
    11. locked_sign:sign_wall_locked
  3. display_modpack
    1. signs:paper_poster
    2. signs:wooden_right_sign
    3. signs:wooden_left_sign
    4. signs_road:large_street_sign
    5. signs_road:blue_street_sign
    6. signs_road:green_street_sign
    7. signs_road:green_left_sign
    8. signs_road:green_right_sign
    9. signs_road:white_street_sign
    10. signs_road:white_left_sign
    11. signs_road:white_right_sign
    12. signs_road:red_street_sign
    13. signs_road:black_left_sign
    14. signs_road:black_right_sign
    15. signs_road:yellow_left_sign
    16. signs_road:yellow_right_sign
    17. signs_road:yellow_street_sign
    18. steles:stone_stele
    19. steles:sandstone_stele
    20. steles:desert_stone_stele
    21. boards:black_board
    22. boards:green_board
Note that poster from display_modpack will now display only the first line as the title (instead of merging everything into the title), but the whole text is still saved into the poster content itself, so it will work as intended.

Download:

For rolling releases: https://github.com/MuhdNurHidayat/write ... master.zip
For latest releases: https://github.com/MuhdNurHidayat/write ... ses/latest
For browsing the code: https://github.com/MuhdNurHidayat/write_sign
For mirror of the code: https://gitlab.com/MuhdNurHidayat/write_sign


License:

GNU AGPL v3
Basically, this means everyone is free to use, modify, and distribute the mod, as long as modifications are also licensed the same way. Most importantly, the Affero variant of the GPL requires you to publish your modifications in source form, even if the mod is run only on the server, and not distributed.

It's released the same as the original WorldEdit license because this mod contains modification of their code.


Dependencies:
  1. minetest_game/default
  2. worldedit
  3. (optional) signs_lib
  4. (optional) display_modpack

Compatibility:

This mod is coded and tested on Minetest version 0.4.17.1 and therefore supported Minetest version 0.4.17.1, however it might still work for older Minetest versions as long as it's not below 0.4.8, and might also work on newer Minetest versions. I don't provide support of this mod for other Minetest versions.


Releases Changelog:

Date and time is in UTC+8.
  • v1.2 (27 August 2018, 9:27PM) - Bugfix, changed behaviour for Poster
  • v1.1 (26 August 2018, 2:49PM) - Emergency Patch (fixed one sign missed from list: signs_road:yellow_street_sign)
  • v1.0 (25 August 2018, 6:02PM) - Initial release

Issues:

If you have any issue, please reply this topic or open an issue on GitHub.

.
Attachments
Screenshot
Screenshot
screenshot_20180825_153334.png (211.98 KiB) Viewed 754 times
Last edited by mnh48 on Mon Aug 27, 2018 13:32, edited 2 times in total.

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Re: [Mod] Write Sign [write_sign]

by gpcf » Post

Seems cool!

User avatar
mnh48
Member
Posts: 310
Joined: Wed Nov 16, 2016 22:55
GitHub: mnh48
IRC: MNH48
In-game: mnh48
Location: Kuala Lumpur, Malaysia
Contact:

Re: [Mod] Write Sign [write_sign]

by mnh48 » Post

I missed one sign (signs_road:yellow_street_sign) from the mod.
I've patched it to support the missed sign in latest commit and released v1.1
I've also updated the first post accordingly, and put long list into spoilers to save space of the post.

User avatar
mnh48
Member
Posts: 310
Joined: Wed Nov 16, 2016 22:55
GitHub: mnh48
IRC: MNH48
In-game: mnh48
Location: Kuala Lumpur, Malaysia
Contact:

Re: [Mod] Write Sign [write_sign]

by mnh48 » Post

New minor version released, v1.2

Bugfix, changed behaviour for Poster
  • The mod should not crashed when `worldedit_shortcommands` is not enabled now.
  • The alias `//ws` is only registered if `worldedit_shortcommands` is enabled (some server owner don't want short commands).
  • Poster from `display_modpack` now takes first line as the title of poster (instead of merging everything into the title).
  • Poster from `display_modpack` will save "Press the Edit button." in the poster content if only one line is given, that one line itself will be saved as the title.

Post Reply

Who is online

Users browsing this forum: No registered users and 65 guests