Change shortname to “tsm_pyramids”

This commit is contained in:
Wuzzy 2014-10-04 08:38:08 +02:00
parent fd0d11df1c
commit 5f1bbb097a
14 changed files with 33 additions and 33 deletions

View File

@ -14,9 +14,9 @@ License of mesh model: WTFPL
License of textures
-------------------
-pyramids_eye.png by bas080, CC-BY-SA 3.0
-pyramids_men.png by bas080, CC-BY-SA 3.0
-pyramids_sun.png by bas080, CC-BY-SA 3.0
-tsm_pyramids_eye.png by bas080, CC-BY-SA 3.0
-tsm_pyramids_men.png by bas080, CC-BY-SA 3.0
-tsm_pyramids_sun.png by bas080, CC-BY-SA 3.0
all other: BlockMen, WTFPL
@ -40,4 +40,4 @@ Using the mod:
--------------
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.
Also there are mummys inside, which attack the player if found in their radius.

View File

@ -1,8 +1,8 @@
pyramids = {}
dofile(minetest.get_modpath("pyramids").."/mummy.lua")
dofile(minetest.get_modpath("pyramids").."/nodes.lua")
dofile(minetest.get_modpath("pyramids").."/room.lua")
dofile(minetest.get_modpath("tsm_pyramids").."/mummy.lua")
dofile(minetest.get_modpath("tsm_pyramids").."/nodes.lua")
dofile(minetest.get_modpath("tsm_pyramids").."/room.lua")
local chest_stuff = {
{name="default:apple", max = 3},
@ -36,7 +36,7 @@ function pyramids.fill_chest(pos)
end
local function add_spawner(pos)
minetest.set_node(pos, {name="pyramids:spawner_mummy"})
minetest.set_node(pos, {name="tsm_pyramids:spawner_mummy"})
if not minetest.setting_getbool("only_peaceful_mobs") then pyramids.spawn_mummy({x=pos.x,y=pos.y,z=pos.z-2},2) end
end

View File

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -7,8 +7,8 @@ local mummy_animation_speed = 10
local mummy_animation_blend = 0
-- Default player appearance
local mummy_mesh = "pyramids_mummy.x"
local mummy_texture = {"pyramids_mummy.png"}
local mummy_mesh = "tsm_pyramids_mummy.x"
local mummy_texture = {"tsm_pyramids_mummy.png"}
local mummy_hp = 20
local mummy_drop = "default:papyrus"
@ -49,7 +49,7 @@ local ANIM_MINE = 6
function hit(self)
prop = {
mesh = mummy_mesh,
textures = {"pyramids_mummy.png^pyramids_hit.png"},
textures = {"tsm_pyramids_mummy.png^tsm_pyramids_hit.png"},
}
self.object:set_properties(prop)
minetest.after(0.4, function()
@ -120,7 +120,7 @@ spawner_DEF.on_step = function(self, dtime)
self.timer = self.timer + 0.01
local n = minetest.get_node_or_nil(self.object:getpos())
if self.timer > 1 then
if n and n.name and n.name ~= "pyramids:spawner_mummy" then
if n and n.name and n.name ~= "tsm_pyramids:spawner_mummy" then
self.object:remove()
end
end
@ -334,20 +334,20 @@ MUMMY_DEF.on_step = function(self, dtime)
end
end
minetest.register_entity("pyramids:mummy", MUMMY_DEF)
minetest.register_entity("pyramids:mummy_spawner", spawner_DEF)
minetest.register_entity("tsm_pyramids:mummy", MUMMY_DEF)
minetest.register_entity("tsm_pyramids:mummy_spawner", spawner_DEF)
--spawn-egg/spawner
minetest.register_craftitem("pyramids:spawn_egg", {
minetest.register_craftitem("tsm_pyramids:spawn_egg", {
description = "Mummy spawn-egg",
inventory_image = "pyramids_mummy_egg.png",
inventory_image = "tsm_pyramids_mummy_egg.png",
liquids_pointable = false,
stack_max = 99,
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then
minetest.env:add_entity(pointed_thing.above,"pyramids:mummy")
minetest.env:add_entity(pointed_thing.above,"tsm_pyramids:mummy")
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
return itemstack
end
@ -357,21 +357,21 @@ minetest.register_craftitem("pyramids:spawn_egg", {
function pyramids.spawn_mummy (pos, number)
for i=0,number do
minetest.env:add_entity(pos,"pyramids:mummy")
minetest.env:add_entity(pos,"tsm_pyramids:mummy")
end
end
minetest.register_node("pyramids:spawner_mummy", {
minetest.register_node("tsm_pyramids:spawner_mummy", {
description = "Mummy spawner",
paramtype = "light",
tiles = {"pyramids_spawner.png"},
tiles = {"tsm_pyramids_spawner.png"},
is_ground_content = true,
drawtype = "allfaces",--_optional",
groups = {cracky=1,level=1},
drop = "",
on_construct = function(pos)
pos.y = pos.y - 0.28
minetest.env:add_entity(pos,"pyramids:mummy_spawner")
minetest.env:add_entity(pos,"tsm_pyramids:mummy_spawner")
end,
on_destruct = function(pos)
for _,obj in ipairs(minetest.env:get_objects_inside_radius(pos, 1)) do
@ -385,7 +385,7 @@ minetest.register_node("pyramids:spawner_mummy", {
})
if not minetest.setting_getbool("only_peaceful_mobs") then
minetest.register_abm({
nodenames = {"pyramids:spawner_mummy"},
nodenames = {"tsm_pyramids:spawner_mummy"},
interval = 2.0,
chance = 20,
action = function(pos, node, active_object_count, active_object_count_wider)
@ -402,7 +402,7 @@ if not minetest.setting_getbool("only_peaceful_mobs") then
if mobs < spawner_max_mobs then
pos.x = pos.x+1
local p = minetest.find_node_near(pos, 5, {"air"})
minetest.env:add_entity(p,"pyramids:mummy")
minetest.env:add_entity(p,"tsm_pyramids:mummy")
end
end
end

View File

@ -1,9 +1,9 @@
local img = {"eye", "men", "sun"}
for i=1,3 do
minetest.register_node("pyramids:deco_stone"..i, {
minetest.register_node("tsm_pyramids:deco_stone"..i, {
description = "Sandstone with "..img[i],
tiles = {"default_sandstone.png^pyramids_"..img[i]..".png"},
tiles = {"default_sandstone.png^tsm_pyramids_"..img[i]..".png"},
is_ground_content = true,
groups = {crumbly=2,cracky=3},
sounds = default.node_sound_stone_defaults(),
@ -16,7 +16,7 @@ trap_on_timer = function (pos, elapsed)
if obj:is_player() then
local n = minetest.get_node(pos)
if n and n.name and minetest.registered_nodes[n.name].crack < 2 then
minetest.set_node(pos, {name="pyramids:trap_2"})
minetest.set_node(pos, {name="tsm_pyramids:trap_2"})
nodeupdate(pos)
end
end
@ -24,9 +24,9 @@ trap_on_timer = function (pos, elapsed)
return true
end
minetest.register_node("pyramids:trap", {
minetest.register_node("tsm_pyramids:trap", {
description = "Cracked sandstone brick",
tiles = {"default_sandstone_brick.png^pyramids_crack.png"},
tiles = {"default_sandstone_brick.png^tsm_pyramids_crack.png"},
is_ground_content = true,
groups = {crumbly=2,cracky=3},
sounds = default.node_sound_stone_defaults(),
@ -38,9 +38,9 @@ minetest.register_node("pyramids:trap", {
drop = "",
})
minetest.register_node("pyramids:trap_2", {
minetest.register_node("tsm_pyramids:trap_2", {
description = "trapstone",
tiles = {"default_sandstone_brick.png^pyramids_crack.png^[transformR90"},
tiles = {"default_sandstone_brick.png^tsm_pyramids_crack.png^[transformR90"},
is_ground_content = true,
groups = {crumbly=2,cracky=3,falling_node=1,not_in_creative_inventory=1},
sounds = default.node_sound_stone_defaults(),

View File

@ -32,15 +32,15 @@ code["t"] = "trap"
local function replace(str,iy)
local out = "default:"
if iy < 4 and str == "c" then str = "a" end
if iy == 0 and str == "s" then out = "pyramids:" str = "sun" end
if iy == 3 and str == "s" then out = "pyramids:" str = "men" end
if iy == 0 and str == "s" then out = "tsm_pyramids:" str = "sun" end
if iy == 3 and str == "s" then out = "tsm_pyramids:" str = "men" end
if str == "a" then out = "" end
return out..code[str]
end
local function replace2(str,iy)
local out = "default:"
if iy == 0 and str == "l" then out = "pyramids:" str = "t"
if iy == 0 and str == "l" then out = "tsm_pyramids:" str = "t"
elseif iy < 3 and str == "l" then str = "a" end
if str == "a" then out = "" end

View File

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 390 B

View File

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 248 B

View File

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

View File

Before

Width:  |  Height:  |  Size: 731 B

After

Width:  |  Height:  |  Size: 731 B

View File

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 453 B

View File

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 231 B