1
0
Fork 0

armor trims: proof of concept

This commit is contained in:
chmodsayshello 2023-06-07 15:41:53 +02:00
parent 47f64f63a3
commit df8c9625e4
24 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,34 @@
mcl_armor_trims = {
overlays = {"sentry","dune","coast","wild","tide","ward","vex","rib","snout","eye","spire"},
colors = {"bf352d"}
}
local function define_items()
local register_list = {}
for itemname, itemdef in pairs(minetest.registered_items) do
if itemdef._mcl_armor_texture and type(itemdef._mcl_armor_texture) == "string" then
for _, overlay in pairs(mcl_armor_trims.overlays) do
local new_name = itemname .. "_trimmed_" .. overlay
minetest.override_item(itemname, {_mcl_armor_trims_trim = new_name})
local new_def = table.copy(itemdef)
--TODO: inventory stuff
new_def.groups.not_in_creative_inventory = 0 --set this to 1 later!
new_def.groups.not_in_craft_guide = 1
new_def._mcl_armor_texture = new_def._mcl_armor_texture .. "^" .. overlay .. ".png"
new_def._mcl_armor_trims_trim = new_name
register_list[":" .. new_name] = new_def
end
end
end
for new_name, new_def in pairs(register_list) do
minetest.register_craftitem(new_name, new_def)
end
end
minetest.register_on_mods_loaded(define_items)

View File

@ -0,0 +1,2 @@
name = mcl_armor_trims
author = chmodsayshello

BIN
textures/coast.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
textures/coast_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

BIN
textures/dune.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
textures/dune_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

BIN
textures/eye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
textures/eye_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
textures/rib.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

BIN
textures/rib_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

BIN
textures/sentry.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

BIN
textures/snout.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

BIN
textures/snout_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

BIN
textures/spire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
textures/spire_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

BIN
textures/tide.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

BIN
textures/tide_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

BIN
textures/vex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

BIN
textures/vex_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

BIN
textures/ward.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
textures/ward_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

BIN
textures/wild.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

BIN
textures/wild_leggings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B