Add "animalmaterials" modpack.
@ -4,6 +4,7 @@ A custom game for Minetest/Freeminer
|
||||
The game includes the mods from the default [minetest_game](https://github.com/minetest/minetest_game/tree/master/mods)
|
||||
|
||||
The following mods are also included:
|
||||
* [animalmaterials (modpack)][animalmaterials] (CC-BY-SA / CC0)
|
||||
* [awards][] ([LGPL](mods/awards/LICENSE.txt))
|
||||
* buildings/
|
||||
* barn ([mobf_core modpack][mobf]) ([CC-BY-SA](doc/modpacks/mobf_core/License.txt))
|
||||
@ -79,6 +80,7 @@ The following mods are also included:
|
||||
|
||||
|
||||
[3d_armor]: https://forum.minetest.net/viewtopic.php?t=4654
|
||||
[animalmaterials]: https://github.com/sapier/animalmaterials
|
||||
[animals_modpack]: https://forum.minetest.net/viewtopic.php?t=629
|
||||
[awards]: https://forum.minetest.net/viewtopic.php?t=4870
|
||||
[away]: https://forum.minetest.net/viewtopic.php?t=1211
|
||||
|
3
mods/animalmaterials/animal_resources/License.txt
Normal file
@ -0,0 +1,3 @@
|
||||
Licenses
|
||||
|
||||
CC0 only!
|
0
mods/animalmaterials/animal_resources/depends.txt
Normal file
26
mods/animalmaterials/animal_resources/init.lua
Normal file
@ -0,0 +1,26 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Animal Resources Mod by Sapier
|
||||
--
|
||||
--
|
||||
--! @file init.lua
|
||||
--! @brief main init file for animal resources
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2014-08-11
|
||||
--
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
local ar_version = "0.0.1"
|
||||
|
||||
core.log("action", "MOD: loading animal resources mod ...")
|
||||
|
||||
--!path of mod
|
||||
local ar_modpath = minetest.get_modpath("animal_resources")
|
||||
|
||||
dofile (ar_modpath .. "/tools.lua")
|
||||
dofile (ar_modpath .. "/weapons.lua")
|
||||
|
||||
ar_init_weapons();
|
||||
ar_init_tool_crafts();
|
||||
|
||||
core.log("action", "MOD: animal resources mod " .. ar_version .. " loaded.")
|
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 208 B |
After Width: | Height: | Size: 228 B |
After Width: | Height: | Size: 190 B |
After Width: | Height: | Size: 846 B |
After Width: | Height: | Size: 975 B |
48
mods/animalmaterials/animal_resources/tools.lua
Normal file
@ -0,0 +1,48 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file tools.lua
|
||||
--! @brief tool initialization
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2014-08-11
|
||||
--
|
||||
--! @defgroup tools
|
||||
--! @brief tool entitys used by animals modpack
|
||||
--
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
function ar_init_tool_crafts()
|
||||
minetest.register_craft({
|
||||
output = "animalmaterials:lasso 5",
|
||||
recipe = {
|
||||
{'', "wool:white",''},
|
||||
{"wool:white",'', "wool:white"},
|
||||
{'',"wool:white",''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "animalmaterials:net 1",
|
||||
recipe = {
|
||||
{"wool:white",'',"wool:white"},
|
||||
{'', "wool:white",''},
|
||||
{"wool:white",'',"wool:white"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'animalmaterials:sword_deamondeath',
|
||||
recipe = {
|
||||
{'animalmaterials:bone'},
|
||||
{'animalmaterials:bone'},
|
||||
{'default:stick'},
|
||||
}
|
||||
})
|
||||
end
|
470
mods/animalmaterials/animal_resources/weapons.lua
Normal file
@ -0,0 +1,470 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Animal Resources Mod by Sapier
|
||||
--
|
||||
--! @file weapons.lua
|
||||
--! @brief definition of some weapons used by animals modpack
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2012-08-09
|
||||
--
|
||||
--! @defgroup weapons Weapons
|
||||
--! @brief weapon entitys examples used by animals modpack
|
||||
--
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
assert(weapons_spacer == nil)
|
||||
local weapons_spacer = {} --unused to fix lua doxygen bug only
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: do_area_damage(pos,immune,damage_groups,range)
|
||||
--
|
||||
--! @brief damage all objects within a certain range
|
||||
--
|
||||
--! @param pos cennter of damage area
|
||||
--! @param immune object immune to damage
|
||||
--! @param damage_groups list of damage groups to do damage to
|
||||
--! @param range range around pos
|
||||
-------------------------------------------------------------------------------
|
||||
local function do_area_damage(pos,immune,damage_groups,range)
|
||||
--damage objects within inner blast radius
|
||||
assert(type(range) ~= "table")
|
||||
|
||||
local objs = minetest.get_objects_inside_radius(pos, range)
|
||||
for k, obj in pairs(objs) do
|
||||
|
||||
--don't do damage to issuer
|
||||
if obj ~= immune and obj ~= nil then
|
||||
|
||||
--TODO as long as minetest still crashes without puncher use this workaround
|
||||
|
||||
local worst_damage = 0
|
||||
if type(damage_groups) == "table" then
|
||||
for k,v in pairs(damage_groups) do
|
||||
if v > worst_damage then
|
||||
worst_damage = v
|
||||
end
|
||||
end
|
||||
elseif type(damage_groups) == "number" then
|
||||
worst_damage = damage_groups
|
||||
else
|
||||
assert("invalid damage_groups" == "selected")
|
||||
end
|
||||
|
||||
|
||||
local current_hp = obj:get_hp()
|
||||
obj:set_hp(current_hp - worst_damage)
|
||||
|
||||
--punch
|
||||
--obj:punch(nil, 1.0, {
|
||||
-- full_punch_interval=1.0,
|
||||
-- damage_groups = damage_groups,
|
||||
--}, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: do_node_damage(pos,immune_list,range,chance)
|
||||
--
|
||||
--! @brief damage all nodes within a certain range
|
||||
--
|
||||
--! @param pos center of area
|
||||
--! @param immune_list list of nodes immune to damage
|
||||
--! @param range range to do damage
|
||||
--! @param chance chance damage is done to a node
|
||||
-------------------------------------------------------------------------------
|
||||
local function do_node_damage(pos,immune_list,range,chance)
|
||||
--do node damage
|
||||
for i=pos.x-range, pos.x+range, 1 do
|
||||
for j=pos.y-range, pos.y+range, 1 do
|
||||
for k=pos.z-range,pos.z+range,1 do
|
||||
--TODO create a little bit more sophisticated blast resistance
|
||||
if math.random() < chance then
|
||||
local toremove = core.get_node({x=i,y=j,z=k})
|
||||
|
||||
if toremove ~= nil then
|
||||
local immune = false
|
||||
|
||||
if immune_list ~= nil then
|
||||
for i,v in ipairs(immune_list) do
|
||||
if (toremove.name == v) then
|
||||
immune = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if immune ~= true then
|
||||
core.remove_node({x=i,y=j,z=k})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--! @class AR_FIREBALL_ENTITY
|
||||
--! @ingroup weapons
|
||||
--! @brief a fireball weapon entity
|
||||
local AR_FIREBALL_ENTITY = {
|
||||
physical = false,
|
||||
textures = {"animal_resources_fireball.png"},
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
|
||||
damage_range = 4,
|
||||
velocity = 3,
|
||||
gravity = -0.01,
|
||||
|
||||
damage_outer = {
|
||||
fleshy=4,
|
||||
},
|
||||
damage_inner = {
|
||||
fleshy=8,
|
||||
},
|
||||
|
||||
owner = 0,
|
||||
lifetime = 30,
|
||||
created = -1,
|
||||
}
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: AR_FIREBALL_ENTITY.on_activate = function(self, staticdata)
|
||||
--
|
||||
--! @brief onactivate callback for fireball
|
||||
--! @memberof AR_FIREBALL_ENTITY
|
||||
--! @private
|
||||
--
|
||||
--! @param self fireball itself
|
||||
--! @param staticdata
|
||||
-------------------------------------------------------------------------------
|
||||
function AR_FIREBALL_ENTITY.on_activate(self,staticdata)
|
||||
self.created = os.clock()
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: AR_FIREBALL_ENTITY.surfacefire = function(self, staticdata)
|
||||
--
|
||||
--! @brief place fire on surfaces around pos
|
||||
--! @memberof AR_FIREBALL_ENTITY
|
||||
--! @private
|
||||
--
|
||||
--! @param pos position to place fire around
|
||||
--! @param range square around pos to set on fire
|
||||
-------------------------------------------------------------------------------
|
||||
function AR_FIREBALL_ENTITY.surfacefire(pos,range)
|
||||
|
||||
if mobf_rtd ~= nil and mobf_rtd.fire_enabled then
|
||||
--start fire on any surface within inner damage range
|
||||
for i=pos.x-range/2, pos.x+range/2, 1 do
|
||||
for j=pos.y-range/2, pos.y+range/2, 1 do
|
||||
for k=pos.z-range/2, pos.z+range/2, 1 do
|
||||
|
||||
local current = core.get_node({x=i,y=j,z=k})
|
||||
local ontop = core.get_node({x=i,y=j+1,z=k})
|
||||
|
||||
--print("put fire? " .. printpos({x=i,y=j,z=k}) .. " " .. current.name .. " " ..ontop.name)
|
||||
|
||||
if (current.name ~= "air") and
|
||||
(current.name ~= "fire:basic_flame") and
|
||||
(ontop.name == "air") then
|
||||
core.set_node({x=i,y=j+1,z=k}, {name="fire:basic_flame"})
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
core.log("error","AMR: A fireball without fire mod??!? You're kidding!!")
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: AR_FIREBALL_ENTITY.on_step = function(self, dtime)
|
||||
--
|
||||
--! @brief onstep callback for fireball
|
||||
--! @memberof AR_FIREBALL_ENTITY
|
||||
--! @private
|
||||
--
|
||||
--! @param self fireball itself
|
||||
--! @param dtime time since last callback
|
||||
-------------------------------------------------------------------------------
|
||||
function AR_FIREBALL_ENTITY.on_step(self, dtime)
|
||||
local pos = self.object:getpos()
|
||||
local node = core.get_node(pos)
|
||||
|
||||
|
||||
--detect hit
|
||||
local objs=core.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1)
|
||||
|
||||
local hit = false
|
||||
|
||||
for k, obj in pairs(objs) do
|
||||
if obj:get_entity_name() ~= "animal_resources:fireball_entity" and
|
||||
obj ~= self.owner then
|
||||
hit=true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if hit then
|
||||
--damage objects within inner blast radius
|
||||
do_area_damage(pos,self.owner,self.damage_outer,self.damage_range/4)
|
||||
|
||||
--damage all objects within blast radius
|
||||
do_area_damage(pos,self.owner,self.damage_inner,self.damage_range/2)
|
||||
|
||||
AR_FIREBALL_ENTITY.surfacefire(pos,self.damage_range)
|
||||
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
-- vanish when hitting a node
|
||||
if node.name ~= "air" then
|
||||
AR_FIREBALL_ENTITY.surfacefire(pos,self.damage_range)
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
--remove after lifetime has passed
|
||||
if self.created > 0 and
|
||||
self.created + self.lifetime < os.clock() then
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
|
||||
--! @class AR_PLASMABALL_ENTITY
|
||||
--! @ingroup weapons
|
||||
--! @brief a plasmaball weapon entity
|
||||
local AR_PLASMABALL_ENTITY = {
|
||||
physical = false,
|
||||
textures = {"animal_resources_plasmaball.png"},
|
||||
lastpos={},
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
|
||||
damage_range = 2,
|
||||
velocity = 4,
|
||||
gravity = -0.001,
|
||||
|
||||
damage = {
|
||||
fleshy=4,
|
||||
},
|
||||
|
||||
damage_pass = {
|
||||
fleshy=2,
|
||||
},
|
||||
|
||||
owner = 0,
|
||||
lifetime = 30,
|
||||
created = -1,
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: AR_PLASMABALL_ENTITY.on_activate = function(self, staticdata)
|
||||
--
|
||||
--! @brief onactivate callback for plasmaball
|
||||
--! @memberof AR_PLASMABALL_ENTITY
|
||||
--! @private
|
||||
--
|
||||
--! @param self fireball itself
|
||||
--! @param staticdata
|
||||
-------------------------------------------------------------------------------
|
||||
function AR_PLASMABALL_ENTITY.on_activate(self,staticdata)
|
||||
self.created = os.clock()
|
||||
end
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: AR_PLASMABALL_ENTITY.on_step = function(self, dtime)
|
||||
--
|
||||
--! @brief onstep callback for plasmaball
|
||||
--! @memberof AR_PLASMABALL_ENTITY
|
||||
--! @private
|
||||
--
|
||||
--! @param self plasmaball itself
|
||||
--! @param dtime time since last callback
|
||||
-------------------------------------------------------------------------------
|
||||
function AR_PLASMABALL_ENTITY.on_step(self, dtime)
|
||||
local pos = self.object:getpos()
|
||||
local node = core.get_node(pos)
|
||||
|
||||
|
||||
--detect hit
|
||||
local objs=core.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1)
|
||||
|
||||
local hit = false
|
||||
|
||||
for k, obj in pairs(objs) do
|
||||
if obj:get_entity_name() ~= "animal_resources:plasmaball_entity" and
|
||||
obj ~= self.owner then
|
||||
hit=true
|
||||
end
|
||||
end
|
||||
|
||||
--damage all objects not hit but at least passed
|
||||
do_area_damage(pos,self.owner,self.damage_pass,2)
|
||||
|
||||
if hit then
|
||||
--damage objects within inner blast radius
|
||||
do_area_damage(pos,self.owner,self.damage,self.damage_range/4)
|
||||
|
||||
--damage all objects within blast radius
|
||||
do_area_damage(pos,self.owner,self.damage,self.damage_range/2)
|
||||
end
|
||||
|
||||
-- vanish when hitting a node
|
||||
if node.name ~= "air" or
|
||||
hit then
|
||||
|
||||
--replace this loop by minetest.find_node_near?
|
||||
--do node damage
|
||||
for i=pos.x-1, pos.x+1, 1 do
|
||||
for j=pos.y-1, pos.y+1, 1 do
|
||||
for k=pos.z-1,pos.z+1,1 do
|
||||
--TODO create a little bit more sophisticated blast resistance
|
||||
if math.random() < 0.5 then
|
||||
local toremove = minetest.get_node({x=i,y=j,z=k})
|
||||
|
||||
if toremove ~= nil and
|
||||
toremove.name ~= "default:stone" and
|
||||
toremove.name ~= "default:cobble" then
|
||||
|
||||
core.remove_node({x=i,y=j,z=k})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self.object:remove()
|
||||
end
|
||||
|
||||
--remove after lifetime has passed
|
||||
if self.created > 0 and
|
||||
self.created + self.lifetime < mobf_get_current_time() then
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- Code Below is by far extent taken from throwing mod by PilzAdam
|
||||
-- -----------------------------------------------------------------------------
|
||||
--! @class AR_ARROW_ENTITY
|
||||
--! @ingroup weapons
|
||||
--! @brief a arrow entity
|
||||
local AR_ARROW_ENTITY={
|
||||
physical = false,
|
||||
timer=0,
|
||||
visual = "wielditem",
|
||||
visual_size = {x=0.1, y=0.1},
|
||||
textures = {"animal_resources:arrow_box"},
|
||||
lastpos={},
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
|
||||
velocity =6,
|
||||
damage_groups = {
|
||||
fleshy=3,
|
||||
daemon=1.5
|
||||
},
|
||||
gravity =9.81,
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: AR_ARROW_ENTITY.on_step = function(self, dtime)
|
||||
--
|
||||
--! @brief onstep callback for arrow
|
||||
--! @memberof AR_ARROW_ENTITY
|
||||
--! @private
|
||||
--
|
||||
--! @param self arrow itself
|
||||
--! @param dtime time since last callback
|
||||
-------------------------------------------------------------------------------
|
||||
AR_ARROW_ENTITY.on_step = function(self, dtime)
|
||||
self.timer=self.timer+dtime
|
||||
local pos = self.object:getpos()
|
||||
local node = core.get_node(pos)
|
||||
|
||||
if self.timer>0.2 then
|
||||
local objs = core.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
||||
for k, obj in pairs(objs) do
|
||||
if obj:get_luaentity() ~= nil and
|
||||
obj ~= self.owner then
|
||||
if obj:get_luaentity().name ~= "animal_resources:arrow_entity" and
|
||||
obj:get_luaentity().name ~= "__builtin:item" then
|
||||
obj:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = self.damage_groups,
|
||||
}, nil)
|
||||
self.object:remove()
|
||||
end
|
||||
else
|
||||
--punch a player
|
||||
obj:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = self.damage_groups,
|
||||
}, nil)
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if self.lastpos.x~=nil then
|
||||
if node.name ~= "air" then
|
||||
core.add_item(self.lastpos, 'animal_resources:arrow')
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
self.lastpos={x=pos.x, y=pos.y, z=pos.z}
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: ar_init_weapons = function(self, dtime)
|
||||
--
|
||||
--! @brief initialize weapons handled by mobf mod
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
function ar_init_weapons()
|
||||
core.register_entity(":animal_resources:fireball_entity", AR_FIREBALL_ENTITY)
|
||||
core.register_entity(":animal_resources:plasmaball_entity", AR_PLASMABALL_ENTITY)
|
||||
core.register_entity(":animal_resources:arrow_entity", AR_ARROW_ENTITY)
|
||||
end
|
||||
|
||||
|
||||
-- moved due to doxygen problems
|
||||
core.register_node("animal_resources:arrow_box", {
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
-- Shaft
|
||||
{-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17},
|
||||
--Spitze
|
||||
{-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17},
|
||||
{-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17},
|
||||
--Federn
|
||||
{6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17},
|
||||
{7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17},
|
||||
{7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17},
|
||||
{6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17},
|
||||
|
||||
{7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17},
|
||||
{8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17},
|
||||
{8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17},
|
||||
{7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17},
|
||||
}
|
||||
},
|
||||
tiles = {"animal_resources_arrow.png", "animal_resources_arrow.png",
|
||||
"animal_resources_arrow_back.png", "animal_resources_arrow_front.png",
|
||||
"animal_resources_arrow_2.png", "animal_resources_arrow.png"},
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
local mods = core.get_modnames()
|
||||
|
||||
for i,v in ipairs(mods) do
|
||||
if v == element then
|
||||
print("AR: throwing mod found!")
|
||||
core.register_alias("animal_resources:arrow", "throwing:arrow")
|
||||
end
|
||||
end
|
5
mods/animalmaterials/animalmaterials/License.txt
Normal file
@ -0,0 +1,5 @@
|
||||
Licenses
|
||||
|
||||
Everything not mentioned:
|
||||
CC-BY-SA 3.0, Author sapier
|
||||
URL: http://creativecommons.org/licenses/by-sa/3.0/de/legalcode
|
2
mods/animalmaterials/animalmaterials/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
default
|
||||
intllib?
|
383
mods/animalmaterials/animalmaterials/init.lua
Normal file
@ -0,0 +1,383 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file init.lua
|
||||
--! @brief animalmaterials
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2013-01-27
|
||||
--
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S
|
||||
if (minetest.get_modpath("intllib")) then
|
||||
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function ( s ) return s end
|
||||
end
|
||||
|
||||
core.log("action","MOD: animalmaterials loading ...")
|
||||
local version = "0.1.3"
|
||||
|
||||
|
||||
animalmaterialsdata = {}
|
||||
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
-- Node definitions
|
||||
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
-- Item definitions
|
||||
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- deamondeath sword
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_tool("animalmaterials:sword_deamondeath", {
|
||||
description = S("Sword (Deamondeath)"),
|
||||
inventory_image = "default_tool_steelsword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.50,
|
||||
max_drop_level=1,
|
||||
groupcaps={
|
||||
fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=1},
|
||||
snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1},
|
||||
choppy={times={[3]=0.70}, uses=40, maxlevel=0},
|
||||
deamon={times={[1]=0.25, [2]=0.10, [3]=0.05}, uses=20, maxlevel=3},
|
||||
}
|
||||
}
|
||||
})
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- scissors
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_tool("animalmaterials:scissors", {
|
||||
description = S("Scissors"),
|
||||
inventory_image = "animalmaterials_scissors.png",
|
||||
tool_capabilities = {
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
wool = {uses=40,maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- lasso
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:lasso", {
|
||||
description = S("Lasso"),
|
||||
image = "animalmaterials_lasso.png",
|
||||
stack_max=10,
|
||||
})
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- net
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:net", {
|
||||
description = S("Net"),
|
||||
image = "animalmaterials_net.png",
|
||||
stack_max=10,
|
||||
})
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- saddle
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:saddle", {
|
||||
description = S("Saddle"),
|
||||
image = "animalmaterials_saddle.png",
|
||||
stack_max=1
|
||||
})
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- contract
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:contract", {
|
||||
description = S("Contract"),
|
||||
image = "animalmaterials_contract.png",
|
||||
stack_max=10,
|
||||
})
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- meat
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:meat_raw", {
|
||||
description = S("Raw meat"),
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:meat_pork", {
|
||||
description = S("Pork (raw)"),
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:meat_beef", {
|
||||
description = S("Beef (raw)"),
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:meat_chicken", {
|
||||
description = S("Chicken (raw)"),
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:meat_lamb", {
|
||||
description = S("Lamb (raw)"),
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:meat_venison", {
|
||||
description = S("Venison (raw)"),
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:meat_undead", {
|
||||
description = S("Meat (not quite dead)"),
|
||||
image = "animalmaterials_meat_undead_raw.png",
|
||||
on_use = minetest.item_eat(-2),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=5
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:meat_toxic", {
|
||||
description = S("Toxic Meat"),
|
||||
image = "animalmaterials_meat_toxic_raw.png",
|
||||
on_use = minetest.item_eat(-5),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=5
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:meat_ostrich", {
|
||||
description = S("Ostrich Meat"),
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=5
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:pork_raw", {
|
||||
description = S("Pork"),
|
||||
image = "animalmaterials_pork_raw.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=5
|
||||
})
|
||||
|
||||
minetest.register_craftitem("animalmaterials:fish_bluewhite", {
|
||||
description = S("Fish (bluewhite)"),
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
|
||||
minetest.register_craftitem("animalmaterials:fish_clownfish", {
|
||||
description = S("Fish (clownfish)"),
|
||||
image = "animalmaterials_meat_raw.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { meat=1, eatable=1 },
|
||||
stack_max=25
|
||||
})
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- feather
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:feather", {
|
||||
description = S("Feather"),
|
||||
image = "animalmaterials_feather.png",
|
||||
stack_max=25
|
||||
})
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- milk
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:milk", {
|
||||
description = S("Milk"),
|
||||
image = "animalmaterials_milk.png",
|
||||
on_use = minetest.item_eat(1),
|
||||
groups = { eatable=1 },
|
||||
stack_max=10
|
||||
})
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- egg
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:egg", {
|
||||
description = S("Egg"),
|
||||
image = "animalmaterials_egg.png",
|
||||
stack_max=10
|
||||
})
|
||||
|
||||
minetest.register_craftitem("animalmaterials:egg_big", {
|
||||
description = S("Egg (big)"),
|
||||
image = "animalmaterials_egg_big.png",
|
||||
stack_max=5
|
||||
})
|
||||
|
||||
animalmaterialsdata["animalmaterials_egg"] = {
|
||||
graphics_3d = {
|
||||
visual = "mesh",
|
||||
mesh = "animalmaterials_egg_ent.b3d",
|
||||
textures = { "animalmaterials_egg_ent_mesh.png" },
|
||||
collisionbox = { -0.12,-0.125,-0.12,0.12,0.125,0.12 },
|
||||
visual_size = {x=1,y=1,z=1},
|
||||
}
|
||||
}
|
||||
|
||||
animalmaterialsdata["animalmaterials_egg_big"] = {
|
||||
graphics_3d = {
|
||||
visual = "mesh",
|
||||
mesh = "animalmaterials_egg_ent.b3d",
|
||||
textures = { "animalmaterials_egg_ent_mesh.png" },
|
||||
collisionbox = { -0.24,-0.25,-0.24,0.24,0.25,0.24 },
|
||||
visual_size = {x=2,y=2,z=2},
|
||||
}
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- bone
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:bone", {
|
||||
description = S("Bone"),
|
||||
image = "animalmaterials_bone.png",
|
||||
stack_max=25
|
||||
})
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- furs
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:fur", {
|
||||
description = S("Fur"),
|
||||
image = "animalmaterials_fur.png",
|
||||
stack_max=25
|
||||
})
|
||||
|
||||
minetest.register_craftitem("animalmaterials:fur_deer", {
|
||||
description = S("Deer fur"),
|
||||
image = "animalmaterials_deer_fur.png",
|
||||
stack_max=10
|
||||
})
|
||||
|
||||
minetest.register_craftitem("animalmaterials:coat_cattle", {
|
||||
description = S("Cattle coat"),
|
||||
image = "animalmaterials_cattle_coat.png",
|
||||
stack_max=10
|
||||
})
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- horns
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:deer_horns", {
|
||||
description = S("Deer horns"),
|
||||
image = "animalmaterials_deer_horns.png",
|
||||
stack_max=20
|
||||
})
|
||||
|
||||
minetest.register_craftitem("animalmaterials:ivory", {
|
||||
description = S("Ivory"),
|
||||
image = "animalmaterials_ivory.png",
|
||||
stack_max=20
|
||||
})
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- scale
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("animalmaterials:scale_golden", {
|
||||
description = S("Scale (golden)"),
|
||||
image = "animalmaterials_scale_golden.png",
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:scale_white", {
|
||||
description = S("Scale (white)"),
|
||||
image = "animalmaterials_scale_white.png",
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:scale_grey", {
|
||||
description = S("Scale (grey)"),
|
||||
image = "animalmaterials_scale_grey.png",
|
||||
stack_max=25
|
||||
})
|
||||
minetest.register_craftitem("animalmaterials:scale_blue", {
|
||||
description = S("Scale (blue)"),
|
||||
image = "animalmaterials_scale_blue.png",
|
||||
stack_max=25
|
||||
})
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
-- recipes
|
||||
--
|
||||
-------------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------------
|
||||
minetest.register_craft({
|
||||
output = "wool:white",
|
||||
recipe = {
|
||||
{"animalmaterials:feather","animalmaterials:feather","animalmaterials:feather"},
|
||||
{"animalmaterials:feather", "animalmaterials:feather","animalmaterials:feather"},
|
||||
{"animalmaterials:feather","animalmaterials:feather","animalmaterials:feather"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "animalmaterials:contract",
|
||||
recipe = {
|
||||
{"default:paper"},
|
||||
{"default:paper"},
|
||||
}
|
||||
})
|
||||
|
||||
core.log("action","MOD: animalmaterials mod version " .. version .. " loaded")
|
||||
|
33
mods/animalmaterials/animalmaterials/locale/de.txt
Normal file
@ -0,0 +1,33 @@
|
||||
# Translation by Xanthin
|
||||
|
||||
Sword (Deamondeath) = Schwert (Daemonentod)
|
||||
Scissors = Schere
|
||||
Lasso = Lasso
|
||||
Net = Netz
|
||||
Saddle = Sattel
|
||||
Contract = Vertrag
|
||||
Raw meat = Rohes Fleisch
|
||||
Pork (raw) = Schweinefleisch (roh)
|
||||
Beef (raw) = Rindfleisch (roh)
|
||||
Chicken (raw) = Huehnerfleisch (roh)
|
||||
Lamb (raw) = Lammfleisch (roh)
|
||||
Venison (raw) = Hirschfleisch (roh)
|
||||
Meat (not quite dead) = Fleisch (nicht ganz tot)
|
||||
Toxic Meat = Giftiges Fleisch
|
||||
Ostrich Meat = Straussenfleisch
|
||||
Fish (bluewhite) = Fischfleisch (blau-weiss)
|
||||
Fish (clownfish) = Fischfleisch (Clownfisch)
|
||||
Feather = Feder
|
||||
Milk = Milch
|
||||
Egg = Ei
|
||||
Egg (big) = Ei (gross)
|
||||
Bone = Knochen
|
||||
Fur = Fell
|
||||
Deer fur = Hirschfell
|
||||
Cattle coat = Kuhfell
|
||||
Deer horns = Hirschgeweih
|
||||
Ivory = Elfenbein
|
||||
Scale (golden) = Schuppe (gold)
|
||||
Scale (white) = Schuppe (weiss)
|
||||
Scale (grey) = Schuppe (grau)
|
||||
Scale (blue) = Schuppe (blau)
|
33
mods/animalmaterials/animalmaterials/locale/template.txt
Normal file
@ -0,0 +1,33 @@
|
||||
# Template
|
||||
|
||||
Sword (Deamondeath) =
|
||||
Scissors =
|
||||
Lasso =
|
||||
Net =
|
||||
Saddle =
|
||||
Contract =
|
||||
Raw meat =
|
||||
Pork (raw) =
|
||||
Beef (raw) =
|
||||
Chicken (raw) =
|
||||
Lamb (raw) =
|
||||
Venison (raw) =
|
||||
Meat (not quite dead) =
|
||||
Toxic Meat =
|
||||
Ostrich Meat =
|
||||
Fish (bluewhite) =
|
||||
Fish (clownfish) =
|
||||
Feather =
|
||||
Milk =
|
||||
Egg =
|
||||
Egg (big) =
|
||||
Bone =
|
||||
Fur =
|
||||
Deer fur =
|
||||
Cattle coat =
|
||||
Deer horns =
|
||||
Ivory =
|
||||
Scale (golden) =
|
||||
Scale (white) =
|
||||
Scale (grey) =
|
||||
Scale (blue) =
|
BIN
mods/animalmaterials/animalmaterials/models/egg.blend
Normal file
After Width: | Height: | Size: 912 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 997 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 672 B |
After Width: | Height: | Size: 660 B |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 966 B |
After Width: | Height: | Size: 458 B |
After Width: | Height: | Size: 426 B |
After Width: | Height: | Size: 453 B |
After Width: | Height: | Size: 449 B |
After Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 198 B |
After Width: | Height: | Size: 329 B |
After Width: | Height: | Size: 668 B |
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 557 B |
After Width: | Height: | Size: 634 B |
After Width: | Height: | Size: 1.0 KiB |
1
mods/animalmaterials/cooking/License.txt
Normal file
@ -0,0 +1 @@
|
||||
Everything CC-BY-SA MrElmux
|
2
mods/animalmaterials/cooking/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
default
|
||||
animalmaterials
|
129
mods/animalmaterials/cooking/init.lua
Normal file
@ -0,0 +1,129 @@
|
||||
---------------------------------------------------------
|
||||
--Cooking Support, added by Mr Elmux
|
||||
-- You may use modify or do nearly anything except removing this Copyright hint
|
||||
-----------------------------------------------------------
|
||||
local version = "0.1.1"
|
||||
core.log("action","MOD: Loading cooking (by Mr Elmux) ...")
|
||||
core.register_craftitem("cooking:meat_cooked", {
|
||||
description = "Cooked Meat",
|
||||
image = "cooking_cooked_meat.png",
|
||||
on_use = core.item_eat(6),
|
||||
groups = { meat=1 , eatable=1},
|
||||
stack_max = 25
|
||||
})
|
||||
core.register_craftitem("cooking:meat_pork_cooked", {
|
||||
description = "Cooked Pork Meat",
|
||||
image = "cooking_cooked_meat.png",
|
||||
on_use = core.item_eat(6),
|
||||
groups = { meat=1 , eatable=1},
|
||||
stack_max = 25
|
||||
})
|
||||
core.register_craftitem("cooking:meat_chicken_cooked", {
|
||||
description = "Cooked Chicken",
|
||||
image = "cooking_cooked_meat.png",
|
||||
on_use = core.item_eat(6),
|
||||
groups = { meat=1 , eatable=1},
|
||||
stack_max = 25
|
||||
})
|
||||
core.register_craftitem("cooking:meat_beef_cooked", {
|
||||
description = "Cooked Beef",
|
||||
image = "cooking_cooked_meat.png",
|
||||
on_use = core.item_eat(6),
|
||||
groups = { meat=1 , eatable=1},
|
||||
stack_max = 25
|
||||
})
|
||||
core.register_craftitem("cooking:meat_undead_cooked", {
|
||||
description = "Cooked Meat (Now Dead)",
|
||||
image = "cooking_cooked_meat.png",
|
||||
on_use = core.item_eat(-2),
|
||||
groups = { meat=1 , eatable=1},
|
||||
stack_max = 25
|
||||
})
|
||||
core.register_craftitem("cooking:meat_venison_cooked", {
|
||||
description = "Cooked Venison Meat",
|
||||
image = "cooking_cooked_meat.png",
|
||||
on_use = core.item_eat(6),
|
||||
groups = { meat=1 , eatable=1},
|
||||
stack_max = 25
|
||||
})
|
||||
core.register_craftitem("cooking:meat_toxic_cooked", {
|
||||
description = "Cooked Toxic Meat",
|
||||
image = "cooking_cooked_meat.png",
|
||||
on_use = core.item_eat(-5),
|
||||
groups = { meat=1 , eatable=1},
|
||||
stack_max = 25
|
||||
})
|
||||
core.register_craftitem("cooking:fish_bluewhite_cooked", {
|
||||
description = "Cooked Bluewhite Meat",
|
||||
image = "cooking_cooked_meat.png",
|
||||
on_use = core.item_eat(6),
|
||||
groups = { meat=1 , eatable=1},
|
||||
stack_max = 25
|
||||
})
|
||||
core.register_craftitem("cooking:fish_clownfish_cooked", {
|
||||
description = "Cooked Meat",
|
||||
image = "cooking_cooked_meat.png",
|
||||
on_use = core.item_eat(6),
|
||||
groups = { meat=1 , eatable=1},
|
||||
stack_max = 25
|
||||
})
|
||||
core.register_craftitem("cooking:pork_cooked", {
|
||||
description = "Cooked Porkchop",
|
||||
inventory_image = "cooking_pork_cooked.png",
|
||||
on_use = core.item_eat(8),
|
||||
})
|
||||
|
||||
core.register_craft({
|
||||
type= "cooking",
|
||||
recipe = "animalmaterials:meat_raw",
|
||||
output = "cooking:meat_cooked",
|
||||
})
|
||||
core.register_craft({
|
||||
type= "cooking",
|
||||
recipe = "animalmaterials:meat_pork",
|
||||
output = "cooking:meat_pork_cooked",
|
||||
})
|
||||
core.register_craft({
|
||||
type= "cooking",
|
||||
recipe = "animalmaterials:meat_chicken",
|
||||
output = "cooking:meat_chicken_cooked",
|
||||
})
|
||||
core.register_craft({
|
||||
type= "cooking",
|
||||
recipe = "animalmaterials:meat_beef",
|
||||
output = "cooking:meat_beef_cooked",
|
||||
})
|
||||
|
||||
core.register_craft({
|
||||
type= "cooking",
|
||||
recipe = "animalmaterials:meat_undead",
|
||||
output = "cooking:meat_undead_cooked",
|
||||
})
|
||||
core.register_craft({
|
||||
type= "cooking",
|
||||
recipe = "animalmaterials:meat_venison",
|
||||
output = "cooking:meat_venison_cooked",
|
||||
})
|
||||
core.register_craft({
|
||||
type= "cooking",
|
||||
recipe = "animalmaterials:meat_toxic",
|
||||
output = "cooking:meat_toxic_cooked",
|
||||
})
|
||||
core.register_craft({
|
||||
type= "cooking",
|
||||
recipe = "animalmaterials:fish_bluewhite",
|
||||
output = "cooking:fish_bluewhite_cooked",
|
||||
})
|
||||
core.register_craft({
|
||||
type= "cooking",
|
||||
recipe = "animalmaterials:fish_clownfish",
|
||||
output = "cooking:fish_clownfish_cooked",
|
||||
})
|
||||
core.register_craft({
|
||||
type = "cooking",
|
||||
output = "cooking:pork_cooked",
|
||||
recipe = "animalmaterials:pork_raw",
|
||||
cooktime = 5,
|
||||
})
|
||||
|
||||
core.log("action","MOD: cooking (by Mr Elmux) version .. " .. version .. " loaded.")
|
BIN
mods/animalmaterials/cooking/textures/cooking_cooked_meat.png
Normal file
After Width: | Height: | Size: 987 B |
BIN
mods/animalmaterials/cooking/textures/cooking_pork_cooked.png
Normal file
After Width: | Height: | Size: 224 B |
6
mods/animalmaterials/description.txt
Normal file
@ -0,0 +1,6 @@
|
||||
Animalmaterials contains resources to be used for mobs and animals
|
||||
|
||||
Changes:
|
||||
|
||||
0.0.1
|
||||
-initial version
|
60
mods/animalmaterials/mob_environments/README
Normal file
@ -0,0 +1,60 @@
|
||||
mob_environments
|
||||
|
||||
Thid mod contains a set of predefined environments to be used by mobs.
|
||||
This is just a set of example environments feel free do define your own ones.
|
||||
|
||||
There's a list of some special nodesets grouped by some criteria, e.g. plants
|
||||
|
||||
Following nodesets are available:
|
||||
################################################################################
|
||||
|
||||
mobf_env_placable_items
|
||||
-----------------------
|
||||
Flat items usually walkable
|
||||
|
||||
mobf_env_plants
|
||||
---------------
|
||||
Plants that don't stop you from walk to this node
|
||||
|
||||
mobf_env_flowers
|
||||
----------------
|
||||
Plants from flowers mod
|
||||
|
||||
################################################################################
|
||||
Following description starts with id to be used to specify the environment in
|
||||
mob declaration, followed by description
|
||||
|
||||
deep_water
|
||||
----------
|
||||
Deep water environment is water environment till about -50 nodes
|
||||
|
||||
flight_1
|
||||
--------
|
||||
Stay at least 13 nodes above ground but at max 23 nodes
|
||||
|
||||
meadow
|
||||
------
|
||||
Grass ground is prefered but dirt and sand are possible if there's no other
|
||||
option. Environment specifies some sorts of plants and "walk through" nodes to
|
||||
be fine additionally to air too.
|
||||
|
||||
simple_air
|
||||
-----------
|
||||
simple environment not limiting surfaces at all and containing lots of
|
||||
walk through items
|
||||
|
||||
on_ground_2
|
||||
-----------
|
||||
more specific on ground environment checking for surfaces known in default.
|
||||
This env contains most walk through items too.
|
||||
|
||||
open_waters
|
||||
-----------
|
||||
Open water but not to close to surface, mobs using this env will stay at least
|
||||
in 4 nodes depth and up to 30 nodes deep
|
||||
|
||||
shallow_waters
|
||||
--------------
|
||||
Maximum depth for this env is 10 nodes so a mob will stay quite close to surface
|
||||
|
||||
|
32
mods/animalmaterials/mob_environments/deep_water.lua
Normal file
@ -0,0 +1,32 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file deep_water.lua
|
||||
--! @brief deep water
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2013-10-03
|
||||
--
|
||||
--! @addtogroup environments
|
||||
--! @{
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
--! @struct env_deep_water
|
||||
--! @brief deep water is not moving water with a depht up to -50
|
||||
env_deep_water = {
|
||||
media = {
|
||||
"default:water_source",
|
||||
},
|
||||
surfaces = nil,
|
||||
--ground is first node above/below not beeing of media type
|
||||
max_height_above_ground = 0,
|
||||
min_height_above_ground = -50
|
||||
}
|
||||
--!@}
|
||||
|
||||
environment.register("deep_water", env_deep_water)
|
1
mods/animalmaterials/mob_environments/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
mobf
|
33
mods/animalmaterials/mob_environments/flight_1.lua
Normal file
@ -0,0 +1,33 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file flight_1.lua
|
||||
--! @brief a environment description for in flight mobs
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2012-08-10
|
||||
--
|
||||
--! @addtogroup environments
|
||||
--! @{
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
--! @struct env_flight_1
|
||||
--! @brief flying mobs in height between 13-23 blocks above surface
|
||||
env_flight_1 = {
|
||||
media = {
|
||||
"air"
|
||||
},
|
||||
surfaces = nil,
|
||||
--ground is first node above/below not beeing of media type
|
||||
max_height_above_ground = 23,
|
||||
min_height_above_ground = 13
|
||||
}
|
||||
|
||||
--!@}
|
||||
|
||||
environment.register("flight_1", env_flight_1)
|
56
mods/animalmaterials/mob_environments/general_env_sets.lua
Normal file
@ -0,0 +1,56 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file flight_1.lua
|
||||
--! @brief a environment description for in flight mobs
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2013-01-06
|
||||
--
|
||||
--! @addtogroup environments
|
||||
--! @{
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
--! @addtogroup predev_env_sets
|
||||
--! @{
|
||||
mobf_env_placable_items = {
|
||||
"default:rail",
|
||||
"default:ladder",
|
||||
"default:torch",
|
||||
"default:sign_wall",
|
||||
}
|
||||
|
||||
|
||||
mobf_env_plants = {
|
||||
"default:junglegrass",
|
||||
"default:papyrus",
|
||||
"default:sapling",
|
||||
"default:apple",
|
||||
"default:grass_1",
|
||||
"default:grass_2",
|
||||
"default:grass_3",
|
||||
"default:grass_4",
|
||||
"default:grass_5",
|
||||
-- From the vines mod...
|
||||
"vines:side",
|
||||
-- From the plantlife mod...
|
||||
"poisonivy:seedling",
|
||||
"poisonivy:sproutling"
|
||||
}
|
||||
|
||||
mobf_env_flowers = {
|
||||
"flowers:dandelion_white",
|
||||
"flowers:dandelion_yellow",
|
||||
"flowers:geranium",
|
||||
"flowers:rose",
|
||||
"flowers:tulip",
|
||||
"flowers:viola"
|
||||
}
|
||||
|
||||
--@}
|
||||
--@}
|
29
mods/animalmaterials/mob_environments/init.lua
Normal file
@ -0,0 +1,29 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- mob_environments Mod by Sapier
|
||||
--
|
||||
--
|
||||
--! @file init.lua
|
||||
--! @brief main init file for environment definitions
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2014-08-11
|
||||
--
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
local ar_version = "0.0.1"
|
||||
|
||||
core.log("action", "MOD: Loading mob_environments mod ...")
|
||||
|
||||
--!path of mod
|
||||
local me_modpath = minetest.get_modpath("mob_environments")
|
||||
|
||||
dofile (me_modpath .. "/general_env_sets.lua")
|
||||
dofile (me_modpath .. "/flight_1.lua")
|
||||
dofile (me_modpath .. "/meadow.lua")
|
||||
dofile (me_modpath .. "/on_ground_2.lua")
|
||||
dofile (me_modpath .. "/open_waters.lua")
|
||||
dofile (me_modpath .. "/shallow_waters.lua")
|
||||
dofile (me_modpath .. "/deep_water.lua")
|
||||
dofile (me_modpath .. "/simple_air.lua")
|
||||
|
||||
core.log("action", "MOD: mob_environments mod " .. ar_version .. " loaded.")
|
54
mods/animalmaterials/mob_environments/meadow.lua
Normal file
@ -0,0 +1,54 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file meadow.lua
|
||||
--! @brief meadow environment description
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2012-08-10
|
||||
--
|
||||
--! @addtogroup environments
|
||||
--! @{
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
--! @struct env_meadow
|
||||
--! @brief environment for mobs that prefere green meadows but may walk on
|
||||
--! dirt and sand too
|
||||
env_meadow = {
|
||||
media = {
|
||||
"air",
|
||||
},
|
||||
surfaces = {
|
||||
good = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_grass_footsteps"
|
||||
},
|
||||
possible = {
|
||||
"default:dirt",
|
||||
"default:sand",
|
||||
},
|
||||
},
|
||||
}
|
||||
--!@}
|
||||
|
||||
table.foreach(mobf_env_placable_items,
|
||||
function(index)
|
||||
table.insert(env_meadow.media,mobf_env_placable_items[index])
|
||||
end)
|
||||
|
||||
table.foreach(mobf_env_plants,
|
||||
function(index)
|
||||
table.insert(env_meadow.media,mobf_env_plants[index])
|
||||
end)
|
||||
|
||||
table.foreach(mobf_env_flowers,
|
||||
function(index)
|
||||
table.insert(env_meadow.media,mobf_env_flowers[index])
|
||||
end)
|
||||
|
||||
environment.register("meadow", env_meadow)
|
72
mods/animalmaterials/mob_environments/on_ground_2.lua
Normal file
@ -0,0 +1,72 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file on_ground_2.lua
|
||||
--! @brief a environment description for mobs on ground
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2012-08-10
|
||||
--
|
||||
--! @addtogroup environments
|
||||
--! @{
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
--! @struct env_on_ground_2
|
||||
--! @brief an environment for mobs capable of walking through junglegrass
|
||||
--! and stay on natural surfaces
|
||||
env_on_ground_2 = {
|
||||
media = {
|
||||
"air",
|
||||
},
|
||||
surfaces = {
|
||||
good = {
|
||||
"default:dirt_with_grass",
|
||||
"default:dirt_with_grass_footsteps",
|
||||
"default:dirt",
|
||||
"default:stone",
|
||||
"default:gravel",
|
||||
"default:cobble",
|
||||
"default:mossycobble",
|
||||
"default:desert_stone",
|
||||
"default:desert_sand",
|
||||
"default:sand",
|
||||
"default:stone_with_coal",
|
||||
"default:stone_with_iron",
|
||||
"default:stone_with_copper",
|
||||
"default:stone_with_mese",
|
||||
"default:stone_with_gold",
|
||||
"default:stone_with_diamond"
|
||||
},
|
||||
},
|
||||
|
||||
--TODO add support for light checks
|
||||
-- light = {
|
||||
-- min_light = 0,
|
||||
-- max_light = 0,
|
||||
-- }
|
||||
}
|
||||
|
||||
--!@}
|
||||
|
||||
table.foreach(mobf_env_placable_items,
|
||||
function(index)
|
||||
table.insert(env_on_ground_2.media,mobf_env_placable_items[index])
|
||||
end)
|
||||
|
||||
table.foreach(mobf_env_plants,
|
||||
function(index)
|
||||
table.insert(env_on_ground_2.media,mobf_env_plants[index])
|
||||
end)
|
||||
|
||||
table.foreach(mobf_env_flowers,
|
||||
function(index)
|
||||
table.insert(env_on_ground_2.media,mobf_env_flowers[index])
|
||||
end)
|
||||
|
||||
environment.register("on_ground_2", env_on_ground_2)
|
33
mods/animalmaterials/mob_environments/open_waters.lua
Normal file
@ -0,0 +1,33 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file open_waters.lua
|
||||
--! @brief open waters
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2012-08-10
|
||||
--
|
||||
--! @addtogroup environments
|
||||
--! @{
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
--! @struct env_open_waters
|
||||
--! @brief open waters from 4 to 30 blocks deep
|
||||
env_open_waters = {
|
||||
media = {
|
||||
"default:water_source",
|
||||
"default:water_flowing"
|
||||
},
|
||||
surfaces = nil,
|
||||
--ground is first node above/below not beeing of media type
|
||||
max_height_above_ground = -4,
|
||||
min_height_above_ground = -30
|
||||
}
|
||||
--!@}
|
||||
|
||||
environment.register("open_waters", env_open_waters)
|
33
mods/animalmaterials/mob_environments/shallow_waters.lua
Normal file
@ -0,0 +1,33 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file shallow_waters.lua
|
||||
--! @brief shallow waters
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2012-08-10
|
||||
--
|
||||
--! @addtogroup environments
|
||||
--! @{
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
--! @struct env_shallow_waters
|
||||
--! @brief shallow waters not deeper than 10 blocks
|
||||
env_shallow_waters = {
|
||||
media = {
|
||||
"default:water_source",
|
||||
"default:water_flowing"
|
||||
},
|
||||
surfaces = nil,
|
||||
--ground is first node above/below not beeing of media type
|
||||
max_height_above_ground = 1,
|
||||
min_height_above_ground = -10
|
||||
}
|
||||
--!@}
|
||||
|
||||
environment.register("shallow_waters", env_shallow_waters)
|
44
mods/animalmaterials/mob_environments/simple_air.lua
Normal file
@ -0,0 +1,44 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mob Framework Mod by Sapier
|
||||
--
|
||||
-- You may copy, use, modify or do nearly anything except removing this
|
||||
-- copyright notice.
|
||||
-- And of course you are NOT allow to pretend you have written it.
|
||||
--
|
||||
--! @file simple_air.lua
|
||||
--! @brief a very basic environment definition
|
||||
--! @copyright Sapier
|
||||
--! @author Sapier
|
||||
--! @date 2012-08-10
|
||||
--
|
||||
--! @addtogroup environments
|
||||
--! @{
|
||||
-- Contact sapier a t gmx net
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
--! @struct env_simple_air
|
||||
--! @brief simple environment only checking for air
|
||||
env_simple_air = {
|
||||
media = {
|
||||
"air",
|
||||
}
|
||||
}
|
||||
|
||||
--!@}
|
||||
|
||||
table.foreach(mobf_env_placable_items,
|
||||
function(index)
|
||||
table.insert(env_simple_air.media,mobf_env_placable_items[index])
|
||||
end)
|
||||
|
||||
table.foreach(mobf_env_plants,
|
||||
function(index)
|
||||
table.insert(env_simple_air.media,mobf_env_plants[index])
|
||||
end)
|
||||
|
||||
table.foreach(mobf_env_flowers,
|
||||
function(index)
|
||||
table.insert(env_simple_air.media,mobf_env_flowers[index])
|
||||
end)
|
||||
|
||||
environment.register("simple_air", env_simple_air)
|