diff --git a/mods/dreambuilder_extras/customize-dreambuilder-game.sh b/mods/dreambuilder_extras/customize-dreambuilder-game.sh index 0daef829..7768fbaa 100755 --- a/mods/dreambuilder_extras/customize-dreambuilder-game.sh +++ b/mods/dreambuilder_extras/customize-dreambuilder-game.sh @@ -281,7 +281,6 @@ sed -i '/size\[8,7;\]/ { sed -i "0, /depends = /s//depends = dreambuilder_gui_theming, /" $workdir"/mods/vessels/mod.conf" - sed -i 's/"field\[.*\]"/ \ \t\t\t"formspec_version[4]".. \ \t\t\t"size[8,4]".. \ @@ -290,6 +289,21 @@ sed -i 's/"field\[.*\]"/ \ \t\t/' \ $workdir"/mods/technic/machines/switching_station.lua" +# the inv and slots images below are exactly 192x192 and 512x256 pixels +# and meant to cover inv areas of 3x3 and 8x4 inv slots +# but with an 8x9 formspec size, it takes a declared size of [10.03, 4.65] +# to make the 8x4 grid image fit right +# [10.03, 4.65] / [8, 4] = [1.254, 1.163] +# +# so a 3x3 inv grid should be about 3.762x3.488 real size + +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[2.9,0.93;3.762,3.488;technic_battery_box_upper_slots.png]".. + }' $workdir"/mods/technic/machines/register/battery_box.lua" + + sed -i 's/"field\[.*")/ \ \t\t\t\t\t\t"formspec_version[4]".. \ \t\t\t\t\t\t"size[8,4]".. \ @@ -298,6 +312,64 @@ sed -i 's/"field\[.*")/ \ \t\t\t\t\t)/' \ $workdir"/mods/technic/machines/register/battery_box.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[2.9,0.93;5.016,2.326;technic_base_machine_upper_bg.png]".. + }' $workdir"/mods/technic/machines/register/machine_base.lua" + +sed -i '/formspec = formspec/ { + a \\t\t\t"image[0.91,2.93;2.508,1.163;technic_base_machine_upgrade_slots_bg.png]".. + }' $workdir"/mods/technic/machines/register/machine_base.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[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[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,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[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[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]".. + }' $workdir"/mods/technic/machines/other/constructor.lua" + +sed -i '/list\[current_name/ { + i \\t\t\t\t\t.."image[5.89,"..(i*0.998-1.07)..";1.254,1.163;technic_single_slot.png]" + }' $workdir"/mods/technic/machines/other/constructor.lua" + +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,5.42;11.28,1.163;technic_cnc_upper_slots.png]".. + }' $workdir"/mods/technic_cnc/cnc.lua" + +sed -i "0, /depends = /s//depends = dreambuilder_gui_theming, /" $workdir"/mods/technic/mod.conf" sed -i '/local n = 4/ { i \\tformspec[4]="style_type[image_button;bgcolor="..dreambuilder_theme.form_bgcolor.."]" diff --git a/mods/dreambuilder_gui_theming/textures/technic_base_machine_upgrade_slots_bg.png b/mods/dreambuilder_gui_theming/textures/technic_base_machine_upgrade_slots_bg.png new file mode 100644 index 00000000..4c544c58 Binary files /dev/null and b/mods/dreambuilder_gui_theming/textures/technic_base_machine_upgrade_slots_bg.png differ diff --git a/mods/dreambuilder_gui_theming/textures/technic_base_machine_upper_bg.png b/mods/dreambuilder_gui_theming/textures/technic_base_machine_upper_bg.png new file mode 100644 index 00000000..dc7cb407 Binary files /dev/null and b/mods/dreambuilder_gui_theming/textures/technic_base_machine_upper_bg.png differ diff --git a/mods/dreambuilder_gui_theming/textures/technic_battery_box_upper_slots.png b/mods/dreambuilder_gui_theming/textures/technic_battery_box_upper_slots.png new file mode 100644 index 00000000..72514d33 Binary files /dev/null and b/mods/dreambuilder_gui_theming/textures/technic_battery_box_upper_slots.png differ diff --git a/mods/dreambuilder_gui_theming/textures/technic_cnc_upper_slots.png b/mods/dreambuilder_gui_theming/textures/technic_cnc_upper_slots.png new file mode 100644 index 00000000..77dc1fcd Binary files /dev/null and b/mods/dreambuilder_gui_theming/textures/technic_cnc_upper_slots.png differ diff --git a/mods/dreambuilder_gui_theming/textures/technic_coal_alloy_furnace_upper_slots.png b/mods/dreambuilder_gui_theming/textures/technic_coal_alloy_furnace_upper_slots.png new file mode 100644 index 00000000..34a8ec88 Binary files /dev/null and b/mods/dreambuilder_gui_theming/textures/technic_coal_alloy_furnace_upper_slots.png differ diff --git a/mods/dreambuilder_gui_theming/textures/technic_injector_upper_slots.png b/mods/dreambuilder_gui_theming/textures/technic_injector_upper_slots.png new file mode 100644 index 00000000..def4f747 Binary files /dev/null and b/mods/dreambuilder_gui_theming/textures/technic_injector_upper_slots.png differ diff --git a/mods/dreambuilder_gui_theming/textures/technic_reactor_upper_slots.png b/mods/dreambuilder_gui_theming/textures/technic_reactor_upper_slots.png new file mode 100644 index 00000000..ede6bbaa Binary files /dev/null and b/mods/dreambuilder_gui_theming/textures/technic_reactor_upper_slots.png differ diff --git a/mods/dreambuilder_gui_theming/textures/technic_single_slot.png b/mods/dreambuilder_gui_theming/textures/technic_single_slot.png new file mode 100644 index 00000000..428da1e8 Binary files /dev/null and b/mods/dreambuilder_gui_theming/textures/technic_single_slot.png differ diff --git a/mods/dreambuilder_gui_theming/textures/technic_standard_inv.png b/mods/dreambuilder_gui_theming/textures/technic_standard_inv.png new file mode 100644 index 00000000..267e51b5 Binary files /dev/null and b/mods/dreambuilder_gui_theming/textures/technic_standard_inv.png differ diff --git a/mods/signs_lib/mod.conf b/mods/signs_lib/mod.conf index 11641653..82af3616 100644 --- a/mods/signs_lib/mod.conf +++ b/mods/signs_lib/mod.conf @@ -3,4 +3,4 @@ author = VanessaE depends = default optional_depends = intllib, screwdriver, streetspoles, streetlamps, cottages, prefab_redo description = Adds signs with readable text. -min_minetest_version = 5.2.0 +min_minetest_version = 5.4.0 diff --git a/mods/technic/machines/HV/nuclear_reactor.lua b/mods/technic/machines/HV/nuclear_reactor.lua index abaeb743..606ee64e 100644 --- a/mods/technic/machines/HV/nuclear_reactor.lua +++ b/mods/technic/machines/HV/nuclear_reactor.lua @@ -32,6 +32,11 @@ minetest.register_craft({ local function make_reactor_formspec(meta) local f = "size[8,9]".. + "listcolors[#00000000;#00000000;#00000000;".. + dreambuilder_theme.tooltip_bgcolor..";".. + dreambuilder_theme.tooltip_fontcolor.."]".. + "image[-0.1,4.93;10.03,4.65;technic_standard_inv.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;]".. "list[current_player;main;0,5;8,4;]".. diff --git a/mods/technic/machines/MV/tool_workshop.lua b/mods/technic/machines/MV/tool_workshop.lua index 678a1fd0..874e8ba5 100644 --- a/mods/technic/machines/MV/tool_workshop.lua +++ b/mods/technic/machines/MV/tool_workshop.lua @@ -20,6 +20,12 @@ local workshop_demand = {5000, 3500, 2000} local workshop_formspec = "size[8,9;]".. + "listcolors[#00000000;#00000000;#00000000;".. + dreambuilder_theme.tooltip_bgcolor..";".. + dreambuilder_theme.tooltip_fontcolor.."]".. + "image[-0.1,4.93;10.03,4.65;technic_standard_inv.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;]".. "label[0,0;"..S("%s Tool Workshop"):format("MV").."]".. "list[current_name;upgrade1;1,3;1,1;]".. diff --git a/mods/technic/machines/other/coal_alloy_furnace.lua b/mods/technic/machines/other/coal_alloy_furnace.lua index c2de1511..3a0253ce 100644 --- a/mods/technic/machines/other/coal_alloy_furnace.lua +++ b/mods/technic/machines/other/coal_alloy_furnace.lua @@ -15,6 +15,11 @@ minetest.register_craft({ local machine_name = S("Fuel-Fired Alloy Furnace") local formspec = "size[8,9]".. + "listcolors[#00000000;#00000000;#00000000;".. + dreambuilder_theme.tooltip_bgcolor..";".. + dreambuilder_theme.tooltip_fontcolor.."]".. + "image[-0.1,4.93;10.03,4.65;technic_standard_inv.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]".. "list[current_name;fuel;2,3;1,1;]".. @@ -124,6 +129,11 @@ minetest.register_abm({ technic.swap_node(pos, "technic:coal_alloy_furnace_active") meta:set_string("formspec", "size[8,9]".. + "listcolors[#00000000;#00000000;#00000000;".. + dreambuilder_theme.tooltip_bgcolor..";".. + dreambuilder_theme.tooltip_fontcolor.."]".. + "image[-0.1,4.93;10.03,4.65;technic_standard_inv.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:".. (100 - percent)..":default_furnace_fire_fg.png]".. diff --git a/mods/technic/machines/other/constructor.lua b/mods/technic/machines/other/constructor.lua index 9117224c..a50ad93c 100644 --- a/mods/technic/machines/other/constructor.lua +++ b/mods/technic/machines/other/constructor.lua @@ -146,11 +146,16 @@ local function make_constructor(mark, length) on_construct = function(pos) local meta = minetest.get_meta(pos) local formspec = "size[8,9;]".. + "listcolors[#00000000;#00000000;#00000000;".. + dreambuilder_theme.tooltip_bgcolor..";".. + dreambuilder_theme.tooltip_fontcolor.."]".. + "image[-0.1,4.93;10.03,4.65;technic_standard_inv.png]".. "label[0,0;"..S("Constructor Mk%d"):format(mark).."]".. "list[current_player;main;0,5;8,4;]" for i = 1, length do formspec = formspec .."label[5,"..(i - 1)..";"..S("Slot %d"):format(i).."]" + .."image[5.89,"..(i*0.998-1.07)..";1.254,1.163;technic_single_slot.png]" .."list[current_name;slot"..i ..";6,"..(i - 1)..";1,1;]" end diff --git a/mods/technic/machines/other/injector.lua b/mods/technic/machines/other/injector.lua index 6bd5a833..eaf70d37 100644 --- a/mods/technic/machines/other/injector.lua +++ b/mods/technic/machines/other/injector.lua @@ -56,6 +56,11 @@ local function set_injector_formspec(meta) local is_stack = meta:get_string("mode") == "whole stacks" meta:set_string("formspec", "size[8,9;]".. + "listcolors[#00000000;#00000000;#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,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").."]".. (is_stack and diff --git a/mods/technic/machines/register/battery_box.lua b/mods/technic/machines/register/battery_box.lua index 30049a6d..29e8886a 100644 --- a/mods/technic/machines/register/battery_box.lua +++ b/mods/technic/machines/register/battery_box.lua @@ -162,6 +162,11 @@ function technic.register_battery_box(data) local formspec = "size[8,9]".. + "listcolors[#00000000;#00000000;#00000000;".. + dreambuilder_theme.tooltip_bgcolor..";".. + dreambuilder_theme.tooltip_fontcolor.."]".. + "image[-0.1,4.93;10.03,4.65;technic_standard_inv.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;]".. "image[4,1;1,1;technic_battery_reload.png]".. diff --git a/mods/technic/machines/register/generator.lua b/mods/technic/machines/register/generator.lua index 9120e29a..e400b4b4 100644 --- a/mods/technic/machines/register/generator.lua +++ b/mods/technic/machines/register/generator.lua @@ -36,6 +36,11 @@ function technic.register_generator(data) local generator_formspec = "size[8,9;]".. + "listcolors[#00000000;#00000000;#00000000;".. + dreambuilder_theme.tooltip_bgcolor..";".. + dreambuilder_theme.tooltip_fontcolor.."]".. + "image[-0.1,4.93;10.03,4.65;technic_standard_inv.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;]".. "image[4,1;1,1;default_furnace_fire_bg.png]".. diff --git a/mods/technic/machines/register/machine_base.lua b/mods/technic/machines/register/machine_base.lua index 8e1dee77..942dd094 100644 --- a/mods/technic/machines/register/machine_base.lua +++ b/mods/technic/machines/register/machine_base.lua @@ -51,6 +51,11 @@ function technic.register_base_machine(data) local formspec = "size[8,9;]".. + "listcolors[#00000000;#00000000;#00000000;".. + dreambuilder_theme.tooltip_bgcolor..";".. + dreambuilder_theme.tooltip_fontcolor.."]".. + "image[-0.1,4.93;10.03,4.65;technic_standard_inv.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;]".. "list[current_player;main;0,5;8,4;]".. @@ -61,6 +66,7 @@ function technic.register_base_machine(data) "listring[current_player;main]" if data.upgrade then formspec = formspec.. + "image[0.91,2.93;2.508,1.163;technic_base_machine_upgrade_slots_bg.png]".. "list[current_name;upgrade1;1,3;1,1;]".. "list[current_name;upgrade2;2,3;1,1;]".. "label[1,4;"..S("Upgrade Slots").."]".. diff --git a/mods/technic/mod.conf b/mods/technic/mod.conf index f2cefaa9..013060b7 100644 --- a/mods/technic/mod.conf +++ b/mods/technic/mod.conf @@ -1,3 +1,3 @@ name = technic -depends = default, pipeworks, technic_worldgen, basic_materials +depends = dreambuilder_gui_theming, default, pipeworks, technic_worldgen, basic_materials optional_depends = bucket, screwdriver, mesecons, mesecons_mvps, digilines, digiline_remote, intllib, unified_inventory, vector_extras, dye diff --git a/mods/technic_cnc/cnc.lua b/mods/technic_cnc/cnc.lua index cb81bd48..243ad246 100644 --- a/mods/technic_cnc/cnc.lua +++ b/mods/technic_cnc/cnc.lua @@ -100,6 +100,11 @@ local twosize_products = { local cnc_formspec = "size[9,11;]".. + "listcolors[#00000000;#00000000;#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,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; ]".. "image_button[2,0.5;1,1;technic_cnc_slope_edge.png;slope_edge; ]"..