1 Commits

Author SHA1 Message Date
c99ca991cf add forcefield node 2022-12-04 17:26:06 +01:00
5 changed files with 9 additions and 31 deletions

View File

@ -21,6 +21,6 @@ read_globals = {
"screwdriver",
"minetest",
"mesecon",
"unifieddyes",
"letters"
"unifieddyes"
}

View File

@ -32,10 +32,3 @@ dofile(MP.."/models.lua")
dofile(MP.."/octagon_panes.lua")
dofile(MP.."/forcefield.lua")
dofile(MP.."/crafts.lua")
if minetest.get_modpath("letters") then
-- register letter nodes
dofile(MP.."/letters.lua")
end
minetest.log("action", "[scifi_nodes] loaded.")

View File

@ -1,11 +0,0 @@
letters.register_letters("scifi_nodes", "white2", "scifi_nodes:white2", "Plastic", "scifi_nodes_white2.png", {
paramtype2 = "colorwallmounted",
palette = "unifieddyes_palette_colorwallmounted.png",
groups = {
ud_param2_colorable = 1,
not_in_creative_inventory = 1,
not_in_craft_guide = 1,
oddly_breakable_by_hand = 1,
attached_node = 1
}
})

View File

@ -11,6 +11,5 @@ mesecons_torch,
mesecons_receiver,
basic_materials,
dye,
unifieddyes,
letters
unifieddyes
"""

View File

@ -131,8 +131,8 @@ minetest.register_abm({
nodenames = {"scifi_nodes:egg"},
interval = 30, chance = 10,
action = function(pos, node, _, _)
minetest.add_entity(pos, "scifi_mobs:xenomorph")
minetest.remove_node(pos)
minetest.env:add_entity(pos, "scifi_mobs:xenomorph")
minetest.env: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.get_objects_inside_radius(pos, 3)
local objs = minetest.env: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.add_entity(position2, "__builtin:item")
local obj2 = minetest.env: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.get_objects_inside_radius(pos, 3)
local objs = minetest.env: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.add_entity(position1, "__builtin:item")
local obj2 = minetest.env:add_entity(position1, "__builtin:item")
obj2:get_luaentity():set_item(item1)
obj:remove()
end
@ -543,7 +543,6 @@ minetest.register_node("scifi_nodes:lightbars", {
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
use_texture_alpha = "blend",
light_source = minetest.LIGHT_MAX,
node_box = {
@ -570,7 +569,6 @@ tiles = {{
drawtype = "nodebox",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
@ -591,7 +589,6 @@ tiles = {
drawtype = "nodebox",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {