1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2025-07-02 08:10:37 +02:00

improved load print patch

From the start my prior PR was aiming at compatibility with legacy clients and servers. If you scan the MT forum you will become aware that there seem to be quite many MT 0.4 servers around which are actively used by many players.

However, the best solution may be this example of a new piece of improved code, if I understand the MT Lua code correctly.

```

-- print to log after mod was loaded successfully
local load_message = "[MOD] XXX loaded"
if minetest.log then
	minetest.log("info", load_message) -- aims at state of the art MT software
else
	print (load_message)  -- aims at legacy MT software used in the field
end

```

Hope this helps.
This commit is contained in:
Zweihorn
2022-12-21 19:20:04 +01:00
parent 68d724176e
commit 04f9123e98
17 changed files with 146 additions and 10 deletions

View File

@ -91,4 +91,12 @@ armor:register_armor(":3d_armor:boots_admin", {
minetest.register_alias("adminboots", "3d_armor:boots_admin")
minetest.register_alias("adminhelmet", "3d_armor:helmet_admin")
minetest.register_alias("adminchestplate", "3d_armor:chestplate_admin")
minetest.register_alias("adminleggings", "3d_armor:leggings_admin")
minetest.register_alias("adminleggings", "3d_armor:leggings_admin")
-- print to log after mod was loaded successfully
local load_message = "[MOD] 3D Armor - Armor Admin loaded"
if minetest.log then
minetest.log("info", load_message) -- aims at state of the art MT software
else
print (load_message) -- aims at legacy MT software used in the field
end