1
0
mirror of https://github.com/D00Med/scifi_nodes.git synced 2025-07-19 00:10:21 +02:00

22 Commits

Author SHA1 Message Date
e7864a4a86 Merge remote-tracking branch 'upstream/master' 2023-06-07 22:31:17 +02:00
89f825d4e6 fix deprecated minetest.env calls 2023-02-17 08:54:52 +01:00
c649c290ab Merge remote-tracking branch 'upstream/master' 2022-06-25 16:54:20 +02:00
4f2d2a304f Merge remote-tracking branch 'upstream/master' 2022-05-27 18:51:16 +02:00
8816db8ecf Merge remote-tracking branch 'upstream/master' 2021-11-01 10:41:33 +01:00
5b903a6e78 Merge remote-tracking branch 'upstream/master' 2021-10-04 21:49:01 +02:00
eb231d7ca7 Merge remote-tracking branch 'upstream/master' 2021-08-31 19:59:22 +02:00
2fd4de11c0 Merge remote-tracking branch 'upstream/master' 2021-08-16 18:18:21 +02:00
b88b7349a5 Merge remote-tracking branch 'upstream/master' 2021-06-20 17:30:14 +02:00
c30ae4b3bd Merge remote-tracking branch 'upstream/master' 2021-05-09 21:44:34 +02:00
6cf45fcd43 Merge remote-tracking branch 'upstream/master' 2021-03-25 21:58:42 +01:00
1ded358e04 Merge branch 'github' 2021-03-20 13:38:15 +01:00
ecfaa4714a Fix things to avoid warnings about use_texture_alpha
And optimize textures with optipng
2021-03-20 13:33:39 +01:00
c341cb8a20 Merge remote-tracking branch 'upstream/master' 2021-01-29 17:43:56 +01:00
d66e04f9b1 Merge remote-tracking branch 'upstream/master' 2020-12-24 21:10:26 +01:00
d3d6a7bf79 Merge remote-tracking branch 'upstream/master' 2020-12-18 12:21:17 +01:00
e34fdde795 Merge remote-tracking branch 'upstream/master' 2020-12-15 23:41:17 +01:00
1993068ed1 Merge remote-tracking branch 'upstream/master' 2020-11-12 22:04:59 +01:00
436f51ab0d Merge remote-tracking branch 'upstream/master' 2020-11-10 19:59:40 +01:00
749d59a530 Merge remote-tracking branch 'upstream/master' 2020-09-13 12:28:42 +02:00
bd58dbc48b Merge remote-tracking branch 'upstream/master' 2020-07-23 11:42:19 +02:00
4eaba4f6e1 Adds loading message in the Action Log 2020-07-21 11:52:47 +02:00
8 changed files with 29 additions and 85 deletions

View File

@ -33,12 +33,9 @@ dofile(MP.."/octagon_panes.lua")
dofile(MP.."/forcefield.lua")
dofile(MP.."/crafts.lua")
if minetest.get_modpath("unifieddyes") then
-- register colored nodes
dofile(MP.."/nodes_colored.lua")
end
if minetest.get_modpath("letters") then
-- register letter nodes
dofile(MP.."/letters.lua")
end
end
minetest.log("action", "[scifi_nodes] loaded.")

View File

@ -131,8 +131,8 @@ minetest.register_abm({
nodenames = {"scifi_nodes:egg"},
interval = 30, chance = 10,
action = function(pos, node, _, _)
minetest.env:add_entity(pos, "scifi_mobs:xenomorph")
minetest.env:remove_node(pos)
minetest.add_entity(pos, "scifi_mobs:xenomorph")
minetest.remove_node(pos)
end
})
end
@ -189,12 +189,12 @@ minetest.register_node("scifi_nodes:pad", {
if minetest.get_node({x=ppos.x, y=ppos.y, z=ppos.z}).name == "scifi_nodes:pad" then
clicker:setpos(position2)
end
local objs = minetest.env:get_objects_inside_radius(pos, 3)
local objs = minetest.get_objects_inside_radius(pos, 3)
for _, obj in pairs(objs) do
if obj:get_luaentity() and not obj:is_player() then
if obj:get_luaentity().name == "__builtin:item" then
local item1 = obj:get_luaentity().itemstring
local obj2 = minetest.env:add_entity(position2, "__builtin:item")
local obj2 = minetest.add_entity(position2, "__builtin:item")
obj2:get_luaentity():set_item(item1)
obj:remove()
end
@ -223,12 +223,12 @@ minetest.register_node("scifi_nodes:pad", {
if minetest.get_node({x=ppos.x, y=ppos.y, z=ppos.z}).name == "scifi_nodes:pad" then
clicker:setpos(position1)
end
local objs = minetest.env:get_objects_inside_radius(pos, 3)
local objs = minetest.get_objects_inside_radius(pos, 3)
for _, obj in pairs(objs) do
if obj:get_luaentity() and not obj:is_player() then
if obj:get_luaentity().name == "__builtin:item" then
local item1 = obj:get_luaentity().itemstring
local obj2 = minetest.env:add_entity(position1, "__builtin:item")
local obj2 = minetest.add_entity(position1, "__builtin:item")
obj2:get_luaentity():set_item(item1)
obj:remove()
end

View File

@ -642,13 +642,28 @@ for _, row in ipairs(nodetypes) do
node_def.palette = "unifieddyes_palette_extended.png"
node_def.groups.ud_param2_colorable = 1
node_def.airbrush_replacement_node = "scifi_nodes:"..name.."_colored"
-- NOTE: about the "Node scifi_nodes:xxx has a palette, but not a suitable paramtype2" warning:
-- inserting "color" here (which would be the proper type) results in wrong
-- colored original nodes due to existing param2type = "facedir"
-- a migration lbm for those might be the proper solution but has to be thoroughly tested first
node_def.paramtype2 = nil
end
-- register node
minetest.register_node("scifi_nodes:"..name, node_def)
if is_colorable and has_unifieddyes_mod then
-- register colored node
minetest.register_node("scifi_nodes:"..name.."_colored", {
description = desc,
tiles = {"scifi_nodes_"..name..".png"},
groups = {
cracky = 1,
ud_param2_colorable = 1,
not_in_creative_inventory = 1
},
palette = "unifieddyes_palette_extended.png",
paramtype = "light",
paramtype2 = "color",
light_source = light,
sounds = scifi_nodes.node_sound_glass_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig
})
end
end

View File

@ -1,68 +0,0 @@
minetest.register_node("scifi_nodes:whiteoct_colored", {
description = "white octagon",
tiles = {"scifi_nodes_super_white.png"},
overlay_tiles = {{ name = "scifi_nodes_whiteoct_overlay.png", color = "white" }},
groups = {
cracky = 1,
ud_param2_colorable = 1,
not_in_creative_inventory = 1
},
palette = "unifieddyes_palette_extended.png",
paramtype = "light",
paramtype2 = "color",
sounds = scifi_nodes.node_sound_glass_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig
})
minetest.register_node("scifi_nodes:whitetile_colored", {
description = "white tile2",
tiles = {"scifi_nodes_whitetile.png"},
overlay_tiles = {{ name = "scifi_nodes_whitetile_overlay.png", color = "white" }},
groups = {
cracky = 1,
ud_param2_colorable = 1,
not_in_creative_inventory = 1
},
palette = "unifieddyes_palette_extended.png",
paramtype = "light",
paramtype2 = "color",
sounds = scifi_nodes.node_sound_glass_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig
})
minetest.register_node("scifi_nodes:white_colored", {
description = "plastic wall",
tiles = {"scifi_nodes_white.png"},
-- NOTE: colorless overlay not enabled for the plastic wall node, doesn't look that natural
-- overlay_tiles = {{ name = "scifi_nodes_white_overlay.png", color = "white" }},
groups = {
cracky = 1,
ud_param2_colorable = 1,
not_in_creative_inventory = 1
},
palette = "unifieddyes_palette_extended.png",
paramtype = "light",
paramtype2 = "color",
sounds = scifi_nodes.node_sound_glass_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig
})
minetest.register_node("scifi_nodes:white2_colored", {
description = "plastic",
tiles = {"scifi_nodes_white2.png"},
groups = {
cracky = 1,
ud_param2_colorable = 1,
not_in_creative_inventory = 1
},
palette = "unifieddyes_palette_extended.png",
paramtype = "light",
paramtype2 = "color",
sounds = scifi_nodes.node_sound_glass_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B