mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
Fix typo in survival form spec & create legacy file
(from MT_game)
This commit is contained in:
parent
e434845337
commit
0e05ac226a
@ -1,6 +1,7 @@
|
|||||||
-- aliases (Minetest 0.4 mod)
|
-- mods/default/aliases.lua
|
||||||
-- Provides alias for most default items
|
|
||||||
|
|
||||||
|
-- Aliases to support loading worlds using nodes following the old naming convention
|
||||||
|
-- These can also be helpful when using chat commands, for example /giveme
|
||||||
minetest.register_alias("stone", "default:stone")
|
minetest.register_alias("stone", "default:stone")
|
||||||
minetest.register_alias("stone_with_coal", "default:stone_with_coal")
|
minetest.register_alias("stone_with_coal", "default:stone_with_coal")
|
||||||
minetest.register_alias("stone_with_iron", "default:stone_with_iron")
|
minetest.register_alias("stone_with_iron", "default:stone_with_iron")
|
||||||
@ -65,3 +66,7 @@ minetest.register_alias("lump_of_iron", "default:iron_lump")
|
|||||||
minetest.register_alias("lump_of_clay", "default:clay_lump")
|
minetest.register_alias("lump_of_clay", "default:clay_lump")
|
||||||
minetest.register_alias("steel_ingot", "default:steel_ingot")
|
minetest.register_alias("steel_ingot", "default:steel_ingot")
|
||||||
minetest.register_alias("clay_brick", "default:clay_brick")
|
minetest.register_alias("clay_brick", "default:clay_brick")
|
||||||
|
minetest.register_alias("snow", "default:snow")
|
||||||
|
|
||||||
|
-- Mese now comes in the form of blocks, ore, crystal and fragments
|
||||||
|
minetest.register_alias("default:mese", "default:mese_block")
|
@ -129,22 +129,6 @@ function default.node_sound_glass_defaults(table)
|
|||||||
return table
|
return table
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Legacy:
|
|
||||||
function default.spawn_falling_node(p, nodename)
|
|
||||||
spawn_falling_node(p, nodename)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Horrible crap to support old code,
|
|
||||||
-- don't use this and never do what this does, it's completely wrong!
|
|
||||||
-- (more specifically, the client and the C++ code doesn't get the group).
|
|
||||||
function default.register_falling_node(nodename, texture)
|
|
||||||
minetest.log("error", debug.traceback())
|
|
||||||
minetest.log("error", "WARNING: default.register_falling_node is deprecated.")
|
|
||||||
if minetest.registered_nodes[nodename] then
|
|
||||||
minetest.registered_nodes[nodename].groups.falling_node = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Global callbacks
|
-- Global callbacks
|
||||||
--
|
--
|
||||||
|
@ -23,7 +23,7 @@ function default.get_hotbar_bg(x,y)
|
|||||||
return out
|
return out
|
||||||
end
|
end
|
||||||
|
|
||||||
default.gui_suvival_form = "size[8,8.5]"..
|
default.gui_survival_form = "size[8,8.5]"..
|
||||||
default.gui_slots ..
|
default.gui_slots ..
|
||||||
"list[current_player;main; 0, 4.25; 8, 4; ]" ..
|
"list[current_player;main; 0, 4.25; 8, 4; ]" ..
|
||||||
"list[current_player;craft; 1.75, 0.5; 3, 3; ]" ..
|
"list[current_player;craft; 1.75, 0.5; 3, 3; ]" ..
|
||||||
@ -43,6 +43,7 @@ dofile(minetest.get_modpath("default").."/mapgen.lua")
|
|||||||
dofile(minetest.get_modpath("default").."/player.lua")
|
dofile(minetest.get_modpath("default").."/player.lua")
|
||||||
dofile(minetest.get_modpath("default").."/trees.lua")
|
dofile(minetest.get_modpath("default").."/trees.lua")
|
||||||
dofile(minetest.get_modpath("default").."/aliases.lua")
|
dofile(minetest.get_modpath("default").."/aliases.lua")
|
||||||
|
dofile(minetest.get_modpath("default").."/legacy.lua")
|
||||||
|
|
||||||
-- Code below by Casimir.
|
-- Code below by Casimir.
|
||||||
|
|
||||||
|
25
minetestforfun_game/mods/default/legacy.lua
Normal file
25
minetestforfun_game/mods/default/legacy.lua
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
-- mods/default/Legacy.lua
|
||||||
|
|
||||||
|
-- Horrible crap to support old code,
|
||||||
|
-- don't use this and never do what this does, it's completely wrong!
|
||||||
|
-- (more specifically, the client and the C++ code doesn't get the group).
|
||||||
|
function default.register_falling_node(nodename, texture)
|
||||||
|
minetest.log("error", debug.traceback())
|
||||||
|
minetest.log("error", "WARNING: default.register_falling_node is deprecated.")
|
||||||
|
if minetest.registered_nodes[nodename] then
|
||||||
|
minetest.registered_nodes[nodename].groups.falling_node = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function default.spawn_falling_node(p, nodename)
|
||||||
|
spawn_falling_node(p, nodename)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Liquids
|
||||||
|
WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha
|
||||||
|
WATER_ALPHA = minetest.registered_nodes["default:water_source"].liquid_viscosity
|
||||||
|
WATER_ALPHA = minetest.registered_nodes["default:lava_source"].liquid_viscosity
|
||||||
|
LIGHT_MAX = default.LIGHT_MAX
|
||||||
|
|
||||||
|
-- Formspecs
|
||||||
|
default.gui_survival_form = default.gui_survival_form
|
@ -147,7 +147,7 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
if minetest.setting_getbool("creative_mode") then
|
if minetest.setting_getbool("creative_mode") then
|
||||||
-- creative.set_creative_formspec(player, 0, 1)
|
-- creative.set_creative_formspec(player, 0, 1)
|
||||||
else
|
else
|
||||||
player:set_inventory_formspec(default.gui_suvival_form)
|
player:set_inventory_formspec(default.gui_survival_form)
|
||||||
end
|
end
|
||||||
minetest.after(0.5,function()
|
minetest.after(0.5,function()
|
||||||
player:hud_set_hotbar_image("gui_hotbar.png")
|
player:hud_set_hotbar_image("gui_hotbar.png")
|
||||||
|
Loading…
Reference in New Issue
Block a user