diff --git a/README.md b/README.md index 6ff0b33c..6bff8b33 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/mods/animalmaterials/animal_resources/License.txt b/mods/animalmaterials/animal_resources/License.txt new file mode 100644 index 00000000..81022524 --- /dev/null +++ b/mods/animalmaterials/animal_resources/License.txt @@ -0,0 +1,3 @@ +Licenses + +CC0 only! \ No newline at end of file diff --git a/mods/animalmaterials/animal_resources/depends.txt b/mods/animalmaterials/animal_resources/depends.txt new file mode 100644 index 00000000..e69de29b diff --git a/mods/animalmaterials/animal_resources/init.lua b/mods/animalmaterials/animal_resources/init.lua new file mode 100644 index 00000000..2655ca7a --- /dev/null +++ b/mods/animalmaterials/animal_resources/init.lua @@ -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.") \ No newline at end of file diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.0.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.0.ogg new file mode 100644 index 00000000..1be50c6a Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.0.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.1.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.1.ogg new file mode 100644 index 00000000..6e888686 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.1.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.10.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.10.ogg new file mode 100644 index 00000000..5aa3a8dc Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.10.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.11.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.11.ogg new file mode 100644 index 00000000..a1051b78 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.11.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.12.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.12.ogg new file mode 100644 index 00000000..0931e34b Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.12.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.13.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.13.ogg new file mode 100644 index 00000000..8c3a9708 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.13.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.14.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.14.ogg new file mode 100644 index 00000000..b879efd7 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.14.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.15.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.15.ogg new file mode 100644 index 00000000..96c44156 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.15.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.16.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.16.ogg new file mode 100644 index 00000000..a6c76117 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.16.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.17.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.17.ogg new file mode 100644 index 00000000..7d5af082 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.17.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.18.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.18.ogg new file mode 100644 index 00000000..783eaea1 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.18.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.19.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.19.ogg new file mode 100644 index 00000000..d54ced2e Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.19.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.2.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.2.ogg new file mode 100644 index 00000000..eb7a4187 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.2.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.20.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.20.ogg new file mode 100644 index 00000000..a023105d Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.20.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.21.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.21.ogg new file mode 100644 index 00000000..9d7fcc08 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.21.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.22.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.22.ogg new file mode 100644 index 00000000..acc63fe0 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.22.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.23.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.23.ogg new file mode 100644 index 00000000..89c29a74 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.23.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.24.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.24.ogg new file mode 100644 index 00000000..b148f4e9 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.24.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.25.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.25.ogg new file mode 100644 index 00000000..ad8231aa Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.25.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.26.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.26.ogg new file mode 100644 index 00000000..978efeef Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.26.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.27.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.27.ogg new file mode 100644 index 00000000..60811a22 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.27.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.28.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.28.ogg new file mode 100644 index 00000000..ceb37af2 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.28.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.29.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.29.ogg new file mode 100644 index 00000000..e2ae0fd2 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.29.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.3.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.3.ogg new file mode 100644 index 00000000..e7f8d9e8 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.3.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.30.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.30.ogg new file mode 100644 index 00000000..b51130a0 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.30.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.31.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.31.ogg new file mode 100644 index 00000000..81d858ee Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.31.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.32.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.32.ogg new file mode 100644 index 00000000..f1a9b5e8 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.32.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.4.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.4.ogg new file mode 100644 index 00000000..adfdb6af Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.4.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.5.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.5.ogg new file mode 100644 index 00000000..0bdd7a02 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.5.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.6.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.6.ogg new file mode 100644 index 00000000..cef4517f Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.6.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.7.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.7.ogg new file mode 100644 index 00000000..d75f827c Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.7.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.8.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.8.ogg new file mode 100644 index 00000000..3823af08 Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.8.ogg differ diff --git a/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.9.ogg b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.9.ogg new file mode 100644 index 00000000..f3e718fe Binary files /dev/null and b/mods/animalmaterials/animal_resources/sounds/animal_resources_mattgarkusha_human_male_grunt.9.ogg differ diff --git a/mods/animalmaterials/animal_resources/textures/animal_resources_arrow.png b/mods/animalmaterials/animal_resources/textures/animal_resources_arrow.png new file mode 100644 index 00000000..9b72ee98 Binary files /dev/null and b/mods/animalmaterials/animal_resources/textures/animal_resources_arrow.png differ diff --git a/mods/animalmaterials/animal_resources/textures/animal_resources_arrow_2.png b/mods/animalmaterials/animal_resources/textures/animal_resources_arrow_2.png new file mode 100644 index 00000000..b5980d02 Binary files /dev/null and b/mods/animalmaterials/animal_resources/textures/animal_resources_arrow_2.png differ diff --git a/mods/animalmaterials/animal_resources/textures/animal_resources_arrow_back.png b/mods/animalmaterials/animal_resources/textures/animal_resources_arrow_back.png new file mode 100644 index 00000000..d680d88f Binary files /dev/null and b/mods/animalmaterials/animal_resources/textures/animal_resources_arrow_back.png differ diff --git a/mods/animalmaterials/animal_resources/textures/animal_resources_arrow_front.png b/mods/animalmaterials/animal_resources/textures/animal_resources_arrow_front.png new file mode 100644 index 00000000..828a486f Binary files /dev/null and b/mods/animalmaterials/animal_resources/textures/animal_resources_arrow_front.png differ diff --git a/mods/animalmaterials/animal_resources/textures/animal_resources_fireball.png b/mods/animalmaterials/animal_resources/textures/animal_resources_fireball.png new file mode 100644 index 00000000..ad4130fa Binary files /dev/null and b/mods/animalmaterials/animal_resources/textures/animal_resources_fireball.png differ diff --git a/mods/animalmaterials/animal_resources/textures/animal_resources_plasmaball.png b/mods/animalmaterials/animal_resources/textures/animal_resources_plasmaball.png new file mode 100644 index 00000000..a768bf20 Binary files /dev/null and b/mods/animalmaterials/animal_resources/textures/animal_resources_plasmaball.png differ diff --git a/mods/animalmaterials/animal_resources/tools.lua b/mods/animalmaterials/animal_resources/tools.lua new file mode 100644 index 00000000..8d48b20c --- /dev/null +++ b/mods/animalmaterials/animal_resources/tools.lua @@ -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 \ No newline at end of file diff --git a/mods/animalmaterials/animal_resources/weapons.lua b/mods/animalmaterials/animal_resources/weapons.lua new file mode 100644 index 00000000..6d66c7a4 --- /dev/null +++ b/mods/animalmaterials/animal_resources/weapons.lua @@ -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 diff --git a/mods/animalmaterials/animalmaterials/License.txt b/mods/animalmaterials/animalmaterials/License.txt new file mode 100644 index 00000000..15877d80 --- /dev/null +++ b/mods/animalmaterials/animalmaterials/License.txt @@ -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 \ No newline at end of file diff --git a/mods/animalmaterials/animalmaterials/depends.txt b/mods/animalmaterials/animalmaterials/depends.txt new file mode 100644 index 00000000..9207dab8 --- /dev/null +++ b/mods/animalmaterials/animalmaterials/depends.txt @@ -0,0 +1,2 @@ +default +intllib? diff --git a/mods/animalmaterials/animalmaterials/init.lua b/mods/animalmaterials/animalmaterials/init.lua new file mode 100644 index 00000000..0a0ac88d --- /dev/null +++ b/mods/animalmaterials/animalmaterials/init.lua @@ -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") + diff --git a/mods/animalmaterials/animalmaterials/locale/de.txt b/mods/animalmaterials/animalmaterials/locale/de.txt new file mode 100644 index 00000000..88d8538f --- /dev/null +++ b/mods/animalmaterials/animalmaterials/locale/de.txt @@ -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) diff --git a/mods/animalmaterials/animalmaterials/locale/template.txt b/mods/animalmaterials/animalmaterials/locale/template.txt new file mode 100644 index 00000000..1d2db2c3 --- /dev/null +++ b/mods/animalmaterials/animalmaterials/locale/template.txt @@ -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) = diff --git a/mods/animalmaterials/animalmaterials/models/animalmaterials_egg_ent.b3d b/mods/animalmaterials/animalmaterials/models/animalmaterials_egg_ent.b3d new file mode 100644 index 00000000..bbe079fc Binary files /dev/null and b/mods/animalmaterials/animalmaterials/models/animalmaterials_egg_ent.b3d differ diff --git a/mods/animalmaterials/animalmaterials/models/animalmaterials_egg_ent.xcf b/mods/animalmaterials/animalmaterials/models/animalmaterials_egg_ent.xcf new file mode 100644 index 00000000..9a61de6a Binary files /dev/null and b/mods/animalmaterials/animalmaterials/models/animalmaterials_egg_ent.xcf differ diff --git a/mods/animalmaterials/animalmaterials/models/egg.blend b/mods/animalmaterials/animalmaterials/models/egg.blend new file mode 100644 index 00000000..4a24a942 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/models/egg.blend differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_bone.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_bone.png new file mode 100644 index 00000000..71c68b6e Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_bone.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_cattle_coat.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_cattle_coat.png new file mode 100644 index 00000000..ab559d13 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_cattle_coat.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_contract.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_contract.png new file mode 100644 index 00000000..ccf484de Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_contract.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_deer_fur.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_deer_fur.png new file mode 100644 index 00000000..2c64a5ea Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_deer_fur.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_deer_horns.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_deer_horns.png new file mode 100644 index 00000000..6f1d34ae Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_deer_horns.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_egg.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_egg.png new file mode 100644 index 00000000..50010de8 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_egg.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_egg_big.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_egg_big.png new file mode 100644 index 00000000..610ea0e8 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_egg_big.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_egg_ent_mesh.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_egg_ent_mesh.png new file mode 100644 index 00000000..c020e3eb Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_egg_ent_mesh.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_feather.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_feather.png new file mode 100644 index 00000000..f5795680 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_feather.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_fur.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_fur.png new file mode 100644 index 00000000..c8dd7e30 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_fur.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_glass.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_glass.png new file mode 100644 index 00000000..9fadc0dc Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_glass.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_ivory.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_ivory.png new file mode 100644 index 00000000..3a1957fa Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_ivory.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_lasso.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_lasso.png new file mode 100644 index 00000000..ef3797a4 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_lasso.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_meat_raw.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_meat_raw.png new file mode 100644 index 00000000..0dea4ec5 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_meat_raw.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_meat_toxic_raw.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_meat_toxic_raw.png new file mode 100644 index 00000000..06f5e87f Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_meat_toxic_raw.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_meat_undead_raw.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_meat_undead_raw.png new file mode 100644 index 00000000..e48abdbe Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_meat_undead_raw.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_milk.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_milk.png new file mode 100644 index 00000000..e5352645 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_milk.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_net.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_net.png new file mode 100644 index 00000000..5f92ddc1 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_net.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_pork_raw.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_pork_raw.png new file mode 100644 index 00000000..c070c57e Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_pork_raw.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_saddle.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_saddle.png new file mode 100644 index 00000000..aba0f9c7 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_saddle.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_blue.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_blue.png new file mode 100644 index 00000000..b970c23e Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_blue.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_golden.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_golden.png new file mode 100644 index 00000000..6e5dabed Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_golden.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_grey.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_grey.png new file mode 100644 index 00000000..901bc8f9 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_grey.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_white.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_white.png new file mode 100644 index 00000000..5d96ac75 Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scale_white.png differ diff --git a/mods/animalmaterials/animalmaterials/textures/animalmaterials_scissors.png b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scissors.png new file mode 100644 index 00000000..8d34596e Binary files /dev/null and b/mods/animalmaterials/animalmaterials/textures/animalmaterials_scissors.png differ diff --git a/mods/animalmaterials/cooking/License.txt b/mods/animalmaterials/cooking/License.txt new file mode 100644 index 00000000..cec599d3 --- /dev/null +++ b/mods/animalmaterials/cooking/License.txt @@ -0,0 +1 @@ +Everything CC-BY-SA MrElmux diff --git a/mods/animalmaterials/cooking/depends.txt b/mods/animalmaterials/cooking/depends.txt new file mode 100644 index 00000000..b2a311e0 --- /dev/null +++ b/mods/animalmaterials/cooking/depends.txt @@ -0,0 +1,2 @@ +default +animalmaterials diff --git a/mods/animalmaterials/cooking/init.lua b/mods/animalmaterials/cooking/init.lua new file mode 100644 index 00000000..29852a22 --- /dev/null +++ b/mods/animalmaterials/cooking/init.lua @@ -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.") \ No newline at end of file diff --git a/mods/animalmaterials/cooking/textures/cooking_cooked_meat.png b/mods/animalmaterials/cooking/textures/cooking_cooked_meat.png new file mode 100644 index 00000000..ec737918 Binary files /dev/null and b/mods/animalmaterials/cooking/textures/cooking_cooked_meat.png differ diff --git a/mods/animalmaterials/cooking/textures/cooking_pork_cooked.png b/mods/animalmaterials/cooking/textures/cooking_pork_cooked.png new file mode 100644 index 00000000..8d8c1668 Binary files /dev/null and b/mods/animalmaterials/cooking/textures/cooking_pork_cooked.png differ diff --git a/mods/animalmaterials/description.txt b/mods/animalmaterials/description.txt new file mode 100644 index 00000000..cce89818 --- /dev/null +++ b/mods/animalmaterials/description.txt @@ -0,0 +1,6 @@ +Animalmaterials contains resources to be used for mobs and animals + +Changes: + +0.0.1 + -initial version diff --git a/mods/animalmaterials/mob_environments/README b/mods/animalmaterials/mob_environments/README new file mode 100644 index 00000000..c389611d --- /dev/null +++ b/mods/animalmaterials/mob_environments/README @@ -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 + + diff --git a/mods/animalmaterials/mob_environments/deep_water.lua b/mods/animalmaterials/mob_environments/deep_water.lua new file mode 100644 index 00000000..12c562bd --- /dev/null +++ b/mods/animalmaterials/mob_environments/deep_water.lua @@ -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) \ No newline at end of file diff --git a/mods/animalmaterials/mob_environments/depends.txt b/mods/animalmaterials/mob_environments/depends.txt new file mode 100644 index 00000000..f41c3378 --- /dev/null +++ b/mods/animalmaterials/mob_environments/depends.txt @@ -0,0 +1 @@ +mobf \ No newline at end of file diff --git a/mods/animalmaterials/mob_environments/flight_1.lua b/mods/animalmaterials/mob_environments/flight_1.lua new file mode 100644 index 00000000..03e585a8 --- /dev/null +++ b/mods/animalmaterials/mob_environments/flight_1.lua @@ -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) \ No newline at end of file diff --git a/mods/animalmaterials/mob_environments/general_env_sets.lua b/mods/animalmaterials/mob_environments/general_env_sets.lua new file mode 100644 index 00000000..fc1c10f7 --- /dev/null +++ b/mods/animalmaterials/mob_environments/general_env_sets.lua @@ -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" +} + +--@} +--@} diff --git a/mods/animalmaterials/mob_environments/init.lua b/mods/animalmaterials/mob_environments/init.lua new file mode 100644 index 00000000..ba1b411c --- /dev/null +++ b/mods/animalmaterials/mob_environments/init.lua @@ -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.") \ No newline at end of file diff --git a/mods/animalmaterials/mob_environments/meadow.lua b/mods/animalmaterials/mob_environments/meadow.lua new file mode 100644 index 00000000..95ea7503 --- /dev/null +++ b/mods/animalmaterials/mob_environments/meadow.lua @@ -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) \ No newline at end of file diff --git a/mods/animalmaterials/mob_environments/on_ground_2.lua b/mods/animalmaterials/mob_environments/on_ground_2.lua new file mode 100644 index 00000000..0b42edf1 --- /dev/null +++ b/mods/animalmaterials/mob_environments/on_ground_2.lua @@ -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) \ No newline at end of file diff --git a/mods/animalmaterials/mob_environments/open_waters.lua b/mods/animalmaterials/mob_environments/open_waters.lua new file mode 100644 index 00000000..30172c92 --- /dev/null +++ b/mods/animalmaterials/mob_environments/open_waters.lua @@ -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) \ No newline at end of file diff --git a/mods/animalmaterials/mob_environments/shallow_waters.lua b/mods/animalmaterials/mob_environments/shallow_waters.lua new file mode 100644 index 00000000..9559d96d --- /dev/null +++ b/mods/animalmaterials/mob_environments/shallow_waters.lua @@ -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) \ No newline at end of file diff --git a/mods/animalmaterials/mob_environments/simple_air.lua b/mods/animalmaterials/mob_environments/simple_air.lua new file mode 100644 index 00000000..6551bfdf --- /dev/null +++ b/mods/animalmaterials/mob_environments/simple_air.lua @@ -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) \ No newline at end of file diff --git a/mods/animalmaterials/modpack.txt b/mods/animalmaterials/modpack.txt new file mode 100644 index 00000000..e69de29b