mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-18 02:45:21 +02:00
Tool specific pointing and blocking pointable type (#13992)
This commit is contained in:
23
games/devtest/mods/testentities/pointable.lua
Normal file
23
games/devtest/mods/testentities/pointable.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
-- Pointability test Entities
|
||||
|
||||
-- Register wrapper for compactness
|
||||
local function register_pointable_testentity(name, pointable)
|
||||
local texture = "testnodes_"..name..".png"
|
||||
minetest.register_entity("testentities:"..name, {
|
||||
initial_properties = {
|
||||
visual = "cube",
|
||||
visual_size = {x = 0.6, y = 0.6, z = 0.6},
|
||||
textures = {
|
||||
texture, texture, texture, texture, texture, texture
|
||||
},
|
||||
pointable = pointable,
|
||||
},
|
||||
on_activate = function(self)
|
||||
self.object:set_armor_groups({[name.."_test"] = 1})
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
register_pointable_testentity("pointable", true)
|
||||
register_pointable_testentity("not_pointable", false)
|
||||
register_pointable_testentity("blocking_pointable", "blocking")
|
Reference in New Issue
Block a user