Added some textures; don't like chest textures.

This commit is contained in:
ThePython 2023-11-20 12:35:10 -08:00
parent 9290294154
commit 7aae74608f
10 changed files with 42 additions and 32 deletions

View File

@ -224,7 +224,6 @@ minetest.register_on_mods_loaded(function()
-- Recovery compasses use a random compass frame for the crafting recipe... Incredibly irritating.
for i = 0, 31 do
if exchangeclone.get_item_energy("mcl_compass:"..i.."_recovery") then
minetest.log(i)
for j = 0, 31 do
exchangeclone.register_energy_alias("mcl_compass:"..i.."_recovery", "mcl_compass:"..j.."_recovery")
end

View File

@ -1,22 +1,22 @@
local S = minetest.get_translator()
local colors = {
red = "Red",
orange = "Orange",
yellow = "Yellow",
green = "Lime",
dark_green = "Green",
cyan = "Cyan",
light_blue = "Light Blue",
blue = "Blue",
purple = "Purple",
magenta = "Magenta",
pink = "Pink",
black = "Black",
white = "White",
silver = exchangeclone.mcl and "Light Gray",
grey = "Gray",
brown = "Brown",
red = {"Red", "^[multiply:#990000"},
orange = {"Orange", "^[multiply:#99ff00"},
yellow = {"Yellow", "^[multiply:#ffff00"},
green = {"Lime", "^[multiply:#00ff00"},
dark_green = {"Green", "^[multiply:#007700"},
cyan = {"Cyan", "^[multiply:#00ffff"},
light_blue = {"Light Blue", "^[multiply:#8888ff"},
blue = {"Blue", "^[multiply:#0000ff"},
purple = {"Purple", "^[multiply:#9900ff"},
magenta = {"Magenta", "^[multiply:#ff00ff"},
pink = {"Pink", "^[multiply:#ff5599"},
black = {"Black", "^[invert:rgb"},
white = {"White", ""},
silver = exchangeclone.mcl and {"Light Gray", "^[multiply:#aaaaaa"},
grey = {"Gray", "^[multiply:#777777"},
brown = {"Brown", "^[multiply:#995500"},
}
-- color is nil for regular alchemical chests (not advanced/bags)
@ -57,6 +57,15 @@ minetest.register_node("exchangeclone:alchemical_chest", {
groups = {container = 2, alchemical_chest = 1, cracky = 2, pickaxey = 2},
_mcl_hardness = 3,
_mcl_blast_resistance = 6,
paramtype2 = "4dir",
tiles = {
"exchangeclone_alchemical_chest_top.png",
"exchangeclone_alchemical_chest_bottom.png",
"exchangeclone_alchemical_chest_side.png",
"exchangeclone_alchemical_chest_side.png",
"exchangeclone_alchemical_chest_side.png",
"exchangeclone_alchemical_chest_front.png",
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
@ -81,15 +90,15 @@ minetest.register_craft({
minetest.register_on_joinplayer(function(player, last_login)
local inv = player:get_inventory()
for _, color in pairs(colors) do
local codified_color = string.lower(color):gsub(" ", "_")
for _, color_data in pairs(colors) do
local codified_color = string.lower(color_data[1]):gsub(" ", "_")
inv:set_size(codified_color.."_alchemical_inventory", 104)
inv:set_width(codified_color.."_alchemical_inventory", 13)
end
end)
for dye_color, color in pairs(colors) do
local codified_color = string.lower(color):gsub(" ", "_")
for dye_color, color_data in pairs(colors) do
local codified_color = string.lower(color_data[1]):gsub(" ", "_")
local bag_itemstring = "exchangeclone:"..codified_color.."_alchemical_bag"
local advanced_itemstring = "exchangeclone:"..codified_color.."_advanced_alchemical_chest"
local wool_itemstring = (exchangeclone.mcl and "mcl_wool:" or "wool:")..dye_color
@ -104,16 +113,18 @@ for dye_color, color in pairs(colors) do
and minetest.get_item_group(minetest.get_node(pointed_thing.under).name, "advanced_alchemical_chest") > 0 then
--minetest.log(advanced_itemstring)
minetest.set_node(pointed_thing.under, {name=advanced_itemstring})
local on_construct = alchemical_on_construct(color)
local on_construct = alchemical_on_construct(color_data[1])
on_construct(pointed_thing.under)
return
else
minetest.show_formspec(player:get_player_name(), bag_itemstring, alchemical_formspec(color))
minetest.show_formspec(player:get_player_name(), bag_itemstring, alchemical_formspec(color_data[1]))
end
end
minetest.register_tool(bag_itemstring, {
description = S("@1 Alchemical Bag", S(color)),
description = S("@1 Alchemical Bag", S(color_data[1])),
inventory_image = "exchangeclone_alchemical_bag.png"..color_data[2],
wield_image = "exchangeclone_alchemical_bag.png"..color_data[2],
groups = {disable_repair = 1, alchemical_bag = 1},
on_secondary_use = alchemical_bag_action,
on_place = alchemical_bag_action
@ -137,11 +148,11 @@ for dye_color, color in pairs(colors) do
})
minetest.register_node(advanced_itemstring, {
description = S("@1 Advanced Alchemical Chest", color).."\n"..S("Shift+right-click with an alchemical bag to change the color."),
description = S("@1 Advanced Alchemical Chest", S(color_data[1])).."\n"..S("Shift+right-click with an alchemical bag to change the color."),
_mcl_hardness = 3,
_mcl_blast_resistance = 6,
groups = {container = 2, advanced_alchemical_chest = 1},
on_construct = alchemical_on_construct(color)
on_construct = alchemical_on_construct(color_data[1])
})
minetest.register_craft({

View File

@ -500,7 +500,7 @@ local inactive_def = {
"exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_furnace.png",
},
paramtype2 = "facedir",
paramtype2 = "4dir",
groups = {pickaxey=5, cracky = 3, container=4, material_stone=1, level = get_level(4), exchangeclone_furnace = 1, tubedevice = 1, tubedevice_receiver = 1},
is_ground_content = false,
sounds = exchangeclone.sound_mod.node_sound_stone_defaults(),
@ -591,7 +591,7 @@ local active_def = {
"exchangeclone_dark_matter_block.png",
"exchangeclone_dark_matter_furnace.png",
},
paramtype2 = "facedir",
paramtype2 = "4dir",
parammatter_type = "light",
light_source = LIGHT_ACTIVE_FURNACE,
drop = "exchangeclone:dark_matter_furnace",

View File

@ -336,6 +336,7 @@ exchangeclone.energy_aliases = {}
-- <itemstring> will be treated as <alias> in Deconstructors, Constructors, Transmutation Table(t)s, etc.
-- When you put <itemstring> into a TT, you will learn <alias> instead.
function exchangeclone.register_energy_alias_force(alias, itemstring)
if alias == itemstring then return end
exchangeclone.energy_aliases[itemstring] = alias
end
@ -345,12 +346,12 @@ function exchangeclone.register_energy_alias(alias, itemstring)
end
end
-- Returns the correct itemstring, handling aliases.
-- Returns the correct itemstring, handling both Minetest and Exchangeclone aliases.
function exchangeclone.handle_alias(item)
item = ItemStack(item)
if not item:is_empty() then
local de_aliased = exchangeclone.energy_aliases[item:get_name()] or item:get_name()
return ItemStack(de_aliased):get_name() -- Not at all sure if this is necessary to resolve MT aliases
local de_aliased = exchangeclone.energy_aliases[item:get_name()] or item:get_name() -- Resolve ExchangeClone aliases
return ItemStack(de_aliased):get_name() -- Resolve MT aliases
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

View File

@ -218,7 +218,6 @@ if exchangeclone.pipeworks then
end,
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if allow_metadata_inventory_put(pos, get_list(direction), 1, stack) > 0 then
return true
end