Revamp storage module textures, controller colorization
4
init.lua
@ -1,5 +1,9 @@
|
|||||||
digtron = {}
|
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" ) .. "/util.lua" )
|
||||||
dofile( minetest.get_modpath( "digtron" ) .. "/doc.lua" )
|
dofile( minetest.get_modpath( "digtron" ) .. "/doc.lua" )
|
||||||
dofile( minetest.get_modpath( "digtron" ) .. "/awards.lua" )
|
dofile( minetest.get_modpath( "digtron" ) .. "/awards.lua" )
|
||||||
|
@ -161,12 +161,12 @@ minetest.register_node("digtron:auto_controller", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
-- Aims in the +Z direction by default
|
-- Aims in the +Z direction by default
|
||||||
tiles = {
|
tiles = {
|
||||||
"digtron_plate.png^[transformR90^digtron_auto_control_tint.png",
|
"digtron_plate.png^[transformR90^[colorize:" .. digtron.auto_controller_colorize,
|
||||||
"digtron_plate.png^[transformR270^digtron_auto_control_tint.png",
|
"digtron_plate.png^[transformR270^[colorize:" .. digtron.auto_controller_colorize,
|
||||||
"digtron_plate.png^digtron_axel_side.png^[transformR270^digtron_auto_control_tint.png",
|
"digtron_plate.png^digtron_axel_side.png^[transformR270^[colorize:" .. digtron.auto_controller_colorize,
|
||||||
"digtron_plate.png^digtron_axel_side.png^[transformR270^digtron_auto_control_tint.png",
|
"digtron_plate.png^digtron_axel_side.png^[transformR270^[colorize:" .. digtron.auto_controller_colorize,
|
||||||
"digtron_plate.png^digtron_auto_control_tint.png",
|
"digtron_plate.png^[colorize:" .. digtron.auto_controller_colorize,
|
||||||
"digtron_plate.png^digtron_control.png^digtron_auto_control_tint.png",
|
"digtron_plate.png^digtron_control.png^[colorize:" .. digtron.auto_controller_colorize,
|
||||||
},
|
},
|
||||||
|
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
@ -222,7 +222,7 @@ minetest.register_node("digtron:auto_controller", {
|
|||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local controlling_coordinate = digtron.get_controlling_coordinate(pos, node.param2)
|
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 markerpos = {x=newpos.x, y=newpos.y, z=newpos.z}
|
||||||
local x_pos = math.floor((newpos[controlling_coordinate]+offset)/slope)*slope - offset
|
local x_pos = math.floor((newpos[controlling_coordinate]+offset)/slope)*slope - offset
|
||||||
markerpos[controlling_coordinate] = x_pos
|
markerpos[controlling_coordinate] = x_pos
|
||||||
@ -267,12 +267,12 @@ minetest.register_node("digtron:pusher", {
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
-- Aims in the +Z direction by default
|
-- Aims in the +Z direction by default
|
||||||
tiles = {
|
tiles = {
|
||||||
"digtron_plate.png^[transformR90^digtron_pusher_tint.png",
|
"digtron_plate.png^[transformR90^[colorize:" .. digtron.pusher_controller_colorize,
|
||||||
"digtron_plate.png^[transformR270^digtron_pusher_tint.png",
|
"digtron_plate.png^[transformR270^[colorize:" .. digtron.pusher_controller_colorize,
|
||||||
"digtron_plate.png^digtron_pusher_tint.png",
|
"digtron_plate.png^[colorize:" .. digtron.pusher_controller_colorize,
|
||||||
"digtron_plate.png^[transformR180^digtron_pusher_tint.png",
|
"digtron_plate.png^[transformR180^[colorize:" .. digtron.pusher_controller_colorize,
|
||||||
"digtron_plate.png^digtron_pusher_tint.png",
|
"digtron_plate.png^[colorize:" .. digtron.pusher_controller_colorize,
|
||||||
"digtron_plate.png^digtron_control.png^digtron_pusher_tint.png",
|
"digtron_plate.png^digtron_control.png^[colorize:" .. digtron.pusher_controller_colorize,
|
||||||
},
|
},
|
||||||
|
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
|
@ -136,7 +136,7 @@ minetest.register_node("digtron:intermittent_digger", {
|
|||||||
length = 1.0,
|
length = 1.0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"digtron_plate.png^digtron_intermittent_motor.png",
|
"digtron_plate.png^digtron_intermittent.png^digtron_motor.png",
|
||||||
},
|
},
|
||||||
|
|
||||||
on_construct = intermittent_on_construct,
|
on_construct = intermittent_on_construct,
|
||||||
@ -193,12 +193,12 @@ minetest.register_node("digtron:soft_digger", {
|
|||||||
|
|
||||||
-- Aims in the +Z direction by default
|
-- Aims in the +Z direction by default
|
||||||
tiles = {
|
tiles = {
|
||||||
"digtron_plate.png^[transformR90^[colorize:#88880030",
|
"digtron_plate.png^[transformR90^[colorize:" .. digtron.soft_digger_colorize,
|
||||||
"digtron_plate.png^[transformR270^[colorize:#88880030",
|
"digtron_plate.png^[transformR270^[colorize:" .. digtron.soft_digger_colorize,
|
||||||
"digtron_plate.png^[colorize:#88880030",
|
"digtron_plate.png^[colorize:" .. digtron.soft_digger_colorize,
|
||||||
"digtron_plate.png^[transformR180^[colorize:#88880030",
|
"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 = {
|
animation = {
|
||||||
type = "vertical_frames",
|
type = "vertical_frames",
|
||||||
aspect_w = 16,
|
aspect_w = 16,
|
||||||
@ -206,7 +206,7 @@ minetest.register_node("digtron:soft_digger", {
|
|||||||
length = 1.0,
|
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)
|
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
|
-- Aims in the +Z direction by default
|
||||||
tiles = {
|
tiles = {
|
||||||
"digtron_plate.png^[transformR90^[colorize:#88880030",
|
"digtron_plate.png^[transformR90^[colorize:" .. digtron.soft_digger_colorize,
|
||||||
"digtron_plate.png^[transformR270^[colorize:#88880030",
|
"digtron_plate.png^[transformR270^[colorize:" .. digtron.soft_digger_colorize,
|
||||||
"digtron_plate.png^[colorize:#88880030",
|
"digtron_plate.png^[colorize:" .. digtron.soft_digger_colorize,
|
||||||
"digtron_plate.png^[transformR180^[colorize:#88880030",
|
"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 = {
|
animation = {
|
||||||
type = "vertical_frames",
|
type = "vertical_frames",
|
||||||
aspect_w = 16,
|
aspect_w = 16,
|
||||||
@ -261,7 +261,7 @@ minetest.register_node("digtron:intermittent_soft_digger", {
|
|||||||
length = 1.0,
|
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,
|
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
|
-- Aims in the +Z and -Y direction by default
|
||||||
tiles = {
|
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 = {
|
animation = {
|
||||||
type = "vertical_frames",
|
type = "vertical_frames",
|
||||||
aspect_w = 16,
|
aspect_w = 16,
|
||||||
@ -408,10 +408,10 @@ minetest.register_node("digtron:dual_soft_digger", {
|
|||||||
length = 1.0,
|
length = 1.0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"digtron_plate.png^[colorize:#88880030",
|
"digtron_plate.png^[colorize:" .. digtron.soft_digger_colorize,
|
||||||
"digtron_plate.png^[transformR180^[colorize:#88880030",
|
"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 = {
|
animation = {
|
||||||
type = "vertical_frames",
|
type = "vertical_frames",
|
||||||
aspect_w = 16,
|
aspect_w = 16,
|
||||||
@ -419,7 +419,7 @@ minetest.register_node("digtron:dual_soft_digger", {
|
|||||||
length = 1.0,
|
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
|
-- returns fuel_cost, items_produced
|
||||||
|
@ -11,7 +11,14 @@ minetest.register_node("digtron:inventory", {
|
|||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
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)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
@ -73,7 +80,14 @@ minetest.register_node("digtron:fuelstore", {
|
|||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
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)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
@ -155,8 +169,13 @@ minetest.register_node("digtron:combined_storage", {
|
|||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
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)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
|
Before Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 574 B |
BIN
textures/digtron_crossbrace.png
Normal file
After Width: | Height: | Size: 605 B |
BIN
textures/digtron_flammable.png
Normal file
After Width: | Height: | Size: 351 B |
BIN
textures/digtron_flammable_small.png
Normal file
After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 581 B |
BIN
textures/digtron_intermittent.png
Normal file
After Width: | Height: | Size: 507 B |
Before Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 185 B |
BIN
textures/digtron_storage.png
Normal file
After Width: | Height: | Size: 399 B |