initial_properties upadate
This commit is contained in:
parent
c12b1f5245
commit
b02e768555
2 changed files with 14 additions and 22 deletions
23
init.lua
23
init.lua
|
|
@ -12,21 +12,7 @@ local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||||
local F = minetest.formspec_escape
|
local F = minetest.formspec_escape
|
||||||
|
|
||||||
-- Translation support
|
-- Translation support
|
||||||
local S
|
local S = minetest.get_translator("protector")
|
||||||
|
|
||||||
if minetest.get_translator then
|
|
||||||
S = minetest.get_translator("protector")
|
|
||||||
else
|
|
||||||
S = function(str, ...)
|
|
||||||
|
|
||||||
local args = {...}
|
|
||||||
|
|
||||||
return str:gsub("@%d+", function(match)
|
|
||||||
return args[tonumber(match:sub(2))]
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- Load support for factions
|
-- Load support for factions
|
||||||
local factions_available = minetest.global_exists("factions")
|
local factions_available = minetest.global_exists("factions")
|
||||||
|
|
@ -756,14 +742,19 @@ end)
|
||||||
|
|
||||||
-- display entity shown when protector node is punched
|
-- display entity shown when protector node is punched
|
||||||
minetest.register_entity("protector:display", {
|
minetest.register_entity("protector:display", {
|
||||||
|
|
||||||
|
initial_properties = {
|
||||||
|
|
||||||
physical = false,
|
physical = false,
|
||||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
visual = "wielditem",
|
visual = "wielditem",
|
||||||
-- wielditem seems to be scaled to 1.5 times original node size
|
-- wielditem seems to be scaled to 1.5 times original node size
|
||||||
visual_size = {x = 0.67, y = 0.67},
|
visual_size = {x = 0.67, y = 0.67},
|
||||||
textures = {"protector:display_node"},
|
textures = {"protector:display_node"},
|
||||||
|
glow = 10
|
||||||
|
},
|
||||||
|
|
||||||
timer = 0,
|
timer = 0,
|
||||||
glow = 10,
|
|
||||||
|
|
||||||
on_step = function(self, dtime)
|
on_step = function(self, dtime)
|
||||||
|
|
||||||
|
|
|
||||||
1
mod.conf
1
mod.conf
|
|
@ -1,3 +1,4 @@
|
||||||
name = protector
|
name = protector
|
||||||
description = Lets players craft special blocks to protect their builds or disable PVP in areas.
|
description = Lets players craft special blocks to protect their builds or disable PVP in areas.
|
||||||
optional_depends = default, lucky_block, mesecons_mvps, playerfactions, mcl_core, mcl_formspec
|
optional_depends = default, lucky_block, mesecons_mvps, playerfactions, mcl_core, mcl_formspec
|
||||||
|
min_minetest_version = 5.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue