~jadedctrl/gem-xwx-moe

Showing details for patch 6f2351686e77ca7e535a4da3961b2135118db9e9.
2024-08-01 (Thu), 6:54 PM - - 6f2351686e77ca7e535a4da3961b2135118db9e9

Agordi «Plibelajn citilojn» en `message_bubbles`

Summary of changes
1 files added
  • gemujo_ludo/flikaĵoj/message_bubbles/0001-Allow-a-custom-message-suffix.patch
2 files modified with 13 lines added and 2 lines removed
  • gemujo_ludo/minetest.publike.conf with 3 added and 0 removed lines
  • gemujo_ludo/pretigi.sh with 10 added and 2 removed lines
diff -rN -u "old-gem-xwx-moe/gemujo_ludo/flika\304\265oj/message_bubbles/0001-Allow-a-custom-message-suffix.patch" "new-gem-xwx-moe/gemujo_ludo/flika\304\265oj/message_bubbles/0001-Allow-a-custom-message-suffix.patch"
--- "old-gem-xwx-moe/gemujo_ludo/flika\304\265oj/message_bubbles/0001-Allow-a-custom-message-suffix.patch"	1970-01-01 00:00:00.000000000 +0000
+++ "new-gem-xwx-moe/gemujo_ludo/flika\304\265oj/message_bubbles/0001-Allow-a-custom-message-suffix.patch"	2024-11-24 00:16:29.728058944 +0000
@@ -0,0 +1,50 @@
+From e85ad205f1041e18639a9310ccdeb3beedf7dbc6 Mon Sep 17 00:00:00 2001
+From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com>
+Date: Thu, 1 Aug 2024 13:51:26 -0500
+Subject: [PATCH] Allow a custom message-suffix
+
+Via the message_bubles_suffix setting.
+---
+ init.lua | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/init.lua b/init.lua
+index 30ace03..e4acf29 100644
+--- a/init.lua
++++ b/init.lua
+@@ -5,6 +5,7 @@ local MSG_BUBBLE_LIFETIME = tonumber(settings:get("message_bubbles_lifetime")) o
+ local MAX_CHARS_PER_LINE = tonumber(settings:get("message_bubbles_char_limit")) or 40
+ local MAX_NUM_LINES = tonumber(settings:get("message_bubbles_max_num_lines")) or 1
+ local MSG_BUBBLE_PREFIX = settings:get("message_bubbles_prefix") or "Says: "
++local MSG_BUBBLE_SUFFIX = settings:get("message_bubbles_suffix") or ""
+ 
+ local cumulativeTime = 0
+ 
+@@ -30,7 +31,7 @@ local function trim(msg)
+   local line = ""
+   while currLine <= MAX_NUM_LINES do
+     local adjMaxChPerLine = MAX_CHARS_PER_LINE
+-    if currLine == 1 then adjMaxChPerLine = MAX_CHARS_PER_LINE - string.len(MSG_BUBBLE_PREFIX) end
++    if currLine == 1 then adjMaxChPerLine = MAX_CHARS_PER_LINE - string.len(MSG_BUBBLE_PREFIX) - string.len(MSG_BUBBLE_SUFFIX) end
+     local space = ""
+     if string.len(line) > 0 then space = " " end
+     local tmp = line..space
+@@ -64,7 +65,7 @@ minetest.register_on_chat_message(function(name, origMessage)
+   if minetest.get_player_privs(name).shout then
+     local player = minetest.get_player_by_name(name)
+     if not player then return end
+-    local msg = "\n"..MSG_BUBBLE_PREFIX..trim(origMessage)
++    local msg = "\n"..MSG_BUBBLE_PREFIX..trim(origMessage)..MSG_BUBBLE_SUFFIX
+     msg = removeEscape(msg)
+     local nametag = player:get_nametag_attributes()
+     local nametagText = nametag.text
+@@ -120,4 +121,4 @@ minetest.register_globalstep(function(dtime)
+       end
+     end
+   end
+-end)
+\ No newline at end of file
++end)
+-- 
+2.45.2
+
diff -rN -u old-gem-xwx-moe/gemujo_ludo/minetest.publike.conf new-gem-xwx-moe/gemujo_ludo/minetest.publike.conf
--- old-gem-xwx-moe/gemujo_ludo/minetest.publike.conf	2024-11-24 00:16:29.728058944 +0000
+++ new-gem-xwx-moe/gemujo_ludo/minetest.publike.conf	2024-11-24 00:16:29.728058944 +0000
@@ -4,3 +4,6 @@
 everness_feature_skybox = false
 i4_inventory_size = 32
 i4_progressive_mode = true
+message_bubbles_prefix = «
+message_bubbles_suffix = »
+message_bubbles_max_num_lines = 3
diff -rN -u old-gem-xwx-moe/gemujo_ludo/pretigi.sh new-gem-xwx-moe/gemujo_ludo/pretigi.sh
--- old-gem-xwx-moe/gemujo_ludo/pretigi.sh	2024-11-24 00:16:29.728058944 +0000
+++ new-gem-xwx-moe/gemujo_ludo/pretigi.sh	2024-11-24 00:16:29.728058944 +0000
@@ -143,6 +143,14 @@
 		touch mods/fasado/public_death_messages/.flikita
 	fi
 
+	if test ! -f mods/fasado/message_bubbles/.flikita; then
+		echo "Flikas message_bubbles…" 1>&2
+		cd mods/fasado/message_bubbles/
+		git apply ../../../flikaĵoj/message_bubbles/*.patch
+		cd ../../../
+		touch mods/fasado/message_bubbles/.flikita
+	fi
+
 	if test ! -f mods/bestoj/mobs_redo/.flikita; then
 		echo "Flikas mobs_redo…" 1>&2
 		cd mods/bestoj/mobs_redo/
@@ -151,7 +159,7 @@
 		touch mods/bestoj/mobs_redo/.flikita
 	fi
 
-	if test -d mods/servilo/ -a ! -f mods/servilo/irc/.flikita; then
+	if test -n "$SERVILE" -a ! -f mods/servilo/irc/.flikita; then
 		echo "Flikas irc…" 1>&2
 		cd mods/servilo/irc/irc/
 		git apply ../../../../flikaĵoj/lua-irc/*.patch
@@ -159,7 +167,7 @@
 		touch mods/servilo/irc/.flikita
 	fi
 
-	if test -d mods/servilo/ -a ! -f mods/servilo/bonvenon/.flikita; then
+	if test -n "$SERVILE" -a ! -f mods/servilo/bonvenon/.flikita; then
 		echo "Flikas bonvenon…" 1>&2
 		cp flikaĵoj/bonvenon/*.txt mods/servilo/bonvenon/
 		cd mods/servilo/bonvenon