Update cmer_sheep mod to Git commit a981ab2...
https://github.com/AntumMT/mod-cmer/tree/a981ab2master
parent
f552006a58
commit
df505096cb
|
@ -100,7 +100,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
* [rat][mobs_rat] ([MIT][lic.mobs_rat]) -- version: [2a8d115 Git][ver.mobs_rat] *2021-05-20*
|
||||
* [sand_monster][mobs_monster] ([MIT][lic.sand_monster]) -- version: [3dd5954 Git][ver.sand_monster] *2021-05-20*
|
||||
* [shark][] ([CC0 / CC BY-SA][lic.cmer_shark]) -- version: [a39634a Git][ver.cmer_shark] *2021-05-24*
|
||||
* [sheep][creatures] ([Zlib][lic.creatures] / [CC BY-SA][lic.ccbysa3.0]) -- version: [ff39b4a Git][ver.sheep] *2021-05-13*
|
||||
* [sheep][creatures] ([Zlib][lic.creatures] / [CC BY-SA][lic.ccbysa3.0]) -- version: [a981ab2 Git][ver.cmer_sheep] *2021-05-24*
|
||||
* [skeleton][cmer_skeleton] ([MIT][lic.cmer_skeleton]) -- version: [466c9a6 Git][ver.cmer_skeleton] *2021-05-24*
|
||||
* [sneeker][] ([MIT][lic.sneeker]) -- version: [1.0][ver.sneeker] *2021-05-08*
|
||||
* [spider][cmer_spider] ([unilicense][lic.cmer_spider]) -- version: [d1a9a82 Git][ver.cmer_spider] *2021-05-19*
|
||||
|
@ -529,6 +529,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
[ver.cmer_ghost]: https://github.com/AntumMT/mod-cmer/tree/b350486
|
||||
[ver.cmer_oerkki]: https://github.com/AntumMT/mod-cmer/tree/3ff3e42
|
||||
[ver.cmer_shark]: https://github.com/AntumMT/mod-shark/tree/a39634a
|
||||
[ver.cmer_sheep]: https://github.com/AntumMT/mod-cmer/tree/a981ab2
|
||||
[ver.cmer_skeleton]: https://github.com/AntumMT/mod-skeleton/tree/466c9a6
|
||||
[ver.cmer_spider]: https://github.com/AntumMT/mod-spider/tree/d1a9a82
|
||||
[ver.cmer_zombie]: https://github.com/AntumMT/mod-cmer/tree/5b84737
|
||||
|
@ -608,7 +609,6 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
[ver.sand_monster]: https://github.com/AntumMT/mod-mob_sand_monster/tree/3dd5954
|
||||
[ver.server_shop]: https://github.com/AntumMT/mod-server_shop/tree/06f6691
|
||||
[ver.sfinv_buttons]: http://repo.or.cz/minetest_sfinv_buttons.git/tree/ebb1f7c
|
||||
[ver.sheep]: https://github.com/AntumMT/mod-cmer/tree/ff39b4a
|
||||
[ver.signs_lib]: https://gitlab.com/VanessaE/signs_lib/tree/2021-03-04-2
|
||||
[ver.simple_protection]: https://github.com/SmallJoker/simple_protection/tree/3630fe9
|
||||
[ver.slingshot]: https://github.com/AntumMT/mod-slingshot/tree/bb77525
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
TODO:
|
||||
- add localization support
|
||||
- use settings for lifespan, spawn interval, & spawn chance
|
|
@ -27,14 +27,20 @@ core.register_tool(":creatures:shears", {
|
|||
})
|
||||
|
||||
core.register_craft({
|
||||
output = 'creatures:shears',
|
||||
output = "creatures:shears",
|
||||
recipe = {
|
||||
{'', 'default:steel_ingot'},
|
||||
{'default:steel_ingot', 'default:stick'},
|
||||
{"", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
local sheep_drops = {}
|
||||
if core.registered_items["mobs:meat_raw"] then
|
||||
table.insert(sheep_drops, {"mobs:meat_raw"})
|
||||
end
|
||||
|
||||
|
||||
local function setColor(self)
|
||||
if self and self.object then
|
||||
local ext = ".png"
|
||||
|
@ -54,7 +60,7 @@ local function shear(self, drop_count, sound)
|
|||
end
|
||||
|
||||
setColor(self)
|
||||
cmer.dropItems(pos, {{"wool:" .. self.wool_color, drop_count}})
|
||||
creatures.dropItems(pos, {{"wool:" .. self.wool_color, drop_count}})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -68,7 +74,8 @@ local colors = {
|
|||
}
|
||||
|
||||
local def = {
|
||||
name = "creatures:sheep",
|
||||
name = ":creatures:sheep",
|
||||
nametag = creatures.feature_nametags and "Sheep" or nil,
|
||||
ownable = true,
|
||||
stats = {
|
||||
hp = 8,
|
||||
|
@ -121,11 +128,11 @@ local def = {
|
|||
},
|
||||
|
||||
drops = function(self)
|
||||
local items = {{"creatures:flesh"}}
|
||||
local items = sheep_drops
|
||||
if self.has_wool then
|
||||
table.insert(items, {"wool:" .. self.wool_color, {min = 1, max = 2}})
|
||||
end
|
||||
cmer.dropItems(self.object:get_pos(), items)
|
||||
creatures.dropItems(self.object:get_pos(), items)
|
||||
end,
|
||||
|
||||
spawning = {
|
||||
|
@ -165,7 +172,7 @@ local def = {
|
|||
end
|
||||
|
||||
if not self.wool_color then
|
||||
self.wool_color = cmer.rnd(colors) or "white"
|
||||
self.wool_color = creatures.rnd(colors) or "white"
|
||||
end
|
||||
-- update fur
|
||||
setColor(self)
|
||||
|
@ -219,7 +226,7 @@ local def = {
|
|||
end
|
||||
}
|
||||
|
||||
cmer.register_mob(def)
|
||||
creatures.register_mob(def)
|
||||
|
||||
if core.global_exists("asm") then
|
||||
asm.addEgg({
|
||||
|
|
|
@ -2,4 +2,4 @@ name = cmer_sheep
|
|||
title = Sheep
|
||||
description = Sheep for Creatures Revived mob engine.
|
||||
depends = cmer, default
|
||||
optional_depends = farming, wool, asm_spawneggs
|
||||
optional_depends = farming, wool, asm_spawneggs, mobs
|
||||
|
|
Loading…
Reference in New Issue