Remove unified_skins and wieldview mods to fix armor render problems

This commit is contained in:
Wuzzy 2017-03-30 05:24:26 +02:00
parent 9c288ef2aa
commit 4e20797f68
10 changed files with 0 additions and 9327 deletions

View file

@ -1,7 +0,0 @@
A 3d character model re-texturing api used as the framework for this modpack.
depends: default
Compatible with player skins mod [skins] by Zeg9 and Player Textures [player_textures] by sdzen.
Note: Currently only 64x32px player skins.

View file

@ -1 +0,0 @@
mcl_core

View file

@ -1,47 +0,0 @@
uniskins = {
skin = {},
armor = {},
wielditem = {},
default_skin = "character.png",
default_texture = "uniskins_trans.png",
}
uniskins.update_player_visuals = function(self, player)
if not player then
return
end
local name = player:get_player_name()
player:set_properties({
visual = "mesh",
mesh = "uniskins_character.x",
textures = {
self.skin[name],
self.armor[name],
self.wielditem[name]
},
visual_size = {x=1, y=1},
})
end
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
uniskins.skin[name] = uniskins.default_skin
uniskins.armor[name] = uniskins.default_texture
uniskins.wielditem[name] = uniskins.default_texture
if minetest.get_modpath("player_textures") then
local filename = minetest.get_modpath("player_textures").."/textures/player_"..name
local f = io.open(filename..".png")
if f then
f:close()
uniskins.skin[name] = "player_"..name..".png"
end
end
if minetest.get_modpath("skins") then
local skin = skins.skins[name]
if skin and skins.get_type(skin) == skins.type.MODEL then
uniskins.skin[name] = skin..".png"
end
end
end)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 B

View file

@ -1,17 +0,0 @@
[mod] visible wielded items [wieldview]
=======================================
depends: default, unified_skins
Makes hand wielded items visible to other players. Compatible with player skins mod [skins].
Note: Currently only supports 16x16px texture packs, sorry!
default settings: [minetest.conf]
# Set number of seconds between visible wielded item updates.
wieldview_update_time = 2
# Show nodes as tiles, disabled by default
wieldview_node_tiles = false

View file

@ -1,2 +0,0 @@
mcl_core
unified_skins

View file

@ -1,73 +0,0 @@
local time = 0
local update_time = tonumber(minetest.setting_get("wieldview_update_time"))
if not update_time then
update_time = 2
minetest.setting_set("wieldview_update_time", tostring(update_time))
end
local node_tiles = minetest.setting_getbool("wieldview_node_tiles")
if not node_tiles then
node_tiles = false
minetest.setting_set("wieldview_node_tiles", "false")
end
dofile(minetest.get_modpath(minetest.get_current_modname()).."/transform.lua")
wieldview = {
wielded_item = {},
}
wieldview.get_item_texture = function(self, item)
local texture = uniskins.default_texture
if item ~= "" then
if minetest.registered_items[item] then
if minetest.registered_items[item].inventory_image ~= "" then
texture = minetest.registered_items[item].inventory_image
elseif node_tiles == true and minetest.registered_items[item].tiles then
texture = minetest.registered_items[item].tiles[1]
end
end
if wieldview_transform[item] then
texture = texture.."^[transform"..wieldview_transform[item]
end
end
return texture
end
wieldview.update_wielded_item = function(self, player)
if not player then
return
end
local name = player:get_player_name()
local stack = player:get_wielded_item()
local item = stack:get_name()
if not item then
return
end
if self.wielded_item[name] then
if self.wielded_item[name] == item then
return
end
uniskins.wielditem[name] = self:get_item_texture(item)
uniskins:update_player_visuals(player)
end
self.wielded_item[name] = item
end
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
wieldview.wielded_item[name] = ""
minetest.after(0, function(player)
wieldview:update_wielded_item(player)
end, player)
end)
minetest.register_globalstep(function(dtime)
time = time + dtime
if time > update_time then
for _,player in ipairs(minetest.get_connected_players()) do
wieldview:update_wielded_item(player)
end
time = 0
end
end)

View file

@ -1,24 +0,0 @@
-- Wielded Item Transformations - http://dev.minetest.net/texture
wieldview_transform = {
["mcl_torches:torch"]="R270",
["mcl_core:sapling"]="R270",
["flowers:dandelion_white"]="R270",
["flowers:dandelion_yellow"]="R270",
["flowers:geranium"]="R270",
["flowers:rose"]="R270",
["flowers:tulip"]="R270",
["flowers:viola"]="R270",
["bucket:bucket_empty"]="R270",
["bucket:bucket_water"]="R270",
["bucket:bucket_lava"]="R270",
["screwdriver:screwdriver"]="R270",
["screwdriver:screwdriver1"]="R270",
["screwdriver:screwdriver2"]="R270",
["screwdriver:screwdriver3"]="R270",
["screwdriver:screwdriver4"]="R270",
["vessels:glass_bottle"]="R270",
["vessels:drinking_glass"]="R270",
["vessels:steel_bottle"]="R270",
}