add theme images for most of Technic's machines
(basically everything that has inventory slots)
@ -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.."]"
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.4 KiB |
BIN
mods/dreambuilder_gui_theming/textures/technic_single_slot.png
Normal file
After Width: | Height: | Size: 642 B |
BIN
mods/dreambuilder_gui_theming/textures/technic_standard_inv.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
@ -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
|
||||
|
@ -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;]"..
|
||||
|
@ -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;]"..
|
||||
|
@ -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]"..
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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]"..
|
||||
|
@ -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]"..
|
||||
|
@ -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").."]"..
|
||||
|
@ -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
|
||||
|
@ -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; ]"..
|
||||
|