make technic_chests themeable

make all nodes that call for the technic standard inv actually use the same file
also fix old hard-coded inv slot squares being visible on them
This commit is contained in:
Vanessa Dannenberg 2021-03-04 12:14:24 -05:00
parent 5e0f6c0601
commit 85fa3d579a
25 changed files with 28 additions and 20 deletions

View File

@ -298,7 +298,7 @@ sed -i 's/"field\[.*\]"/ \
sed -i '/size\[8,9\]/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
a \\t\t"image[2.9,0.93;3.762,3.488;technic_battery_box_upper_slots.png]"..
}' $workdir"/mods/technic/machines/register/battery_box.lua"
@ -313,7 +313,7 @@ sed -i 's/"field\[.*")/ \
sed -i '/size\[8,9;\]/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
a \\t\t"image[2.9,0.93;5.016,2.326;technic_base_machine_upper_bg.png]"..
}' $workdir"/mods/technic/machines/register/machine_base.lua"
@ -323,39 +323,39 @@ sed -i '/formspec = formspec/ {
sed -i '/size\[8,9;\]/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
a \\t\t"image[2.9,0.93;1.254,1.163;technic_single_slot.png]"..
}' $workdir"/mods/technic/machines/register/generator.lua"
# this alloy furnace change will match in two places, on purpose.
sed -i '/size\[8,9\]/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
a \\t\t"image[1.9,0.93;6.27,3.49;technic_coal_alloy_furnace_upper_slots.png]"..
}' $workdir"/mods/technic/machines/other/coal_alloy_furnace.lua"
sed -i '/size\[8,9;\]/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
a \\t\t"image[-0.1,1.92;10.03,2.375;technic_injector_upper_slots.png]"..
}' $workdir"/mods/technic/machines/other/injector.lua"
sed -i '/size\[8,9;\]/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
a \\t\t"image[2.9,0.93;1.254,1.163;technic_single_slot.png]"..
a \\t\t"image[0.91,2.93;2.508,1.163;technic_base_machine_upgrade_slots_bg.png]"..
}' $workdir"/mods/technic/machines/MV/tool_workshop.lua"
sed -i '/size\[8,9\]/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
a \\t\t"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
a \\t\t"image[1.9,0.93;3.76,2.325;technic_reactor_upper_slots.png]"..
}' $workdir"/mods/technic/machines/HV/nuclear_reactor.lua"
sed -i '/size\[8,9;\]/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t\t\t"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
a \\t\t\t\t"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
}' $workdir"/mods/technic/machines/other/constructor.lua"
sed -i '/list\[current_name/ {
@ -364,7 +364,7 @@ sed -i '/list\[current_name/ {
sed -i '/size\[9,11;\]/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t"image[-0.1,6.92;10.03,4.65;technic_standard_inv.png]"..
a \\t\t"image[-0.1,6.92;10.03,4.65;technic_main_inventory.png]"..
a \\t\t"image[-0.1,5.42;11.28,1.163;technic_cnc_upper_slots.png]"..
}' $workdir"/mods/technic_cnc/cnc.lua"
@ -389,6 +389,10 @@ sed -i '/1.175;ui_bags_header.png/ {
sed -i "0, /depends = /s//depends = dreambuilder_gui_theming, /" $workdir"/mods/unified_inventory/mod.conf"
sed -i '/"label\[0,0;"/ {
r /tmp/LISTCOLORS_HIDE_SLOTS
}' $workdir"/mods/technic_chests/register.lua"
sed -i "0, /depends = /s//depends = dreambuilder_gui_theming, /" $workdir"/mods/technic_chests/mod.conf"
mv $workdir"/mods/dreambuilder_extras/dreambuilder_gui_theming" \
@ -407,7 +411,8 @@ rm $workdir"/mods/default/textures/gui_formbg.png" \
$workdir"/mods/unified_inventory/textures/ui_single_slot.png" \
$workdir"/mods/vessels/textures/vessels_shelf_slot.png" \
$workdir"/mods/default/textures/gui_hotbar_selected.png" \
$workdir"/mods/technic_chests/textures/technic_chest_form_bg.png"
$workdir"/mods/technic_chests/textures/technic_chest_form_bg.png" \
$workdir"/mods/technic_chests/textures/"*"inventory.png"
rm /tmp/herefile* /tmp/LISTCOLORS_HIDE_SLOTS

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -35,7 +35,7 @@ local function make_reactor_formspec(meta)
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
"image[1.9,0.93;3.76,2.325;technic_reactor_upper_slots.png]"..
"label[0,0;"..S("Nuclear Reactor Rod Compartment").."]"..
"list[current_name;src;2,1;3,2;]"..

View File

@ -23,7 +23,7 @@ local workshop_formspec =
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
"image[2.9,0.93;1.254,1.163;technic_single_slot.png]"..
"image[0.91,2.93;2.508,1.163;technic_base_machine_upgrade_slots_bg.png]"..
"list[current_name;src;3,1;1,1;]"..

View File

@ -18,7 +18,7 @@ local formspec =
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
"image[1.9,0.93;6.27,3.49;technic_coal_alloy_furnace_upper_slots.png]"..
"label[0,0;"..machine_name.."]"..
"image[2,2;1,1;default_furnace_fire_bg.png]"..
@ -132,7 +132,7 @@ minetest.register_abm({
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
"image[1.9,0.93;6.27,3.49;technic_coal_alloy_furnace_upper_slots.png]"..
"label[0,0;"..machine_name.."]"..
"image[2,2;1,1;default_furnace_fire_bg.png^[lowpart:"..

View File

@ -149,7 +149,7 @@ local function make_constructor(mark, length)
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
"label[0,0;"..S("Constructor Mk%d"):format(mark).."]"..
"list[current_player;main;0,5;8,4;]"
for i = 1, length do

View File

@ -59,7 +59,7 @@ local function set_injector_formspec(meta)
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
"image[-0.1,1.92;10.03,2.375;technic_injector_upper_slots.png]"..
"item_image[0,0;1,1;technic:injector]"..
"label[1,0;"..S("Self-Contained Injector").."]"..

View File

@ -165,7 +165,7 @@ function technic.register_battery_box(data)
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
"image[2.9,0.93;3.762,3.488;technic_battery_box_upper_slots.png]"..
"image[1,1;1,2;technic_power_meter_bg.png]"..
"list[context;src;3,1;1,1;]"..

View File

@ -39,7 +39,7 @@ function technic.register_generator(data)
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
"image[2.9,0.93;1.254,1.163;technic_single_slot.png]"..
"label[0,0;"..S("Fuel-Fired %s Generator"):format(tier).."]"..
"list[current_name;src;3,1;1,1;]"..

View File

@ -54,7 +54,7 @@ function technic.register_base_machine(data)
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,4.93;10.03,4.65;technic_main_inventory.png]"..
"image[2.9,0.93;5.016,2.326;technic_base_machine_upper_bg.png]"..
"list[current_name;src;"..(4-input_size)..",1;"..input_size..",1;]"..
"list[current_name;dst;5,1;2,2;]"..

View File

@ -225,6 +225,9 @@ function technic.chests:definition(name, data)
local front = {"technic_"..lname.."_chest_front.png"}
data.base_formspec = "size["..data.ovwidth..","..data.ovheight.."]"..
"label[0,0;"..S("%s Chest"):format(name).."]"..
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"list[context;main;"..data.hileft..",1;"..data.width..","..data.height..";]"..
"list[current_player;main;"..data.loleft..","..data.lotop..";8,4;]"..
"background[-0.19,-0.25;"..(data.ovwidth+0.4)..","..(data.ovheight+0.75)..";technic_chest_form_bg.png]"..

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -103,7 +103,7 @@ local cnc_formspec =
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..
dreambuilder_theme.tooltip_fontcolor.."]"..
"image[-0.1,6.92;10.03,4.65;technic_standard_inv.png]"..
"image[-0.1,6.92;10.03,4.65;technic_main_inventory.png]"..
"image[-0.1,5.42;11.28,1.163;technic_cnc_upper_slots.png]"..
"label[1,0;"..S("Choose Milling Program:").."]"..
"image_button[1,0.5;1,1;technic_cnc_slope.png;slope; ]"..