mirror of
http://repo.or.cz/minetest_pyramids/tsm_pyramids.git
synced 2024-12-22 15:30:19 +01:00
Add partial backwards-compability
This commit is contained in:
parent
281eae639e
commit
7568a2b3fa
@ -2,11 +2,14 @@
|
||||
|
||||
* Version: 0.6
|
||||
|
||||
## Using the mod
|
||||
## Description
|
||||
This mod adds randomly spawned pyramids in deserts. The pyramids are very rare
|
||||
and contain a chest with stuff. Also there are mummys inside, which attack
|
||||
the player if found in their radius.
|
||||
|
||||
## For users of the old `pyramids` mod
|
||||
This mod is a fork of the old `pyramids` mod by BlockMen and intended to be a direct
|
||||
(but unofficial) successor of it.
|
||||
|
||||
## Licensing
|
||||
This program is free software. It comes without any warranty, to
|
||||
|
14
init.lua
14
init.lua
@ -175,3 +175,17 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
minetest.after(0.8,make,p2)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Add backwards-compability for nodes from the original pyramids mod
|
||||
if minetest.get_modpath("pyramids") == nil then
|
||||
-- Nodes
|
||||
minetest.register_alias("pyramids:trap", "tsm_pyramids:trap")
|
||||
minetest.register_alias("pyramids:trap_2", "tsm_pyramids:trap_2")
|
||||
minetest.register_alias("pyramids:deco_stone1", "tsm_pyramids:deco_stone1")
|
||||
minetest.register_alias("pyramids:deco_stone2", "tsm_pyramids:deco_stone2")
|
||||
minetest.register_alias("pyramids:deco_stone3", "tsm_pyramids:deco_stone3")
|
||||
minetest.register_alias("pyramids:spawner_mummy", "tsm_pyramids:spawner_mummy")
|
||||
|
||||
-- FIXME: Entities are currently NOT backwards-compatible
|
||||
-- TODO: Update README when full backwards-compability is achieved
|
||||
end
|
||||
|
@ -375,7 +375,9 @@ if not minetest.setting_getbool("only_peaceful_mobs") then
|
||||
if obj:is_player() then
|
||||
player_near = true
|
||||
else
|
||||
if obj:get_luaentity().mob_name == "mummy" then mobs = mobs + 1 end
|
||||
if obj:get_luaentity() and obj:get_luaentity().mob_name == "mummy" then
|
||||
mobs = mobs + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
if player_near then
|
||||
|
Loading…
Reference in New Issue
Block a user