From 5f1bbb097a45a5561571ecb0212bb7f50999948d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 4 Oct 2014 08:38:08 +0200 Subject: [PATCH] =?UTF-8?q?Change=20shortname=20to=20=E2=80=9Ctsm=5Fpyrami?= =?UTF-8?q?ds=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.txt | 8 ++--- init.lua | 8 ++--- ...{pyramids_hit.png => tsm_pyramids_hit.png} | Bin ...amids_mummy.png => tsm_pyramids_mummy.png} | Bin ...{pyramids_mummy.x => tsm_pyramids_mummy.x} | 0 mummy.lua | 30 +++++++++--------- nodes.lua | 14 ++++---- room.lua | 6 ++-- ...amids_crack.png => tsm_pyramids_crack.png} | Bin ...{pyramids_eye.png => tsm_pyramids_eye.png} | Bin ...{pyramids_men.png => tsm_pyramids_men.png} | Bin ...mmy_egg.png => tsm_pyramids_mummy_egg.png} | Bin ...s_spawner.png => tsm_pyramids_spawner.png} | Bin ...{pyramids_sun.png => tsm_pyramids_sun.png} | Bin 14 files changed, 33 insertions(+), 33 deletions(-) rename models/{pyramids_hit.png => tsm_pyramids_hit.png} (100%) rename models/{pyramids_mummy.png => tsm_pyramids_mummy.png} (100%) rename models/{pyramids_mummy.x => tsm_pyramids_mummy.x} (100%) rename textures/{pyramids_crack.png => tsm_pyramids_crack.png} (100%) rename textures/{pyramids_eye.png => tsm_pyramids_eye.png} (100%) rename textures/{pyramids_men.png => tsm_pyramids_men.png} (100%) rename textures/{pyramids_mummy_egg.png => tsm_pyramids_mummy_egg.png} (100%) rename textures/{pyramids_spawner.png => tsm_pyramids_spawner.png} (100%) rename textures/{pyramids_sun.png => tsm_pyramids_sun.png} (100%) diff --git a/README.txt b/README.txt index 047d8e2..65d767d 100644 --- a/README.txt +++ b/README.txt @@ -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. \ No newline at end of file +Also there are mummys inside, which attack the player if found in their radius. diff --git a/init.lua b/init.lua index 5a8d89c..d40b4de 100644 --- a/init.lua +++ b/init.lua @@ -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 diff --git a/models/pyramids_hit.png b/models/tsm_pyramids_hit.png similarity index 100% rename from models/pyramids_hit.png rename to models/tsm_pyramids_hit.png diff --git a/models/pyramids_mummy.png b/models/tsm_pyramids_mummy.png similarity index 100% rename from models/pyramids_mummy.png rename to models/tsm_pyramids_mummy.png diff --git a/models/pyramids_mummy.x b/models/tsm_pyramids_mummy.x similarity index 100% rename from models/pyramids_mummy.x rename to models/tsm_pyramids_mummy.x diff --git a/mummy.lua b/mummy.lua index 0c4d611..2bbe95d 100644 --- a/mummy.lua +++ b/mummy.lua @@ -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 diff --git a/nodes.lua b/nodes.lua index fd663ce..7974f44 100644 --- a/nodes.lua +++ b/nodes.lua @@ -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(), diff --git a/room.lua b/room.lua index a217ddd..f6b39bb 100644 --- a/room.lua +++ b/room.lua @@ -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 diff --git a/textures/pyramids_crack.png b/textures/tsm_pyramids_crack.png similarity index 100% rename from textures/pyramids_crack.png rename to textures/tsm_pyramids_crack.png diff --git a/textures/pyramids_eye.png b/textures/tsm_pyramids_eye.png similarity index 100% rename from textures/pyramids_eye.png rename to textures/tsm_pyramids_eye.png diff --git a/textures/pyramids_men.png b/textures/tsm_pyramids_men.png similarity index 100% rename from textures/pyramids_men.png rename to textures/tsm_pyramids_men.png diff --git a/textures/pyramids_mummy_egg.png b/textures/tsm_pyramids_mummy_egg.png similarity index 100% rename from textures/pyramids_mummy_egg.png rename to textures/tsm_pyramids_mummy_egg.png diff --git a/textures/pyramids_spawner.png b/textures/tsm_pyramids_spawner.png similarity index 100% rename from textures/pyramids_spawner.png rename to textures/tsm_pyramids_spawner.png diff --git a/textures/pyramids_sun.png b/textures/tsm_pyramids_sun.png similarity index 100% rename from textures/pyramids_sun.png rename to textures/tsm_pyramids_sun.png