Page Menu
Home
1F616EMO Bugtracker
Search
Configure Global Search
Log In
Files
F265236
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/skin_bugfix/init.lua b/skin_bugfix/init.lua
new file mode 100644
index 0000000..1b13705
--- /dev/null
+++ b/skin_bugfix/init.lua
@@ -0,0 +1,20 @@
+-- twi_mods/skin_bugfix/init.lua
+-- Fix missing textures in player skins
+-- SPDX-License-Identifier: LGPL-3.0-or-later
+
+local expected_length = 5
+
+modlib.minetest.register_globalstep(5, function()
+ for _, player in ipairs(core.get_connected_players()) do
+ local skin = player:get_properties().textures
+
+ if #skin < expected_length then
+ for i = #skin + 1, expected_length do
+ skin[i] = "blank.png"
+ end
+
+ core.log("Fixing missing textures in player skin for player " .. player:get_player_name())
+ player:set_properties({ textures = skin })
+ end
+ end
+end)
diff --git a/skin_bugfix/mod.conf b/skin_bugfix/mod.conf
new file mode 100644
index 0000000..0176f61
--- /dev/null
+++ b/skin_bugfix/mod.conf
@@ -0,0 +1,2 @@
+name = skin_bugfix
+depends = modlib
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Jun 10, 7:13 PM (3 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
48/66/c851a1577c7b77b7c74b0397a397
Default Alt Text
(1 KB)
Attached To
Mode
rTWIMODS Survival Server Custom Modifications
Attached
Detach File
Event Timeline
Log In to Comment