Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to torch and delayer appearance #669

Merged
merged 9 commits into from
Jun 8, 2024
53 changes: 23 additions & 30 deletions mesecons_delayer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,21 @@ local delaytime = { 0.1, 0.3, 0.5, 1.0 }

for i = 1, 4 do

local boxes = {
{ -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab

{ -2/16, -7/16, -4/16, 2/16, -26/64, -3/16 }, -- the jeweled "on" indicator
{ -3/16, -7/16, -3/16, 3/16, -26/64, -2/16 },
{ -4/16, -7/16, -2/16, 4/16, -26/64, 2/16 },
{ -3/16, -7/16, 2/16, 3/16, -26/64, 3/16 },
{ -2/16, -7/16, 3/16, 2/16, -26/64, 4/16 },

{ -6/16, -7/16, -6/16, -4/16, -27/64, -4/16 }, -- the timer indicator
{ -8/16, -8/16, -1/16, -6/16, -7/16, 1/16 }, -- the two wire stubs
{ 6/16, -8/16, -1/16, 8/16, -7/16, 1/16 }
}

-- Delayer definition defaults
local def = {
drawtype = "nodebox",
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or nil,
walkable = true,
selection_box = {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 },
fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 },
},
node_box = {
type = "fixed",
fixed = boxes
fixed = {
{ -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab
{ -6/16, -7/16, -6/16, 6/16, -6/16, 6/16 }
},
},
paramtype = "light",
paramtype2 = "facedir",
Expand All @@ -74,16 +63,17 @@ end

local off_state = {
description = S("Delayer"),
inventory_image = "jeija_gate_off.png^jeija_delayer.png",
wield_image = "jeija_gate_off.png^jeija_delayer.png",
tiles = {
"mesecons_delayer_off_"..tostring(i)..".png",
"mesecons_delayer_bottom.png",
"mesecons_delayer_ends_off.png",
"mesecons_delayer_ends_off.png",
"mesecons_delayer_sides_off.png",
"mesecons_delayer_sides_off.png"
"jeija_microcontroller_bottom.png^jeija_gate_output_off.png^jeija_gate_off.png^"..
"jeija_delayer.png^mesecons_delayer_"..tostring(i)..".png",
"jeija_microcontroller_bottom.png^jeija_gate_output_off.png",
"jeija_gate_side.png^jeija_gate_side_output_off.png",
"jeija_gate_side.png",
"jeija_gate_side.png",
"jeija_gate_side.png",
},
inventory_image = "mesecons_delayer_off_1.png",
wield_image = "mesecons_delayer_off_1.png",
groups = off_groups,
on_punch = function(pos, node, puncher)
if minetest.is_protected(pos, puncher and puncher:get_player_name() or "") then
Expand Down Expand Up @@ -117,13 +107,16 @@ minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), off_state)
-- Activated delayer definition defaults
local on_state = {
description = S("You hacker you"),
inventory_image = "jeija_gate_on.png^jeija_delayer.png",
wield_image = "jeija_gate_on.png^jeija_delayer.png",
tiles = {
"mesecons_delayer_on_"..tostring(i)..".png",
"mesecons_delayer_bottom.png",
"mesecons_delayer_ends_on.png",
"mesecons_delayer_ends_on.png",
"mesecons_delayer_sides_on.png",
"mesecons_delayer_sides_on.png"
"jeija_microcontroller_bottom.png^jeija_gate_output_on.png^jeija_gate_on.png^"..
"jeija_delayer.png^mesecons_delayer_"..tostring(i)..".png",
"jeija_microcontroller_bottom.png^jeija_gate_output_on.png",
"jeija_gate_side.png^jeija_gate_side_output_on.png",
"jeija_gate_side.png",
"jeija_gate_side.png",
"jeija_gate_side.png",
},
groups = {bendy = 2, snappy = 1, dig_immediate = 2, not_in_creative_inventory = 1},
on_punch = function(pos, node, puncher)
Expand Down
Binary file added mesecons_delayer/textures/jeija_delayer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mesecons_delayer/textures/mesecons_delayer_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mesecons_delayer/textures/mesecons_delayer_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mesecons_delayer/textures/mesecons_delayer_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mesecons_delayer/textures/mesecons_delayer_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed mesecons_delayer/textures/mesecons_delayer_bottom.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_ends_off.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_ends_on.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_off_1.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_off_2.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_off_3.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_off_4.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_on_1.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_on_2.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_on_3.png
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_on_4.png
Binary file not shown.
Binary file not shown.
Binary file removed mesecons_delayer/textures/mesecons_delayer_sides_on.png
Binary file not shown.
8 changes: 4 additions & 4 deletions mesecons_fpga/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ plg.register_nodes = function(template)

-- build top texture string
local texture = "jeija_fpga_top.png"
if a == 1 then texture = texture .. "^jeija_microcontroller_LED_A.png" end
if b == 1 then texture = texture .. "^jeija_microcontroller_LED_B.png" end
if c == 1 then texture = texture .. "^jeija_microcontroller_LED_C.png" end
if d == 1 then texture = texture .. "^jeija_microcontroller_LED_D.png" end
if a == 1 then texture = texture .. "^jeija_luacontroller_LED_A.png" end
if b == 1 then texture = texture .. "^jeija_luacontroller_LED_B.png" end
if c == 1 then texture = texture .. "^jeija_luacontroller_LED_C.png" end
if d == 1 then texture = texture .. "^jeija_luacontroller_LED_D.png" end
ndef.tiles[1] = texture
ndef.inventory_image = texture

Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
8 changes: 4 additions & 4 deletions mesecons_microcontroller/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ for d = 0, 1 do
local nodename = "mesecons_microcontroller:microcontroller"..tostring(d)..tostring(c)..tostring(b)..tostring(a)
local top = "jeija_microcontroller_top.png"
if tostring(a) == "1" then
top = top.."^jeija_microcontroller_LED_A.png"
top = top.."^jeija_luacontroller_LED_A.png"
end
if tostring(b) == "1" then
top = top.."^jeija_microcontroller_LED_B.png"
top = top.."^jeija_luacontroller_LED_B.png"
end
if tostring(c) == "1" then
top = top.."^jeija_microcontroller_LED_C.png"
top = top.."^jeija_luacontroller_LED_C.png"
end
if tostring(d) == "1" then
top = top.."^jeija_microcontroller_LED_D.png"
top = top.."^jeija_luacontroller_LED_D.png"
end
local groups
if tostring(d)..tostring(c)..tostring(b)..tostring(a) ~= "0000" then
Expand Down
36 changes: 18 additions & 18 deletions mesecons_pistons/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
description = S("Piston"),
tiles = {
"mesecons_piston_top.png",
"mesecons_piston_bottom.png",
"mesecons_piston_left.png",
"mesecons_piston_right.png",
"mesecons_piston_top.png^[transform2",
"mesecons_piston_top.png^[transform3",
"mesecons_piston_top.png^[transform1",
"mesecons_piston_back.png",
"mesecons_piston_pusher_front.png"
},
Expand All @@ -296,9 +296,9 @@ minetest.register_node("mesecons_pistons:piston_normal_on", {
drawtype = "nodebox",
tiles = {
"mesecons_piston_top.png",
"mesecons_piston_bottom.png",
"mesecons_piston_left.png",
"mesecons_piston_right.png",
"mesecons_piston_top.png^[transform2",
"mesecons_piston_top.png^[transform3",
"mesecons_piston_top.png^[transform1",
"mesecons_piston_back.png",
"mesecons_piston_on_front.png"
},
Expand All @@ -325,9 +325,9 @@ minetest.register_node("mesecons_pistons:piston_pusher_normal", {
drawtype = "nodebox",
tiles = {
"mesecons_piston_pusher_top.png",
"mesecons_piston_pusher_bottom.png",
"mesecons_piston_pusher_left.png",
"mesecons_piston_pusher_right.png",
"mesecons_piston_pusher_top.png^[transform2",
"mesecons_piston_pusher_top.png^[transform3",
"mesecons_piston_pusher_top.png^[transform1",
"mesecons_piston_pusher_back.png",
"mesecons_piston_pusher_front.png"
},
Expand All @@ -349,9 +349,9 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
description = S("Sticky Piston"),
tiles = {
"mesecons_piston_top.png",
"mesecons_piston_bottom.png",
"mesecons_piston_left.png",
"mesecons_piston_right.png",
"mesecons_piston_top.png^[transform2",
"mesecons_piston_top.png^[transform3",
"mesecons_piston_top.png^[transform1",
"mesecons_piston_back.png",
"mesecons_piston_pusher_front_sticky.png"
},
Expand All @@ -375,9 +375,9 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
drawtype = "nodebox",
tiles = {
"mesecons_piston_top.png",
"mesecons_piston_bottom.png",
"mesecons_piston_left.png",
"mesecons_piston_right.png",
"mesecons_piston_top.png^[transform2",
"mesecons_piston_top.png^[transform3",
"mesecons_piston_top.png^[transform1",
"mesecons_piston_back.png",
"mesecons_piston_on_front.png"
},
Expand All @@ -404,9 +404,9 @@ minetest.register_node("mesecons_pistons:piston_pusher_sticky", {
drawtype = "nodebox",
tiles = {
"mesecons_piston_pusher_top.png",
"mesecons_piston_pusher_bottom.png",
"mesecons_piston_pusher_left.png",
"mesecons_piston_pusher_right.png",
"mesecons_piston_pusher_top.png^[transform2",
"mesecons_piston_pusher_top.png^[transform3",
"mesecons_piston_pusher_top.png^[transform1",
"mesecons_piston_pusher_back.png",
"mesecons_piston_pusher_front_sticky.png"
},
Expand Down
Binary file removed mesecons_pistons/textures/mesecons_piston_bottom.png
Diff not rendered.
Binary file removed mesecons_pistons/textures/mesecons_piston_left.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed mesecons_pistons/textures/mesecons_piston_right.png
Diff not rendered.
8 changes: 4 additions & 4 deletions mesecons_torch/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ local torch_selectionbox =
}

minetest.register_node("mesecons_torch:mesecon_torch_off", {
drawtype = "torchlike",
tiles = {"jeija_torches_off.png", "jeija_torches_off_ceiling.png", "jeija_torches_off_side.png"},
drawtype = "plantlike",
tiles = {"jeija_torches_off.png"},
inventory_image = "jeija_torches_off.png",
paramtype = "light",
is_ground_content = false,
Expand All @@ -75,8 +75,8 @@ minetest.register_node("mesecons_torch:mesecon_torch_off", {
})

minetest.register_node("mesecons_torch:mesecon_torch_on", {
drawtype = "torchlike",
tiles = {"jeija_torches_on.png", "jeija_torches_on_ceiling.png", "jeija_torches_on_side.png"},
drawtype = "plantlike",
tiles = {"jeija_torches_on.png"},
inventory_image = "jeija_torches_on.png",
wield_image = "jeija_torches_on.png",
paramtype = "light",
Expand Down
Binary file removed mesecons_torch/textures/jeija_torches_off_ceiling.png
Diff not rendered.
Binary file removed mesecons_torch/textures/jeija_torches_off_side.png
Diff not rendered.
Binary file removed mesecons_torch/textures/jeija_torches_on_ceiling.png
Diff not rendered.
Binary file removed mesecons_torch/textures/jeija_torches_on_side.png
Diff not rendered.