Anyone wanna learn some Lua, make some easy changes to the mods?

@Milan The repo has hud and hudbars, and I tried to fix them a week ago. The /mods list doesn’t even show hud, maybe remove it from repo if not used. I installed hudbars and sprint (had to get player_monoids from https://github.com/minetest-mods/player_monoids because it wasn’t linked in the illuna repo) and they worked fine. Does the server have any changes that aren’t in the repo? Or any other mods that would interact with the hud?

@Milan I also just checked the irc mod and it didn’t duplicate messages. Your fork is a few commits behind but I didn’t have them so they probably won’t help. Do you have any changes that aren’t in the repo?

I am not sure what hud mod you are talking about - yes some mods are in worldmods/ but no important ones in our case:

automappercolors --for mapping
boats --so there is less headache updating minetest_game from upstream
clean --this just cleaned up some horse entities a while ago
external_cmd --so i can run ingame commands from the commandline
farming --same as boats
ghost -- be scared
mapfix 
mini_sun -- *psst*
mobs_fish
mobs_more_animals
mob_ostrich -- we should fix this thing some day
moreblocks_saw_registration --i think this was a user contribution for scifi nodes
mr_goat
munin
remove_unknown
track_players -- be scared
trick_or_treat -- hm. i should add this to the subgame 
vector_extras

however, i’ve added a bunch of them to the subgame, lately as you may have noticed, those are just some less relevant leftovers - almost all, if not all of the mods added as submodules to the game have been updated / received a merge from upstream.

i can reproduce the duplicate messages on my machine with archlinux - i couldn’t set up irc on windows

Is this not what the server is running?

it is, and this is the correct branch of the subgame https://git.tchncs.de/Illuna-Minetest/minetest_game/tree/technicworld

and if ur signing up, i can grant you a bit more access :slight_smile:

There however is hudbars, yes, but no mod called just hud…

What is the correct way to install the subgame? I cloned it with --recurse-submodules into ~/.minetest/games and then changed to the technicworld branch. But a few mods failed because I didn’t enter tchncs.de or github credentials. Many of the mod directories were empty and I was able to checkout/fetch the ones that had .git files but there are still a lot of empty directories.

cd .minetest/games/
git clone --recurse-submodules https://git.tchncs.de/Illuna-Minetest/minetest_game.git
cd minetest_game/mods
git checkout technicworld
rm my_door_wood my_future_doors # ../modpacks/mydoors is empty
for f in *; do (cd $f ; if [ ! -f "init.lua" -a -f ".git" ]; then git checkout -- ; git fetch ; fi); done

But it fails to load with the following error:

2020-03-17 17:38:02: WARNING[Main]: Mod name conflict detected: "bushes"
...
2020-03-17 17:38:02: ERROR[Main]: ModError: Unresolved name conflicts for mods "poisonivy", "bushes_classic", "bushes", "ferns", "molehills", "flowers_plus".

No:

git clone https://git.tchncs.de/Illuna-Minetest/minetest_game -b technicworld --recursive

but you won’t be able to checkout all mods, because some are login-only atm for various reasons (not that i liked to do this). Please create a gitlab account, so i can grant you more access

Created, same name as this forum account.

git config --global credential.helper store should help you, otherwise you’d have to type your credentials many times on clone

(you could also use an ssh key)

I don’t remember the order of hudbars but this fixes it. Armor and health on left and air, hunger, sprint on right.

diff --git a/hudbars/init.lua b/hudbars/init.lua
index 752608a..fa4160f 100644
--- a/hudbars/init.lua
+++ b/hudbars/init.lua
@@ -115,7 +115,7 @@ if sorting ~= nil then
 	end
 else -- swapped health & breath around and added hunger & armor
 	--hb.settings.sorting = { ["breath"] = 0, ["health"] = 1, ["hunger"] = 2, ["armor"] = 3 }
-	hb.settings.sorting = { ["health"] = 0, ["hunger"] = 1, ["armor"] = 2, ["breath"] = 3}
+	hb.settings.sorting = { ["health"] = 0, ["sprint"] = 1, ["armor"] = 2, ["satiation"] = 3, ["breath"] = 5}
 	hb.settings.sorting_reverse = {}-- [0] = "breath", [1] = "health"}
 end

The chat3 mod is causing the duplicate irc messages. The irc mod sends the message once in callback.lua minetest.register_on_chat_message(), and the chat3 mod then sends it once for every player online in init.lua minetest.override_chatcommand(). Which explains why the number of dups varies.

The solution is to move the irc.say for /me out of the player for loop and remove the irc.say for normal messages.

diff --git a/init.lua b/init.lua
index c605278..7a69d9b 100644
--- a/init.lua
+++ b/init.lua
@@ -149,9 +149,6 @@ function chat3.send(name, msg, prefix, source)
 			end
 
 			minetest.chat_send_player(rname, send)
-			if minetest.get_modpath("irc") then
-				irc:say(string.format("<"..name.."> "..msg))
-			end	
 		end
 	end
 
@@ -236,9 +233,9 @@ if minetest.chatcommands["me"] then
 				if not ignore or not chat3.ignore.is(rname, name) then
 					minetest.chat_send_player(rname, "* "..name.." "..param)
 				end
-				if minetest.get_modpath("irc") then
-					irc:say(string.format("* "..name.." "..param))
-				end	
+			end
+			if minetest.get_modpath("irc") then
+				irc.say(string.format("* "..name.." "..param))
 			end
 		end,
 	})
2 Likes

Are you sure about this? The codebase is 8 months old and didn’t cause this issue before…

I don’t know why it is only a problem now, but the code clearly loops over all online players and calls irc.say for each one.

Is areas flak allowed/used? If not, the following will fix the hangglider issue in protections.

diff --git a/init.lua b/init.lua
index b284eba..b995287 100644
--- a/init.lua
+++ b/init.lua
@@ -152,15 +152,15 @@ hangglider.can_fly = function (pname, pos)
 			return (minetest.check_player_privs(pname, {protection_bypass=true}) or wardzones.checkPlayerZoneAccess(pname, zone) or not zone["data"]["no_fly"])
 		end
 	end
-	if areas and minetest.is_protected(vector.round(pos), pname) then
-		if hangglider.flak then
-			for id, area in pairs(areas:getAreasAtPos(pos)) do
-				if area.flak then
-					return false
-				end
-			end
-		end
-	end
+--	if areas and minetest.is_protected(vector.round(pos), pname) then
+--		if hangglider.flak then
+--			for id, area in pairs(areas:getAreasAtPos(pos)) do
+--				if area.flak then
+--					return false
+--				end
+--			end
+--		end
+--	end
 	return true
 end
1 Like

I activated areas_flak in one area for testing only.
I did think about using i maybe for an event. But fixing this issue has priority.

thanks for the chat3 contribution, it’s a super weird situation but the important thing is the fix. for me it seems to be fixed and the patch is ready for restart on the server

1 Like

thank you for the patch, i’ve allowed myself to change the order a little bit, it is ready for restart on the server :+1:

3 Likes

Could breath be changed to 5 (right side) so it isn’t above the similar colored armor bar? And could the sprint color be changed to something other than the same color as hunger bar?

diff --git a/init.lua b/init.lua
index 02c371a..409a2d7 100644
--- a/init.lua
+++ b/init.lua
@@ -16,7 +16,7 @@ SPRINT_TIMEOUT = 0.5 --Only used if SPRINT_METHOD = 0
 
 if minetest.get_modpath("hudbars") ~= nil then
 	hb.register_hudbar("sprint", 0xFFFFFF, "Stamina",
-		{ bar = "sprint_stamina_bar.png", icon = "stamina.png" },
+		{ bar = "sprint_stamina_bar.png", icon = "stamina.png^[multiply:#6F6" },
 		SPRINT_STAMINA, SPRINT_STAMINA,
 		false, "%s: %.1f/%.1f")
 	SPRINT_HUDBARS_USED = true

sprint-bar-color-change

1 Like

knczx told me the chainsaw no longer cut down willow trees after the update. I investigated and found that it doesn’t cut down any ethereal trees, this patch fixes that. However, it might be best if it doesn’t work on mushrooms (3 entries) because it leaves the ring of red mushroom blocks in the sky. Or maybe it could work on the pores and red blocks but not the white blocks (mushroom_trunk), requiring players to pillar up, chainsaw those blocks and then manually cut down the trunk. Or support all three blocks and hope players don’t leave floating rings in the sky, that would automted trees farms to work with mushrooms.

http://borg.qzx.com/files/technic-add-ethereal-support-to-chainsaw.patch

Could breath be changed to 5 (right side) so it isn’t above the similar colored armor bar? And could the sprint color be changed to something other than the same color as hunger bar?

Yea i think this request is legit, it actually was green in the beginning, which went missing at some point and was never investigated.
Thanks, will include this asap.

2 Likes

the chainsaw patch has been applied for now as is

1 Like