[sneeker] Update to Git commit d336800:
https://github.com/AntumDeluge/mtmod-sneeker/tree/d336800
This commit is contained in:
parent
3fcbd4dcbc
commit
f4fbcce624
@ -60,7 +60,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||||||
* mobiles/aggressive/
|
* mobiles/aggressive/
|
||||||
* [mobs_goblins][] ([CC-BY-SA / CC-BY / CC0][lic.mobs_goblins]) -- version: [a346f85 Git][ver.mobs_goblins] *2015-09-12* ([patched][patch.mobs_goblins])
|
* [mobs_goblins][] ([CC-BY-SA / CC-BY / CC0][lic.mobs_goblins]) -- version: [a346f85 Git][ver.mobs_goblins] *2015-09-12* ([patched][patch.mobs_goblins])
|
||||||
* [mobs_monster][] ([MIT][lic.mobs_monster]) -- version: [f6d0e01 Git][ver.mobs_monster] *2017-04-27*
|
* [mobs_monster][] ([MIT][lic.mobs_monster]) -- version: [f6d0e01 Git][ver.mobs_monster] *2017-04-27*
|
||||||
* [sneeker][] ([WTFPL][lic.wtfpl] / [CC0][lic.cc0]) -- version: [9d7c566 Git][ver.sneeker] *2017-05-28*
|
* [sneeker][] ([WTFPL][lic.wtfpl] / [CC0][lic.cc0]) -- version: [d336800 Git][ver.sneeker] *2017-05-29*
|
||||||
* [spidermob][] ([LGPL][lic.lgpl2.1] / [CC BY-SA][lic.ccbysa3.0] / [MIT][lic.mit] / [WTFPL][lic.spidermob] / [Unlicense][lic.unlicense]) -- version [c72d2ff Git][ver.spidermob] *2016-08-14* ([patched][patch.spidermob])
|
* [spidermob][] ([LGPL][lic.lgpl2.1] / [CC BY-SA][lic.ccbysa3.0] / [MIT][lic.mit] / [WTFPL][lic.spidermob] / [Unlicense][lic.unlicense]) -- version [c72d2ff Git][ver.spidermob] *2016-08-14* ([patched][patch.spidermob])
|
||||||
* mobiles/engine/
|
* mobiles/engine/
|
||||||
* mobiles/general/
|
* mobiles/general/
|
||||||
@ -462,7 +462,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||||||
[ver.rainbow_ore]: https://github.com/FsxShader2012/rainbow_ore/tree/6e77693
|
[ver.rainbow_ore]: https://github.com/FsxShader2012/rainbow_ore/tree/6e77693
|
||||||
[ver.signs_lib]: https://github.com/minetest-mods/signs_lib/tree/2c36937
|
[ver.signs_lib]: https://github.com/minetest-mods/signs_lib/tree/2c36937
|
||||||
[ver.simple_protection]: https://github.com/SmallJoker/simple_protection/tree/23c024f
|
[ver.simple_protection]: https://github.com/SmallJoker/simple_protection/tree/23c024f
|
||||||
[ver.sneeker]: https://github.com/AntumDeluge/mtmod-sneeker/tree/9d7c566
|
[ver.sneeker]: https://github.com/AntumDeluge/mtmod-sneeker/tree/d336800
|
||||||
[ver.snowdrift]: https://github.com/paramat/snowdrift/tree/fcb0537
|
[ver.snowdrift]: https://github.com/paramat/snowdrift/tree/fcb0537
|
||||||
[ver.spawneggs]: https://github.com/thefamilygrog66/spawneggs/tree/4650370
|
[ver.spawneggs]: https://github.com/thefamilygrog66/spawneggs/tree/4650370
|
||||||
[ver.spectator_mode]: https://github.com/minetest-mods/spectator_mode/tree/7d68bec
|
[ver.spectator_mode]: https://github.com/minetest-mods/spectator_mode/tree/7d68bec
|
||||||
|
@ -14,6 +14,9 @@ end
|
|||||||
dofile(sneeker.modpath .. '/settings.lua')
|
dofile(sneeker.modpath .. '/settings.lua')
|
||||||
dofile(sneeker.modpath .. '/functions.lua')
|
dofile(sneeker.modpath .. '/functions.lua')
|
||||||
|
|
||||||
|
sneeker.mob_name = sneeker.modname .. ':' .. sneeker.modname
|
||||||
|
sneeker.spawnegg_name = sneeker.modname .. ':spawnegg'
|
||||||
|
|
||||||
if log_mods then
|
if log_mods then
|
||||||
sneeker.log('Spawn cap: ' .. tostring(sneeker.spawn_cap))
|
sneeker.log('Spawn cap: ' .. tostring(sneeker.spawn_cap))
|
||||||
end
|
end
|
||||||
@ -342,10 +345,10 @@ def.get_staticdata = function(self)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_entity('sneeker:sneeker',def)
|
minetest.register_entity(sneeker.mob_name, def)
|
||||||
|
|
||||||
if minetest.get_modpath('spawneggs') and minetest.get_modpath('tnt') then
|
if minetest.get_modpath('spawneggs') and minetest.get_modpath('tnt') then
|
||||||
minetest.register_craftitem('sneeker:spawnegg',{
|
minetest.register_craftitem(sneeker.spawnegg_name, {
|
||||||
description = 'Sneeker Spawn Egg',
|
description = 'Sneeker Spawn Egg',
|
||||||
inventory_image = 'sneeker_spawnegg.png',
|
inventory_image = 'sneeker_spawnegg.png',
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
@ -353,7 +356,7 @@ if minetest.get_modpath('spawneggs') and minetest.get_modpath('tnt') then
|
|||||||
if pointed_thing.type == 'node' then
|
if pointed_thing.type == 'node' then
|
||||||
local pos = pointed_thing.above
|
local pos = pointed_thing.above
|
||||||
pos.y = pos.y+1
|
pos.y = pos.y+1
|
||||||
minetest.add_entity(pos,'sneeker:sneeker')
|
minetest.add_entity(pos, sneeker.mob_name)
|
||||||
if not minetest.setting_getbool('creative_mode') then
|
if not minetest.setting_getbool('creative_mode') then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
@ -363,12 +366,12 @@ if minetest.get_modpath('spawneggs') and minetest.get_modpath('tnt') then
|
|||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'sneeker:spawnegg',
|
output = sneeker.spawnegg_name,
|
||||||
type = 'shapeless',
|
type = 'shapeless',
|
||||||
recipe = {
|
recipe = {
|
||||||
'spawneggs:egg', 'tnt:tnt',
|
'spawneggs:egg', 'tnt:tnt',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias('spawneggs:sneeker', 'sneeker:spawnegg')
|
minetest.register_alias('spawneggs:sneeker', sneeker.spawnegg_name)
|
||||||
end
|
end
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
|
|
||||||
sneeker.debug = minetest.setting_get('sneeker.debug') or false
|
sneeker.debug = minetest.setting_get('sneeker.debug') or false
|
||||||
sneeker.spawn_cap = minetest.setting_get('sneeker.spawn_cap') or 50
|
sneeker.spawn_cap = minetest.setting_get('sneeker.spawn_cap') or 25
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
sneeker.debug (Log debug output) bool false
|
sneeker.debug (Log debug output) bool false
|
||||||
|
|
||||||
# Sets maximum number of spawns that can exist in world.
|
# Sets maximum number of spawns that can exist in world.
|
||||||
sneeker.spawn_cap (Maximum spawns) int 50
|
sneeker.spawn_cap (Maximum spawns) int 25
|
||||||
|
|
||||||
# Sets possibility for spawn.
|
# Sets possibility for spawn.
|
||||||
sneeker.spawn_chance (Spawn chance) int 18000
|
sneeker.spawn_chance (Spawn chance) int 18000
|
||||||
|
@ -42,6 +42,16 @@ minetest.register_abm({
|
|||||||
if minetest.get_node(pos).name ~= 'air' then
|
if minetest.get_node(pos).name ~= 'air' then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
minetest.add_entity(pos,'sneeker:sneeker')
|
|
||||||
|
-- Get total count of sneekers in world
|
||||||
|
local name, count
|
||||||
|
for name in pairs(minetest.luaentities) do
|
||||||
|
if name == sneeker.mob_name then
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if count >= sneeker.spawn_cap then return end -- Max sneekers already exist
|
||||||
|
|
||||||
|
minetest.add_entity(pos, sneeker.mob_name)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
@ -104,7 +104,7 @@ airtanks_wear_in_creative (Air tanks wear out in creative mode) bool true
|
|||||||
sneeker.debug (Log debug output) bool false
|
sneeker.debug (Log debug output) bool false
|
||||||
|
|
||||||
# Sets maximum number of spawns that can exist in world.
|
# Sets maximum number of spawns that can exist in world.
|
||||||
sneeker.spawn_cap (Maximum spawns) int 50
|
sneeker.spawn_cap (Maximum spawns) int 25
|
||||||
|
|
||||||
# Sets possibility for spawn.
|
# Sets possibility for spawn.
|
||||||
sneeker.spawn_chance (Spawn chance) int 18000
|
sneeker.spawn_chance (Spawn chance) int 18000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user