From d2df31bd6b499560dac82d9c15d937b5e4179ae5 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sat, 21 Jan 2017 20:38:19 -0700 Subject: Revamp storage module textures, controller colorization --- init.lua | 4 ++++ node_controllers.lua | 26 +++++++++++----------- node_diggers.lua | 38 ++++++++++++++++---------------- node_storage.lua | 27 +++++++++++++++++++---- textures/digtron_auto_control_tint.png | Bin 185 -> 0 bytes textures/digtron_combined_storage.png | Bin 574 -> 0 bytes textures/digtron_crossbrace.png | Bin 0 -> 605 bytes textures/digtron_flammable.png | Bin 0 -> 351 bytes textures/digtron_flammable_small.png | Bin 0 -> 238 bytes textures/digtron_fuelstore.png | Bin 581 -> 0 bytes textures/digtron_intermittent.png | Bin 0 -> 507 bytes textures/digtron_intermittent_motor.png | Bin 559 -> 0 bytes textures/digtron_inventory.png | Bin 556 -> 0 bytes textures/digtron_pusher_tint.png | Bin 185 -> 0 bytes textures/digtron_storage.png | Bin 0 -> 399 bytes 15 files changed, 59 insertions(+), 36 deletions(-) delete mode 100644 textures/digtron_auto_control_tint.png delete mode 100644 textures/digtron_combined_storage.png create mode 100644 textures/digtron_crossbrace.png create mode 100644 textures/digtron_flammable.png create mode 100644 textures/digtron_flammable_small.png delete mode 100644 textures/digtron_fuelstore.png create mode 100644 textures/digtron_intermittent.png delete mode 100644 textures/digtron_intermittent_motor.png delete mode 100644 textures/digtron_inventory.png delete mode 100644 textures/digtron_pusher_tint.png create mode 100644 textures/digtron_storage.png diff --git a/init.lua b/init.lua index 6235586..bee5b7e 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,9 @@ digtron = {} +digtron.auto_controller_colorize = "#88000030" +digtron.pusher_controller_colorize = "#00880030" +digtron.soft_digger_colorize = "#88880030" + dofile( minetest.get_modpath( "digtron" ) .. "/util.lua" ) dofile( minetest.get_modpath( "digtron" ) .. "/doc.lua" ) dofile( minetest.get_modpath( "digtron" ) .. "/awards.lua" ) diff --git a/node_controllers.lua b/node_controllers.lua index f9912ad..518e97e 100644 --- a/node_controllers.lua +++ b/node_controllers.lua @@ -161,12 +161,12 @@ minetest.register_node("digtron:auto_controller", { is_ground_content = false, -- Aims in the +Z direction by default tiles = { - "digtron_plate.png^[transformR90^digtron_auto_control_tint.png", - "digtron_plate.png^[transformR270^digtron_auto_control_tint.png", - "digtron_plate.png^digtron_axel_side.png^[transformR270^digtron_auto_control_tint.png", - "digtron_plate.png^digtron_axel_side.png^[transformR270^digtron_auto_control_tint.png", - "digtron_plate.png^digtron_auto_control_tint.png", - "digtron_plate.png^digtron_control.png^digtron_auto_control_tint.png", + "digtron_plate.png^[transformR90^[colorize:" .. digtron.auto_controller_colorize, + "digtron_plate.png^[transformR270^[colorize:" .. digtron.auto_controller_colorize, + "digtron_plate.png^digtron_axel_side.png^[transformR270^[colorize:" .. digtron.auto_controller_colorize, + "digtron_plate.png^digtron_axel_side.png^[transformR270^[colorize:" .. digtron.auto_controller_colorize, + "digtron_plate.png^[colorize:" .. digtron.auto_controller_colorize, + "digtron_plate.png^digtron_control.png^[colorize:" .. digtron.auto_controller_colorize, }, drawtype = "nodebox", @@ -222,7 +222,7 @@ minetest.register_node("digtron:auto_controller", { local node = minetest.get_node(pos) local controlling_coordinate = digtron.get_controlling_coordinate(pos, node.param2) - local newpos = pos --digtron.find_new_pos(pos, minetest.get_node(pos).param2) + local newpos = pos local markerpos = {x=newpos.x, y=newpos.y, z=newpos.z} local x_pos = math.floor((newpos[controlling_coordinate]+offset)/slope)*slope - offset markerpos[controlling_coordinate] = x_pos @@ -267,12 +267,12 @@ minetest.register_node("digtron:pusher", { is_ground_content = false, -- Aims in the +Z direction by default tiles = { - "digtron_plate.png^[transformR90^digtron_pusher_tint.png", - "digtron_plate.png^[transformR270^digtron_pusher_tint.png", - "digtron_plate.png^digtron_pusher_tint.png", - "digtron_plate.png^[transformR180^digtron_pusher_tint.png", - "digtron_plate.png^digtron_pusher_tint.png", - "digtron_plate.png^digtron_control.png^digtron_pusher_tint.png", + "digtron_plate.png^[transformR90^[colorize:" .. digtron.pusher_controller_colorize, + "digtron_plate.png^[transformR270^[colorize:" .. digtron.pusher_controller_colorize, + "digtron_plate.png^[colorize:" .. digtron.pusher_controller_colorize, + "digtron_plate.png^[transformR180^[colorize:" .. digtron.pusher_controller_colorize, + "digtron_plate.png^[colorize:" .. digtron.pusher_controller_colorize, + "digtron_plate.png^digtron_control.png^[colorize:" .. digtron.pusher_controller_colorize, }, drawtype = "nodebox", diff --git a/node_diggers.lua b/node_diggers.lua index 19441e9..b0bf59b 100644 --- a/node_diggers.lua +++ b/node_diggers.lua @@ -136,7 +136,7 @@ minetest.register_node("digtron:intermittent_digger", { length = 1.0, }, }, - "digtron_plate.png^digtron_intermittent_motor.png", + "digtron_plate.png^digtron_intermittent.png^digtron_motor.png", }, on_construct = intermittent_on_construct, @@ -193,12 +193,12 @@ minetest.register_node("digtron:soft_digger", { -- Aims in the +Z direction by default tiles = { - "digtron_plate.png^[transformR90^[colorize:#88880030", - "digtron_plate.png^[transformR270^[colorize:#88880030", - "digtron_plate.png^[colorize:#88880030", - "digtron_plate.png^[transformR180^[colorize:#88880030", + "digtron_plate.png^[transformR90^[colorize:" .. digtron.soft_digger_colorize, + "digtron_plate.png^[transformR270^[colorize:" .. digtron.soft_digger_colorize, + "digtron_plate.png^[colorize:" .. digtron.soft_digger_colorize, + "digtron_plate.png^[transformR180^[colorize:" .. digtron.soft_digger_colorize, { - name = "digtron_digger_yb.png^[colorize:#88880030", + name = "digtron_digger_yb.png^[colorize:" .. digtron.soft_digger_colorize, animation = { type = "vertical_frames", aspect_w = 16, @@ -206,7 +206,7 @@ minetest.register_node("digtron:soft_digger", { length = 1.0, }, }, - "digtron_plate.png^digtron_motor.png^[colorize:#88880030", + "digtron_plate.png^digtron_motor.png^[colorize:" .. digtron.soft_digger_colorize, }, execute_dig = function(pos, protected_nodes, nodes_dug, controlling_coordinate, lateral_dig) @@ -248,12 +248,12 @@ minetest.register_node("digtron:intermittent_soft_digger", { -- Aims in the +Z direction by default tiles = { - "digtron_plate.png^[transformR90^[colorize:#88880030", - "digtron_plate.png^[transformR270^[colorize:#88880030", - "digtron_plate.png^[colorize:#88880030", - "digtron_plate.png^[transformR180^[colorize:#88880030", + "digtron_plate.png^[transformR90^[colorize:" .. digtron.soft_digger_colorize, + "digtron_plate.png^[transformR270^[colorize:" .. digtron.soft_digger_colorize, + "digtron_plate.png^[colorize:" .. digtron.soft_digger_colorize, + "digtron_plate.png^[transformR180^[colorize:" .. digtron.soft_digger_colorize, { - name = "digtron_digger_yb.png^[colorize:#88880030", + name = "digtron_digger_yb.png^[colorize:" .. digtron.soft_digger_colorize, animation = { type = "vertical_frames", aspect_w = 16, @@ -261,7 +261,7 @@ minetest.register_node("digtron:intermittent_soft_digger", { length = 1.0, }, }, - "digtron_plate.png^digtron_intermittent_motor.png^[colorize:#88880030", + "digtron_plate.png^digtron_intermittent.png^digtron_motor.png^[colorize:" .. digtron.soft_digger_colorize, }, on_construct = intermittent_on_construct, @@ -398,9 +398,9 @@ minetest.register_node("digtron:dual_soft_digger", { -- Aims in the +Z and -Y direction by default tiles = { - "digtron_plate.png^digtron_motor.png^[colorize:#88880030", + "digtron_plate.png^digtron_motor.png^[colorize:" .. digtron.soft_digger_colorize, { - name = "digtron_digger_yb.png^[colorize:#88880030", + name = "digtron_digger_yb.png^[colorize:" .. digtron.soft_digger_colorize, animation = { type = "vertical_frames", aspect_w = 16, @@ -408,10 +408,10 @@ minetest.register_node("digtron:dual_soft_digger", { length = 1.0, }, }, - "digtron_plate.png^[colorize:#88880030", - "digtron_plate.png^[transformR180^[colorize:#88880030", + "digtron_plate.png^[colorize:" .. digtron.soft_digger_colorize, + "digtron_plate.png^[transformR180^[colorize:" .. digtron.soft_digger_colorize, { - name = "digtron_digger_yb.png^[colorize:#88880030", + name = "digtron_digger_yb.png^[colorize:" .. digtron.soft_digger_colorize, animation = { type = "vertical_frames", aspect_w = 16, @@ -419,7 +419,7 @@ minetest.register_node("digtron:dual_soft_digger", { length = 1.0, }, }, - "digtron_plate.png^digtron_motor.png^[colorize:#88880030", + "digtron_plate.png^digtron_motor.png^[colorize:" .. digtron.soft_digger_colorize, }, -- returns fuel_cost, items_produced diff --git a/node_storage.lua b/node_storage.lua index 18b7668..dd34014 100644 --- a/node_storage.lua +++ b/node_storage.lua @@ -11,7 +11,14 @@ minetest.register_node("digtron:inventory", { drawtype = "nodebox", paramtype = "light", is_ground_content = false, - tiles = {"digtron_plate.png^digtron_inventory.png"}, + tiles = { + "digtron_plate.png^digtron_crossbrace.png", + "digtron_plate.png^digtron_crossbrace.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_storage.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_storage.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_storage.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_storage.png", + }, on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -73,7 +80,14 @@ minetest.register_node("digtron:fuelstore", { drawtype = "nodebox", paramtype = "light", is_ground_content = false, - tiles = {"digtron_plate.png^digtron_fuelstore.png"}, + tiles = { + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable.png^digtron_storage.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable.png^digtron_storage.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable.png^digtron_storage.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable.png^digtron_storage.png", + }, on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -155,8 +169,13 @@ minetest.register_node("digtron:combined_storage", { drawtype = "nodebox", paramtype = "light", is_ground_content = false, - tiles = {"digtron_plate.png^digtron_combined_storage.png"}, - + tiles = { + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable_small.png^[transformR180^digtron_flammable_small.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable_small.png^[transformR180^digtron_flammable_small.png", "digtron_plate.png^digtron_crossbrace.png^digtron_flammable_small.png^digtron_storage.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable_small.png^digtron_storage.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable_small.png^digtron_storage.png", + "digtron_plate.png^digtron_crossbrace.png^digtron_flammable_small.png^digtron_storage.png", + }, on_construct = function(pos) local meta = minetest.get_meta(pos) meta:set_string("formspec", diff --git a/textures/digtron_auto_control_tint.png b/textures/digtron_auto_control_tint.png deleted file mode 100644 index 0581f23..0000000 Binary files a/textures/digtron_auto_control_tint.png and /dev/null differ diff --git a/textures/digtron_combined_storage.png b/textures/digtron_combined_storage.png deleted file mode 100644 index 300789d..0000000 Binary files a/textures/digtron_combined_storage.png and /dev/null differ diff --git a/textures/digtron_crossbrace.png b/textures/digtron_crossbrace.png new file mode 100644 index 0000000..31ccb24 Binary files /dev/null and b/textures/digtron_crossbrace.png differ diff --git a/textures/digtron_flammable.png b/textures/digtron_flammable.png new file mode 100644 index 0000000..2ed9811 Binary files /dev/null and b/textures/digtron_flammable.png differ diff --git a/textures/digtron_flammable_small.png b/textures/digtron_flammable_small.png new file mode 100644 index 0000000..72c84d4 Binary files /dev/null and b/textures/digtron_flammable_small.png differ diff --git a/textures/digtron_fuelstore.png b/textures/digtron_fuelstore.png deleted file mode 100644 index aa91748..0000000 Binary files a/textures/digtron_fuelstore.png and /dev/null differ diff --git a/textures/digtron_intermittent.png b/textures/digtron_intermittent.png new file mode 100644 index 0000000..9c68658 Binary files /dev/null and b/textures/digtron_intermittent.png differ diff --git a/textures/digtron_intermittent_motor.png b/textures/digtron_intermittent_motor.png deleted file mode 100644 index 85f10b6..0000000 Binary files a/textures/digtron_intermittent_motor.png and /dev/null differ diff --git a/textures/digtron_inventory.png b/textures/digtron_inventory.png deleted file mode 100644 index b3160c4..0000000 Binary files a/textures/digtron_inventory.png and /dev/null differ diff --git a/textures/digtron_pusher_tint.png b/textures/digtron_pusher_tint.png deleted file mode 100644 index a4c12c8..0000000 Binary files a/textures/digtron_pusher_tint.png and /dev/null differ diff --git a/textures/digtron_storage.png b/textures/digtron_storage.png new file mode 100644 index 0000000..0ecb643 Binary files /dev/null and b/textures/digtron_storage.png differ -- cgit v1.2.3