mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 05:01:41 -04:00
Add legacy compatibility
This commit is contained in:
parent
0cd3577481
commit
5c8b6c171a
2 changed files with 7 additions and 2 deletions
|
@ -3,6 +3,9 @@
|
|||
-- Load support for MT game translation.
|
||||
local S = minetest.get_translator("butterflies")
|
||||
|
||||
-- Legacy compatibility, when pointabilities don't exist, pointable is set to true.
|
||||
local pointable_compat = not minetest.features.item_specific_pointabilities
|
||||
|
||||
-- register butterflies
|
||||
local butter_list = {
|
||||
{"white", S("White Butterfly")},
|
||||
|
@ -33,7 +36,7 @@ for i in ipairs (butter_list) do
|
|||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
pointable = pointable_compat,
|
||||
groups = {catchable = 1},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
-- Load support for MT game translation.
|
||||
local S = minetest.get_translator("fireflies")
|
||||
|
||||
-- Legacy compatibility, when pointabilities don't exist, pointable is set to true.
|
||||
local pointable_compat = not minetest.features.item_specific_pointabilities
|
||||
|
||||
minetest.register_node("fireflies:firefly", {
|
||||
description = S("Firefly"),
|
||||
|
@ -23,7 +25,7 @@ minetest.register_node("fireflies:firefly", {
|
|||
sunlight_propagates = true,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
pointable = pointable_compat,
|
||||
groups = {catchable = 1},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
|
|
Loading…
Add table
Reference in a new issue