diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..687b4f5 --- /dev/null +++ b/README.txt @@ -0,0 +1,43 @@ +Minetest mod "Pyramids" +======================= +version: 0.4.2 Beta + +License of source code and textures: WTFPL +------------------------------------------ +(c) Copyright BlockMen (2013 - 2015) + + +License of mesh model: WTFPL +---------------------------- +(c) Copyright Pavel_S (2013) + + +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 + +all other: BlockMen, WTFPL + + +Licenses of sounds +------------------ +The authors are : (freesound.org) +-mummy.1.ogg by Raventhornn, CC0 +-mummy.2.ogg by Raventhornn, CC0 +-mummy_hurt.1.ogg by Under7dude, CC0 +-mummy_death.1.ogg by Michel88, CC-Sampling Plus 1.0 + +This program is free software. It comes without any warranty, to +the extent permitted by applicable law. You can redistribute it +and/or modify it under the terms of the Do What The Fuck You Want +To Public License, Version 2, as published by Sam Hocevar. See +http://sam.zoy.org/wtfpl/COPYING for more details. + + +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. diff --git a/mummy.lua b/mummy.lua index e5c3809..f78d3f1 100644 --- a/mummy.lua +++ b/mummy.lua @@ -61,7 +61,7 @@ local function hit(self) } self.object:set_properties(prop) minetest.after(0.4, function() - prop = {textures = mummy_texture,} + local prop = {textures = mummy_texture,} self.object:set_properties(prop) end) end diff --git a/nodes.lua b/nodes.lua index 10a059d..9d278d7 100644 --- a/nodes.lua +++ b/nodes.lua @@ -24,9 +24,11 @@ local trap_on_timer = function (pos, elapsed) for i, obj in pairs(objs) do 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="tsm_pyramids:trap_2"}) - nodeupdate(pos) + if n and n.name then + if minetest.registered_nodes[n.name].crack and minetest.registered_nodes[n.name].crack < 2 then + minetest.set_node(pos, {name="tsm_pyramids:trap_2"}) + nodeupdate(pos) + end end end end