name changing

This commit is contained in:
Alexsandro Percy 2021-05-19 15:01:39 -03:00
parent e1767250b0
commit 551ae52aac
11 changed files with 23 additions and 23 deletions

View File

@ -1,2 +1,2 @@
# light_systems # airutils
Airport Lighting Systems for Minetest Airport Utils for Minetest

View File

@ -1 +1 @@
Airport Lighting Systems for Minetest Airport Utils for Minetest

View File

@ -1,11 +1,11 @@
-- Minetest 5.4.1 : light_systems -- Minetest 5.4.1 : airutils
light_systems = {} airutils = {}
function light_systems.PAPIplace(player,pos) function airutils.PAPIplace(player,pos)
local dir = minetest.dir_to_facedir(player:get_look_dir()) local dir = minetest.dir_to_facedir(player:get_look_dir())
local pos1 = vector.new(pos) local pos1 = vector.new(pos)
core.set_node(pos, {name="light_systems:papi", param2=dir}) core.set_node(pos, {name="airutils:papi", param2=dir})
local player_name = player:get_player_name() local player_name = player:get_player_name()
local meta = core.get_meta(pos) local meta = core.get_meta(pos)
meta:set_string("infotext", "PAPI\rOwned by: "..player_name) meta:set_string("infotext", "PAPI\rOwned by: "..player_name)
@ -14,7 +14,7 @@ function light_systems.PAPIplace(player,pos)
return true return true
end end
function light_systems.remove(pos) function airutils.remove(pos)
local meta = core.get_meta(pos) local meta = core.get_meta(pos)
if meta:get_string("dont_destroy") == "true" then if meta:get_string("dont_destroy") == "true" then
-- when swapping it -- when swapping it
@ -22,32 +22,32 @@ function light_systems.remove(pos)
end end
end end
function light_systems.canDig(pos, player) function airutils.canDig(pos, player)
local meta = core.get_meta(pos) local meta = core.get_meta(pos)
return meta:get_string("dont_destroy") ~= "true" return meta:get_string("dont_destroy") ~= "true"
and player:get_player_name() == meta:get_string("owner") and player:get_player_name() == meta:get_string("owner")
end end
light_systems.collision_box = { airutils.collision_box = {
type = "fixed", type = "fixed",
fixed={{-0.5,-0.5,-0.5,0.5,-0.42,0.5},}, fixed={{-0.5,-0.5,-0.5,0.5,-0.42,0.5},},
} }
light_systems.selection_box = { airutils.selection_box = {
type = "fixed", type = "fixed",
fixed={{-0.5,-0.5,-0.5,0.5,1.5,0.5},}, fixed={{-0.5,-0.5,-0.5,0.5,1.5,0.5},},
} }
light_systems.groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2} airutils.groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}
minetest.register_node("light_systems:papi",{ minetest.register_node("airutils:papi",{
description = "PAPI", description = "PAPI",
inventory_image = "papi.png", inventory_image = "papi.png",
wield_image = "papi.png", wield_image = "papi.png",
tiles = {"light_systems_black.png", "light_systems_u_black.png", "light_systems_white.png", tiles = {"airutils_black.png", "airutils_u_black.png", "airutils_white.png",
"light_systems_metal.png", {name = "light_systems_red.png", backface_culling = true},}, "airutils_metal.png", {name = "airutils_red.png", backface_culling = true},},
groups = light_systems.groups, groups = airutils.groups,
paramtype2 = "facedir", paramtype2 = "facedir",
paramtype = "light", paramtype = "light",
drawtype = "mesh", drawtype = "mesh",
@ -55,21 +55,21 @@ minetest.register_node("light_systems:papi",{
visual_scale = 1.0, visual_scale = 1.0,
light_source = 13, light_source = 13,
backface_culling = true, backface_culling = true,
selection_box = light_systems.selection_box, selection_box = airutils.selection_box,
collision_box = light_systems.collision_box, collision_box = airutils.collision_box,
can_dig = light_systems.canDig, can_dig = airutils.canDig,
_color = "", _color = "",
on_destruct = light_systems.remove, on_destruct = airutils.remove,
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.above local pos = pointed_thing.above
if light_systems.PAPIplace(placer,pos)==true then if airutils.PAPIplace(placer,pos)==true then
itemstack:take_item(1) itemstack:take_item(1)
return itemstack return itemstack
else else
return return
end end
end, end,
--on_rightclick=light_systems.gateFormspecHandler, --on_rightclick=airutils.gateFormspecHandler,
on_punch = function(pos, node, puncher, pointed_thing) on_punch = function(pos, node, puncher, pointed_thing)
local player_name = puncher:get_player_name() local player_name = puncher:get_player_name()
local meta = core.get_meta(pos) local meta = core.get_meta(pos)

View File

@ -1 +1 @@
name = light_systems name = airutils

View File

Before

Width:  |  Height:  |  Size: 382 B

After

Width:  |  Height:  |  Size: 382 B

View File

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 114 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB