From eb1659619f04b227b5cbcca96a334c37c5c7e34e Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Tue, 4 Jul 2023 09:34:56 -0700 Subject: [PATCH] Start work on rules rework --- init.lua | 30 +++++++++++++++++++++++++++++- mod.conf | 1 + translations/rules_en.md | 23 +++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 translations/rules_en.md diff --git a/init.lua b/init.lua index 927bf90..5b4f55f 100644 --- a/init.lua +++ b/init.lua @@ -43,12 +43,40 @@ for i = 1, #items do end rules.txt = table.concat(items, ",") +local colors = { + background_color = "#FFF0", + font_color = "#FFF", + heading_1_color = "#AFF", + heading_2_color = "#FAA", + heading_3_color = "#AAF", + heading_4_color = "#FFA", + heading_5_color = "#AFF", + heading_6_color = "#FAF", + heading_1_size = "26", + heading_2_size = "24", + heading_3_size = "22", + heading_4_size = "20", + heading_5_size = "18", + heading_6_size = "16", + code_block_mono_color = "#6F6", + code_block_font_size = 14, + mono_color = "#6F6", + block_quote_color = "#FFA", +} + if minetest.global_exists("sfinv") then sfinv.register_page("rules:rules", { title = "Rules", get = function(self, player, context) return sfinv.make_formspec(player, context, - "textlist[0,0;7.85,8.5;help;" .. rules.txt .. "]", false) + md2f.md2ff( + 0.2, 0.8, 8.3, 10, + minetest.get_modpath("rules").."/translations/rules_en.md", + "rules_en", + colors + ), + false + ) end }) end diff --git a/mod.conf b/mod.conf index 5af7729..602f3de 100644 --- a/mod.conf +++ b/mod.conf @@ -1,2 +1,3 @@ name = rules +depends = markdown2formspec optional_depends = sfinv diff --git a/translations/rules_en.md b/translations/rules_en.md new file mode 100644 index 0000000..dc5daf6 --- /dev/null +++ b/translations/rules_en.md @@ -0,0 +1,23 @@ +### By playing on this server you agree to these rules: +1. No swearing, dating, or other inappropriate behaviour. +2. No spamming, using all-caps, or any other method of chat abuse. +3. Don't be a cheater. No hacked clients. +4. Spawnkilling is considered excessive and thus forbidden if it doesn't contribute to the goal of the game in a proper way. Consequently, spawnkilling can already be punished if only two kills are made, depending on the situation. +5. Don't be a traitor, don't dig blocks in your base to make it less secure or to trap team mates, and don't help the other team win. +6. Don't leave the game whilst in a fight +7. Don't impersonate other community members +8. Do not share your password with ANYONE. +9. Avoid controversial topics like politics/religion +10. Moderator decisions are final. + +Failure to follow these rules may result in a kick or ban (temp or permanent) depending on severity. + +Created by rubenwardy. Developed by LandarVargan. +Moderators: Thomas-S, IceAgeComing, Waterbug, DragonsVolcanoDance, Shara, Calinou, Aurika, LandarVargan, Xenon, Jhalman, Kat, _Lucy + +Though the server owner will not actively read private messages/mails or disclose their content outside the mod team, random checks will be done to make sure they are not being abused and they will be reviewed if abuse or inappropriate behaviour is suspected. + +Use `/report` to send a message to a moderator. +For example: +- `/report bobgreen is destroying our base` +`/report` can also be used for giving feedback/suggestions to the game