summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-01-21 20:38:19 -0700
committerFaceDeer <derksenmobile@gmail.com>2017-01-21 20:38:19 -0700
commitd2df31bd6b499560dac82d9c15d937b5e4179ae5 (patch)
treec6700b789a7e8437c4cc2064674af31c76e4b638
parent5008943d94bf12e6eda7ffaec197f8c6771d8f9b (diff)
Revamp storage module textures, controller colorization
-rw-r--r--init.lua4
-rw-r--r--node_controllers.lua26
-rw-r--r--node_diggers.lua38
-rw-r--r--node_storage.lua27
-rw-r--r--textures/digtron_auto_control_tint.pngbin185 -> 0 bytes
-rw-r--r--textures/digtron_combined_storage.pngbin574 -> 0 bytes
-rw-r--r--textures/digtron_crossbrace.pngbin0 -> 605 bytes
-rw-r--r--textures/digtron_flammable.pngbin0 -> 351 bytes
-rw-r--r--textures/digtron_flammable_small.pngbin0 -> 238 bytes
-rw-r--r--textures/digtron_fuelstore.pngbin581 -> 0 bytes
-rw-r--r--textures/digtron_intermittent.pngbin0 -> 507 bytes
-rw-r--r--textures/digtron_intermittent_motor.pngbin559 -> 0 bytes
-rw-r--r--textures/digtron_inventory.pngbin556 -> 0 bytes
-rw-r--r--textures/digtron_pusher_tint.pngbin185 -> 0 bytes
-rw-r--r--textures/digtron_storage.pngbin0 -> 399 bytes
15 files changed, 59 insertions, 36 deletions
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
--- a/textures/digtron_auto_control_tint.png
+++ /dev/null
Binary files differ
diff --git a/textures/digtron_combined_storage.png b/textures/digtron_combined_storage.png
deleted file mode 100644
index 300789d..0000000
--- a/textures/digtron_combined_storage.png
+++ /dev/null
Binary files differ
diff --git a/textures/digtron_crossbrace.png b/textures/digtron_crossbrace.png
new file mode 100644
index 0000000..31ccb24
--- /dev/null
+++ b/textures/digtron_crossbrace.png
Binary files differ
diff --git a/textures/digtron_flammable.png b/textures/digtron_flammable.png
new file mode 100644
index 0000000..2ed9811
--- /dev/null
+++ b/textures/digtron_flammable.png
Binary files differ
diff --git a/textures/digtron_flammable_small.png b/textures/digtron_flammable_small.png
new file mode 100644
index 0000000..72c84d4
--- /dev/null
+++ b/textures/digtron_flammable_small.png
Binary files differ
diff --git a/textures/digtron_fuelstore.png b/textures/digtron_fuelstore.png
deleted file mode 100644
index aa91748..0000000
--- a/textures/digtron_fuelstore.png
+++ /dev/null
Binary files differ
diff --git a/textures/digtron_intermittent.png b/textures/digtron_intermittent.png
new file mode 100644
index 0000000..9c68658
--- /dev/null
+++ b/textures/digtron_intermittent.png
Binary files differ
diff --git a/textures/digtron_intermittent_motor.png b/textures/digtron_intermittent_motor.png
deleted file mode 100644
index 85f10b6..0000000
--- a/textures/digtron_intermittent_motor.png
+++ /dev/null
Binary files differ
diff --git a/textures/digtron_inventory.png b/textures/digtron_inventory.png
deleted file mode 100644
index b3160c4..0000000
--- a/textures/digtron_inventory.png
+++ /dev/null
Binary files differ
diff --git a/textures/digtron_pusher_tint.png b/textures/digtron_pusher_tint.png
deleted file mode 100644
index a4c12c8..0000000
--- a/textures/digtron_pusher_tint.png
+++ /dev/null
Binary files differ
diff --git a/textures/digtron_storage.png b/textures/digtron_storage.png
new file mode 100644
index 0000000..0ecb643
--- /dev/null
+++ b/textures/digtron_storage.png
Binary files differ