@ -1 +0,0 @@ |
|||||
See "oldcoder.txt". |
|
@ -1,12 +0,0 @@ |
|||||
Minetest Game mod: bones |
|
||||
======================== |
|
||||
See license.txt for license information. |
|
||||
|
|
||||
Authors of source code |
|
||||
---------------------- |
|
||||
Originally by PilzAdam (MIT) |
|
||||
Various Minetest developers and contributors (MIT) |
|
||||
|
|
||||
Authors of media (textures) |
|
||||
--------------------------- |
|
||||
All textures: paramat (CC BY-SA 3.0) |
|
@ -1,249 +0,0 @@ |
|||||
-- Minetest 0.4 mod: bones |
|
||||
-- See README.txt for licensing and other information. |
|
||||
|
|
||||
local function is_owner(pos, name) |
|
||||
local owner = minetest.get_meta(pos):get_string("owner") |
|
||||
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then |
|
||||
return true |
|
||||
end |
|
||||
return false |
|
||||
end |
|
||||
|
|
||||
local bones_formspec = |
|
||||
"size[8,9]" .. |
|
||||
default.gui_bg .. |
|
||||
default.gui_bg_img .. |
|
||||
default.gui_slots .. |
|
||||
"list[current_name;main;0,0.3;8,4;]" .. |
|
||||
"list[current_player;main;0,4.85;8,1;]" .. |
|
||||
"list[current_player;main;0,6.08;8,3;8]" .. |
|
||||
"listring[current_name;main]" .. |
|
||||
"listring[current_player;main]" .. |
|
||||
default.get_hotbar_bg(0,4.85) |
|
||||
|
|
||||
local share_bones_time = tonumber(minetest.setting_get("share_bones_time")) or 1200 |
|
||||
local share_bones_time_early = tonumber(minetest.setting_get("share_bones_time_early")) or share_bones_time / 4 |
|
||||
|
|
||||
minetest.register_node("bones:bones", { |
|
||||
description = "Bones", |
|
||||
tiles = { |
|
||||
"bones_top.png^[transform2", |
|
||||
"bones_bottom.png", |
|
||||
"bones_side.png", |
|
||||
"bones_side.png", |
|
||||
"bones_rear.png", |
|
||||
"bones_front.png" |
|
||||
}, |
|
||||
paramtype2 = "facedir", |
|
||||
groups = {dig_immediate = 2}, |
|
||||
sounds = default.node_sound_gravel_defaults(), |
|
||||
|
|
||||
can_dig = function(pos, player) |
|
||||
local inv = minetest.get_meta(pos):get_inventory() |
|
||||
local name = "" |
|
||||
if player then |
|
||||
name = player:get_player_name() |
|
||||
end |
|
||||
return is_owner(pos, name) and inv:is_empty("main") |
|
||||
end, |
|
||||
|
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) |
|
||||
if is_owner(pos, player:get_player_name()) then |
|
||||
return count |
|
||||
end |
|
||||
return 0 |
|
||||
end, |
|
||||
|
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player) |
|
||||
return 0 |
|
||||
end, |
|
||||
|
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player) |
|
||||
if is_owner(pos, player:get_player_name()) then |
|
||||
return stack:get_count() |
|
||||
end |
|
||||
return 0 |
|
||||
end, |
|
||||
|
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player) |
|
||||
local meta = minetest.get_meta(pos) |
|
||||
if meta:get_inventory():is_empty("main") then |
|
||||
minetest.remove_node(pos) |
|
||||
end |
|
||||
end, |
|
||||
|
|
||||
on_punch = function(pos, node, player) |
|
||||
if not is_owner(pos, player:get_player_name()) then |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
if minetest.get_meta(pos):get_string("infotext") == "" then |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
local inv = minetest.get_meta(pos):get_inventory() |
|
||||
local player_inv = player:get_inventory() |
|
||||
local has_space = true |
|
||||
|
|
||||
for i = 1, inv:get_size("main") do |
|
||||
local stk = inv:get_stack("main", i) |
|
||||
if player_inv:room_for_item("main", stk) then |
|
||||
inv:set_stack("main", i, nil) |
|
||||
player_inv:add_item("main", stk) |
|
||||
else |
|
||||
has_space = false |
|
||||
break |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
-- remove bones if player emptied them |
|
||||
if has_space then |
|
||||
if player_inv:room_for_item("main", {name = "bones:bones"}) then |
|
||||
player_inv:add_item("main", {name = "bones:bones"}) |
|
||||
else |
|
||||
minetest.add_item(pos,"bones:bones") |
|
||||
end |
|
||||
minetest.remove_node(pos) |
|
||||
end |
|
||||
end, |
|
||||
|
|
||||
on_timer = function(pos, elapsed) |
|
||||
local meta = minetest.get_meta(pos) |
|
||||
local time = meta:get_int("time") + elapsed |
|
||||
if time >= share_bones_time then |
|
||||
meta:set_string("infotext", meta:get_string("owner") .. "'s old bones") |
|
||||
meta:set_string("owner", "") |
|
||||
else |
|
||||
meta:set_int("time", time) |
|
||||
return true |
|
||||
end |
|
||||
end, |
|
||||
on_blast = function(pos) |
|
||||
end, |
|
||||
}) |
|
||||
|
|
||||
local function may_replace(pos, player) |
|
||||
local node_name = minetest.get_node(pos).name |
|
||||
local node_definition = minetest.registered_nodes[node_name] |
|
||||
|
|
||||
-- if the node is unknown, we return false |
|
||||
if not node_definition then |
|
||||
return false |
|
||||
end |
|
||||
|
|
||||
-- allow replacing air and liquids |
|
||||
if node_name == "air" or node_definition.liquidtype ~= "none" then |
|
||||
return true |
|
||||
end |
|
||||
|
|
||||
-- don't replace filled chests and other nodes that don't allow it |
|
||||
local can_dig_func = node_definition.can_dig |
|
||||
if can_dig_func and not can_dig_func(pos, player) then |
|
||||
return false |
|
||||
end |
|
||||
|
|
||||
-- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones? |
|
||||
-- flowers being squished by bones are more realistical than a squished stone, too |
|
||||
-- exception are of course any protected buildable_to |
|
||||
return node_definition.buildable_to and not minetest.is_protected(pos, player:get_player_name()) |
|
||||
end |
|
||||
|
|
||||
local drop = function(pos, itemstack) |
|
||||
local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count())) |
|
||||
if obj then |
|
||||
obj:setvelocity({ |
|
||||
x = math.random(-10, 10) / 9, |
|
||||
y = 5, |
|
||||
z = math.random(-10, 10) / 9, |
|
||||
}) |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
minetest.register_on_dieplayer(function(player) |
|
||||
|
|
||||
local bones_mode = minetest.setting_get("bones_mode") or "bones" |
|
||||
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then |
|
||||
bones_mode = "bones" |
|
||||
end |
|
||||
|
|
||||
-- return if keep inventory set or in creative mode |
|
||||
if bones_mode == "keep" or (creative and creative.is_enabled_for |
|
||||
and creative.is_enabled_for(player:get_player_name())) then |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
local player_inv = player:get_inventory() |
|
||||
if player_inv:is_empty("main") and |
|
||||
player_inv:is_empty("craft") then |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
local pos = vector.round(player:getpos()) |
|
||||
local player_name = player:get_player_name() |
|
||||
|
|
||||
-- check if it's possible to place bones, if not find space near player |
|
||||
if bones_mode == "bones" and not may_replace(pos, player) then |
|
||||
local air = minetest.find_node_near(pos, 1, {"air"}) |
|
||||
if air and not minetest.is_protected(air, player_name) then |
|
||||
pos = air |
|
||||
else |
|
||||
bones_mode = "drop" |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
if bones_mode == "drop" then |
|
||||
|
|
||||
-- drop inventory items |
|
||||
for i = 1, player_inv:get_size("main") do |
|
||||
drop(pos, player_inv:get_stack("main", i)) |
|
||||
end |
|
||||
player_inv:set_list("main", {}) |
|
||||
|
|
||||
-- drop crafting grid items |
|
||||
for i = 1, player_inv:get_size("craft") do |
|
||||
drop(pos, player_inv:get_stack("craft", i)) |
|
||||
end |
|
||||
player_inv:set_list("craft", {}) |
|
||||
|
|
||||
drop(pos, ItemStack("bones:bones")) |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
local param2 = minetest.dir_to_facedir(player:get_look_dir()) |
|
||||
minetest.set_node(pos, {name = "bones:bones", param2 = param2}) |
|
||||
|
|
||||
local meta = minetest.get_meta(pos) |
|
||||
local inv = meta:get_inventory() |
|
||||
inv:set_size("main", 8 * 4) |
|
||||
inv:set_list("main", player_inv:get_list("main")) |
|
||||
|
|
||||
for i = 1, player_inv:get_size("craft") do |
|
||||
local stack = player_inv:get_stack("craft", i) |
|
||||
if inv:room_for_item("main", stack) then |
|
||||
inv:add_item("main", stack) |
|
||||
else |
|
||||
--drop if no space left |
|
||||
drop(pos, stack) |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
player_inv:set_list("main", {}) |
|
||||
player_inv:set_list("craft", {}) |
|
||||
|
|
||||
meta:set_string("formspec", bones_formspec) |
|
||||
meta:set_string("owner", player_name) |
|
||||
|
|
||||
if share_bones_time ~= 0 then |
|
||||
meta:set_string("infotext", player_name .. "'s fresh bones") |
|
||||
|
|
||||
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then |
|
||||
meta:set_int("time", 0) |
|
||||
else |
|
||||
meta:set_int("time", (share_bones_time - share_bones_time_early)) |
|
||||
end |
|
||||
|
|
||||
minetest.get_node_timer(pos):start(10) |
|
||||
else |
|
||||
meta:set_string("infotext", player_name.."'s bones") |
|
||||
end |
|
||||
end) |
|
@ -1,58 +0,0 @@ |
|||||
License of source code |
|
||||
---------------------- |
|
||||
|
|
||||
The MIT License (MIT) |
|
||||
Copyright (C) 2012-2016 PilzAdam |
|
||||
Copyright (C) 2012-2016 Various Minetest developers and contributors |
|
||||
|
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this |
|
||||
software and associated documentation files (the "Software"), to deal in the Software |
|
||||
without restriction, including without limitation the rights to use, copy, modify, merge, |
|
||||
publish, distribute, sublicense, and/or sell copies of the Software, and to permit |
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions: |
|
||||
|
|
||||
The above copyright notice and this permission notice shall be included in all copies or |
|
||||
substantial portions of the Software. |
|
||||
|
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
|
||||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE |
|
||||
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
||||
DEALINGS IN THE SOFTWARE. |
|
||||
|
|
||||
For more details: |
|
||||
https://opensource.org/licenses/MIT |
|
||||
|
|
||||
|
|
||||
Licenses of media (textures) |
|
||||
---------------------------- |
|
||||
|
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) |
|
||||
Copyright (C) 2016 paramat |
|
||||
|
|
||||
You are free to: |
|
||||
Share — copy and redistribute the material in any medium or format. |
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even commercially. |
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms. |
|
||||
|
|
||||
Under the following terms: |
|
||||
|
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and |
|
||||
indicate if changes were made. You may do so in any reasonable manner, but not in any way |
|
||||
that suggests the licensor endorses you or your use. |
|
||||
|
|
||||
ShareAlike — If you remix, transform, or build upon the material, you must distribute |
|
||||
your contributions under the same license as the original. |
|
||||
|
|
||||
No additional restrictions — You may not apply legal terms or technological measures that |
|
||||
legally restrict others from doing anything the license permits. |
|
||||
|
|
||||
Notices: |
|
||||
|
|
||||
You do not have to comply with the license for elements of the material in the public |
|
||||
domain or where your use is permitted by an applicable exception or limitation. |
|
||||
No warranties are given. The license may not give you all of the permissions necessary |
|
||||
for your intended use. For example, other rights such as publicity, privacy, or moral |
|
||||
rights may limit how you use the material. |
|
||||
|
|
@ -1,20 +0,0 @@ |
|||||
Name: stairs |
|
||||
Source: Modified upstream mod (do not replace) |
|
||||
License: See "license.txt" |
|
||||
|
|
||||
---------------------------------------------------------------------- |
|
||||
|
|
||||
1. This is a copy of the standard MT "stairs" mod from circa mid-2016. |
|
||||
It should not, ever, be synced with upstream or placing and/or screw- |
|
||||
driver may not work correctly. |
|
||||
|
|
||||
As a related note, the following upstream commit in "minetest_game", |
|
||||
which applies to "stairs", is bad and shouldn't be used: |
|
||||
|
|
||||
e6d0d775e3533b7b91b292e13c800b9737e057fd |
|
||||
|
|
||||
---------------------------------------------------------------------- |
|
||||
|
|
||||
2. Changes include: |
|
||||
|
|
||||
2a. Added the files "00README" and "oldcoder.txt" (this file). |
|
@ -1,50 +0,0 @@ |
|||||
# Minetest Handpainted Texture Pack |
|
||||
|
|
||||
**!!! WORK IN PROGRESS !!!** |
|
||||
|
|
||||
This will be a high-res (128x128) texture pack for Minetest. Its license is CC0 1.0. |
|
||||
|
|
||||
The files in this repo are actually [webtoon](https://github.com/pithydon/webtoon) |
|
||||
CC0 texture pack, which I keep rewriting with the new textures. |
|
||||
|
|
||||
The textures are largely my own work, but a lot of them are taken out of other |
|
||||
CC0 works. |
|
||||
|
|
||||
I won't be commiting extremely often in order to not bloat the repo with binary file |
|
||||
changes. |
|
||||
|
|
||||
Most notable texture sources (feel free to send me more sources or your own contributions): |
|
||||
|
|
||||
- https://www.blendswap.com/blends/view/74021 |
|
||||
- https://opengameart.org/content/glitch-sprite-assets-huge-collection |
|
||||
- https://opengameart.org/content/glitch-alpine-landscape-svg |
|
||||
- https://opengameart.org/content/handpainted-tileable-textures-512%D1%85512 |
|
||||
- https://opengameart.org/content/handpainted-stone-wall-textures |
|
||||
- https://opengameart.org/content/4-hand-painted-ground-textures |
|
||||
- https://opengameart.org/content/rpg-item-collection-3 |
|
||||
- https://opengameart.org/content/rpg-item-collection-2 |
|
||||
- https://opengameart.org/content/rpg-item-collection-1 |
|
||||
- https://opengameart.org/content/crate-barrel-bundle |
|
||||
- https://opengameart.org/content/desert-rock |
|
||||
- https://opengameart.org/content/glitch-groddle-forestmeadow-terrain-svg |
|
||||
- https://opengameart.org/content/free-handpainted-plants-2 |
|
||||
- https://opengameart.org/content/free-handpainted-plants |
|
||||
- https://opengameart.org/content/chest-blizzard-style |
|
||||
- https://opengameart.org/content/free-lowpoly-golds |
|
||||
- https://opengameart.org/content/stone-coffin |
|
||||
- https://opengameart.org/content/free-textures-pack-59 |
|
||||
- https://www.blendswap.com/blends/view/46952 |
|
||||
- https://www.blendswap.com/blends/view/73730 |
|
||||
- https://opengameart.org/content/wyrmsun-cc0-over-900-items |
|
||||
- https://opengameart.org/content/40-procedural-textures |
|
||||
- https://opengameart.org/content/procedural-texture-pack?page=1 |
|
||||
- https://opengameart.org/content/cool-leaves-textures |
|
||||
- https://www.deviantart.com/yughues/art/Free-IDKWIAD-3-730335893 |
|
||||
- https://www.deviantart.com/yughues/art/Free-IDKWIAD-4-732217780 |
|
||||
- https://opengameart.org/content/freebies-mundo-commissions |
|
||||
- https://pixabay.com/en/floral-paisley-background-flower-1556345/ |
|
||||
- https://deepart.io |
|
||||
- https://opengameart.org/content/fantasy-crystal-set |
|
||||
- https://opengameart.org/content/cute-prop-models |
|
||||
- https://www.blendswap.com/blends/view/89476 |
|
||||
- https://pixabay.com/en/bread-food-bakery-foodstuff-baking-3365842/ |
|
@ -1,310 +0,0 @@ |
|||||
-- FOOD MOD |
|
||||
-- A mod written by rubenwardy that adds |
|
||||
-- food to the minetest game |
|
||||
-- ===================================== |
|
||||
-- >> food_basic/ingredients.lua |
|
||||
-- Fallback ingredients |
|
||||
-- ===================================== |
|
||||
|
|
||||
-- Boilerplate to support localized strings if intllib mod is installed. |
|
||||
local S = 0 |
|
||||
if minetest.get_modpath("intllib") then |
|
||||
S = intllib.Getter() |
|
||||
else |
|
||||
S = function ( s ) return s end |
|
||||
end |
|
||||
|
|
||||
food.module("wheat", function() |
|
||||
minetest.register_craftitem(":food:wheat", { |
|
||||
description = S("Wheat"), |
|
||||
inventory_image = "food_wheat.png", |
|
||||
groups = {food_wheat=1} |
|
||||
}) |
|
||||
|
|
||||
food.craft({ |
|
||||
output = "food:wheat", |
|
||||
recipe = { |
|
||||
{"default:dry_shrub"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("flour", function() |
|
||||
minetest.register_craftitem(":food:flour", { |
|
||||
description = S("Flour"), |
|
||||
inventory_image = "food_flour.png", |
|
||||
groups = {food_flour = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:flour", |
|
||||
recipe = { |
|
||||
{"group:food_wheat"}, |
|
||||
{"group:food_wheat"} |
|
||||
} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:flour", |
|
||||
recipe = { |
|
||||
{"default:sand"}, |
|
||||
{"default:sand"} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("potato", function() |
|
||||
minetest.register_craftitem(":food:potato", { |
|
||||
description = S("Potato"), |
|
||||
inventory_image = "food_potato.png", |
|
||||
groups = {food_potato = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:potato", |
|
||||
recipe = { |
|
||||
{"default:dirt"}, |
|
||||
{"default:apple"} |
|
||||
|
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("orange", function() |
|
||||
minetest.register_craftitem(":food:orange", { |
|
||||
description = S("Orange"), |
|
||||
inventory_image = "food_orange.png", |
|
||||
groups = {food_orange = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:orange", |
|
||||
recipe = { |
|
||||
{"", "default:desert_sand", ""}, |
|
||||
{"default:desert_sand", "default:desert_sand", "default:desert_sand"}, |
|
||||
{"", "default:desert_sand", ""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("tomato", function() |
|
||||
minetest.register_craftitem(":food:tomato", { |
|
||||
description = S("Tomato"), |
|
||||
inventory_image = "food_tomato.png", |
|
||||
groups = {food_tomato = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:tomato", |
|
||||
recipe = { |
|
||||
{"", "default:desert_sand", ""}, |
|
||||
{"default:desert_sand", "", "default:desert_sand"}, |
|
||||
{"", "default:desert_sand", ""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("carrot", function() |
|
||||
minetest.register_craftitem(":food:carrot", { |
|
||||
description = S("Carrot"), |
|
||||
inventory_image = "food_carrot.png", |
|
||||
groups = {food_carrot=1}, |
|
||||
on_use = food.item_eat(3) |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:carrot", |
|
||||
recipe = { |
|
||||
{"default:apple", "default:apple", "default:apple"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("milk", function() |
|
||||
minetest.register_craftitem(":food:milk", { |
|
||||
description = S("Milk"), |
|
||||
image = "food_milk.png", |
|
||||
on_use = food.item_eat(1), |
|
||||
groups = { eatable=1, food_milk = 1 }, |
|
||||
stack_max=10 |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:milk", |
|
||||
recipe = { |
|
||||
{"default:sand"}, |
|
||||
{"bucket:bucket_water"} |
|
||||
}, |
|
||||
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}, |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("egg", function() |
|
||||
minetest.register_craftitem(":food:egg", { |
|
||||
description = S("Egg"), |
|
||||
inventory_image = "food_egg.png", |
|
||||
groups = {food_egg=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:egg", |
|
||||
recipe = { |
|
||||
{"", "default:sand", ""}, |
|
||||
{"default:sand", "", "default:sand"}, |
|
||||
{"", "default:sand", ""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("cocoa", function() |
|
||||
minetest.register_craftitem(":food:cocoa", { |
|
||||
description = S("Cocoa Bean"), |
|
||||
inventory_image = "food_cocoa.png", |
|
||||
groups = {food_cocoa=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:cocoa", |
|
||||
recipe = { |
|
||||
{"", "default:apple", ""}, |
|
||||
{"default:apple", "", "default:apple"}, |
|
||||
{"", "default:apple", ""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("meat", function() |
|
||||
minetest.register_craftitem(":food:meat", { |
|
||||
description = S("Venison"), |
|
||||
inventory_image = "food_meat.png", |
|
||||
groups = {food_meat=1, food_chicken=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:meat", |
|
||||
recipe = "group:food_meat_raw", |
|
||||
cooktime = 30 |
|
||||
}) |
|
||||
|
|
||||
if not minetest.get_modpath("animalmaterials") then |
|
||||
minetest.register_craftitem(":food:meat_raw", { |
|
||||
description = S("Raw meat"), |
|
||||
image = "food_meat_raw.png", |
|
||||
on_use = food.item_eat(1), |
|
||||
groups = { meat=1, eatable=1, food_meat_raw=1 }, |
|
||||
stack_max=25 |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:meat_raw", |
|
||||
recipe = { |
|
||||
{"default:apple"}, |
|
||||
{"default:dirt"} |
|
||||
} |
|
||||
}) |
|
||||
end |
|
||||
end, true) |
|
||||
|
|
||||
food.module("sugar", function() |
|
||||
minetest.register_craftitem(":food:sugar", { |
|
||||
description = S("Sugar"), |
|
||||
inventory_image = "food_sugar.png", |
|
||||
groups = {food_sugar=1} |
|
||||
}) |
|
||||
|
|
||||
minetest.register_craft({ |
|
||||
output = "food:sugar 20", |
|
||||
recipe = { |
|
||||
{"default:papyrus"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("chocolate_powder", function() |
|
||||
minetest.register_craftitem(":food:chocolate_powder", { |
|
||||
description = S("Chocolate Powder"), |
|
||||
inventory_image = "food_chocolate_powder.png", |
|
||||
groups = {food_choco_powder = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:chocolate_powder 16", |
|
||||
recipe = { |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"}, |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"}, |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("pasta", function() |
|
||||
minetest.register_craftitem(":food:pasta",{ |
|
||||
description = S("Pasta"), |
|
||||
inventory_image = "food_pasta.png", |
|
||||
groups = {food_pasta=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:pasta 4", |
|
||||
type = "shapeless", |
|
||||
recipe = {"group:food_flour","group:food_egg","group:food_egg"} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("bowl", function() |
|
||||
minetest.register_craftitem(":food:bowl",{ |
|
||||
description = S("Bowl"), |
|
||||
inventory_image = "food_bowl.png", |
|
||||
groups = {food_bowl=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:bowl", |
|
||||
recipe = { |
|
||||
{"default:clay_lump","","default:clay_lump"}, |
|
||||
{"","default:clay_lump",""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("butter", function() |
|
||||
minetest.register_craftitem(":food:butter", { |
|
||||
description = S("Butter"), |
|
||||
inventory_image = "food_butter.png", |
|
||||
groups = {food_butter=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:butter", |
|
||||
recipe = {{"group:food_milkbucket","group:food_milkbucket"}}, |
|
||||
replacements = { |
|
||||
{"group:food_milkbucket","bucket:bucket_empty"}, |
|
||||
{"group:food_milkbucket","bucket:bucket_empty"} |
|
||||
}, |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:butter", |
|
||||
recipe = { |
|
||||
{"group:food_milk","group:food_milkbucket"} |
|
||||
}, |
|
||||
replacements = { |
|
||||
{"group:food_milkbucket","bucket:bucket_empty"}, |
|
||||
}, |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:butter", |
|
||||
recipe = { |
|
||||
{"group:food_milk","group:food_milk"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("cheese", function() |
|
||||
minetest.register_craftitem(":food:cheese", { |
|
||||
description = S("Cheese"), |
|
||||
inventory_image = "food_cheese.png", |
|
||||
on_use = food.item_eat(4), |
|
||||
groups = {food_cheese=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:cheese", |
|
||||
recipe = { |
|
||||
{"group:food_butter","group:food_butter"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
if (minetest.get_modpath("animalmaterials") and not minetest.get_modpath("mobfcooking")) then |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:meat", |
|
||||
recipe = "animalmaterials:meat_raw", |
|
||||
cooktime = 30 |
|
||||
}) |
|
||||
end |
|
@ -1,331 +0,0 @@ |
|||||
-- FOOD MOD |
|
||||
-- A mod written by rubenwardy that adds |
|
||||
-- food to the minetest game |
|
||||
-- ===================================== |
|
||||
-- >> food_basic/init.lua |
|
||||
-- Some basic foods |
|
||||
-- ===================================== |
|
||||
|
|
||||
print("Food Mod - Version 2.3") |
|
||||
|
|
||||
if not minetest.registered_nodes ["mobs:egg"] then |
|
||||
minetest.register_node(":mobs:egg", { |
|
||||
description = "Chicken Egg", |
|
||||
tiles = {"mobs_chicken_egg.png"}, |
|
||||
inventory_image = "mobs_chicken_egg.png", |
|
||||
visual_scale = 0.7 , |
|
||||
drawtype = "plantlike" , |
|
||||
wield_image = "mobs_chicken_egg.png" , |
|
||||
paramtype = "light" , |
|
||||
walkable = false, |
|
||||
is_ground_content = true, |
|
||||
sunlight_propagates = true, |
|
||||
selection_box = { |
|
||||
type = "fixed", |
|
||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2} |
|
||||
}, |
|
||||
groups = {snappy=2, dig_immediate=3}, |
|
||||
after_place_node = function(pos, placer, itemstack) |
|
||||
if placer:is_player() then |
|
||||
minetest.set_node(pos, {name = "mobs:egg", param2 = 1}) |
|
||||
end |
|
||||
end |
|
||||
}) |
|
||||
end |
|
||||
|
|
||||
if not minetest.registered_items ["mobs:bucket_milk"] then |
|
||||
minetest.register_craftitem (":mobs:bucket_milk", { |
|
||||
description = "Bucket of Milk", |
|
||||
inventory_image = "mobs_bucket_milk.png", |
|
||||
stack_max = 1, |
|
||||
on_use = minetest.item_eat (8, 'bucket:bucket_empty') , |
|
||||
}) |
|
||||
end |
|
||||
|
|
||||
dofile(minetest.get_modpath("food_basic").."/support.lua") |
|
||||
dofile(minetest.get_modpath("food_basic").."/ingredients.lua") |
|
||||
|
|
||||
-- Boilerplate to support localized strings if intllib mod is installed. |
|
||||
local S = 0 |
|
||||
if minetest.get_modpath("intllib") then |
|
||||
S = intllib.Getter() |
|
||||
else |
|
||||
S = function ( s ) return s end |
|
||||
end |
|
||||
|
|
||||
-- Register dark chocolate |
|
||||
food.module("dark_chocolate", function() |
|
||||
minetest.register_craftitem(":food:dark_chocolate",{ |
|
||||
description = S("Dark Chocolate"), |
|
||||
inventory_image = "food_dark_chocolate.png", |
|
||||
on_use = food.item_eat(3), |
|
||||
groups = {food_dark_chocolate=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:dark_chocolate", |
|
||||
recipe = { |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"} |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
-- Register milk chocolate |
|
||||
food.module("milk_chocolate", function() |
|
||||
minetest.register_craftitem(":food:milk_chocolate",{ |
|
||||
description = S("Milk Chocolate"), |
|
||||
inventory_image = "food_milk_chocolate.png", |
|
||||
on_use = food.item_eat(3), |
|
||||
groups = {food_milk_chocolate=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:milk_chocolate", |
|
||||
recipe = { |
|
||||
{"","group:food_milk",""}, |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"} |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
-- Register baked potato |
|
||||
food.module("baked_potato", function() |
|
||||
minetest.register_craftitem(":food:baked_potato", { |
|
||||
description = S("Baked Potato"), |
|
||||
inventory_image = "food_baked_potato.png", |
|
||||
on_use = food.item_eat(6), |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:baked_potato", |
|
||||
recipe = "group:food_potato", |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
-- Register pasta bake |
|
||||
food.module("pasta_bake", function() |
|
||||
minetest.register_craftitem(":food:pasta_bake",{ |
|
||||
description = S("Pasta Bake"), |
|
||||
inventory_image = "food_pasta_bake.png", |
|
||||
on_use = food.item_eat(4), |
|
||||
groups = {food=3} |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:pasta_bake_raw",{ |
|
||||
description = S("Raw Pasta Bake"), |
|
||||
inventory_image = "food_pasta_bake_raw.png", |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:pasta_bake", |
|
||||
type = "cooking", |
|
||||
recipe = "food:pasta_bake_raw" |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:pasta_bake_raw", |
|
||||
recipe = { |
|
||||
{"group:food_cheese"}, |
|
||||
{"group:food_pasta"}, |
|
||||
{"group:food_bowl"} |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
-- Register Soups |
|
||||
local chicken = "meat" |
|
||||
if minetest.get_modpath("mobs") and mobs.mod == "redo" then |
|
||||
chicken = "chicken" |
|
||||
end |
|
||||
local soups = { |
|
||||
{"tomato", "tomato"}, |
|
||||
{"chicken", chicken} |
|
||||
} |
|
||||
for i=1, #soups do |
|
||||
local flav = soups[i] |
|
||||
food.module("soup_"..flav[1], function() |
|
||||
minetest.register_craftitem(":food:soup_"..flav[1],{ |
|
||||
description = S(flav[1].." Soup"), |
|
||||
inventory_image = "food_soup_"..flav[1]..".png", |
|
||||
on_use = food.item_eat(4), |
|
||||
groups = {food=3} |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:soup_"..flav[1].."_raw",{ |
|
||||
description = S("Uncooked ".. flav[1].." Soup"), |
|
||||
inventory_image = "food_soup_"..flav[1].."_raw.png", |
|
||||
|
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:soup_"..flav[1], |
|
||||
recipe = "food:soup_"..flav[1].."_raw", |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:soup_"..flav[1].."_raw", |
|
||||
recipe = { |
|
||||
{"", "", ""}, |
|
||||
{"bucket:bucket_water", "group:food_"..flav[2], "bucket:bucket_water"}, |
|
||||
{"", "group:food_bowl", ""}, |
|
||||
}, |
|
||||
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"},{"bucket:bucket_water", "bucket:bucket_empty"}} |
|
||||
}) |
|
||||
end) |
|
||||
end |
|
||||
|
|
||||
-- Juices |
|
||||
local juices = {"apple", "orange", "cactus"} |
|
||||
for i=1, #juices do |
|
||||
local flav = juices[i] |
|
||||
food.module(flav.."_juice", function() |
|
||||
minetest.register_craftitem(":food:"..flav.."_juice", { |
|
||||
description = S(flav.." Juice"), |
|
||||
inventory_image = "food_"..flav.."_juice.png", |
|
||||
on_use = food.item_eat(2), |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:"..flav.."_juice 4", |
|
||||
recipe = { |
|
||||
{"","",""}, |
|
||||
{"","group:food_"..flav,""}, |
|
||||
{"","group:food_cup",""}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
end |
|
||||
|
|
||||
food.module("rainbow_juice", function() |
|
||||
minetest.register_craftitem(":food:rainbow_juice", { |
|
||||
description = S("Rainbow Juice"), |
|
||||
inventory_image = "food_rainbow_juice.png", |
|
||||
on_use = food.item_eat(20), |
|
||||
}) |
|
||||
|
|
||||
food.craft({ |
|
||||
output = "food:rainbow_juice 99", |
|
||||
recipe = { |
|
||||
{"","",""}, |
|
||||
{"","default:nyancat_rainbow",""}, |
|
||||
{"","group:food_cup",""}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
food.cake_box = { |
|
||||
type = "fixed", |
|
||||
fixed = { |
|
||||
{-0.250000,-0.500000,-0.296880,0.250000,-0.250000,0.312502}, |
|
||||
{-0.309375,-0.500000,-0.250000,0.309375,-0.250000,0.250000}, |
|
||||
{-0.250000,-0.250000,-0.250000,0.250000,-0.200000,0.250000} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
-- Register cakes |
|
||||
food.module("cake", function() |
|
||||
minetest.register_node(":food:cake", { |
|
||||
description = S("Cake"), |
|
||||
on_use = food.item_eat(4), |
|
||||
groups={food=3,crumbly=3}, |
|
||||
tiles = { |
|
||||
"food_cake_texture.png", |
|
||||
"food_cake_texture.png", |
|
||||
"food_cake_texture_side.png", |
|
||||
"food_cake_texture_side.png", |
|
||||
"food_cake_texture_side.png", |
|
||||
"food_cake_texture_side.png" |
|
||||
}, |
|
||||
walkable = false, |
|
||||
sunlight_propagates = true, |
|
||||
drawtype="nodebox", |
|
||||
paramtype = "light", |
|
||||
node_box = food.cake_box |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:cake", |
|
||||
recipe = "food:cakemix_plain", |
|
||||
cooktime = 10, |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:cakemix_plain",{ |
|
||||
description = S("Cake Mix"), |
|
||||
inventory_image = "food_cakemix_plain.png", |
|
||||
}) |
|
||||
minetest.register_craft({ |
|
||||
output = "food:cakemix_plain", |
|
||||
recipe = { |
|
||||
{"group:food_flour","group:food_sugar","group:food_egg"}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
|
|
||||
food.module("cake_choco", function() |
|
||||
minetest.register_node(":food:cake_choco", { |
|
||||
description = S("Chocolate Cake"), |
|
||||
on_use = food.item_eat(4), |
|
||||
groups={food=3,crumbly=3}, |
|
||||
tiles = { |
|
||||
"food_cake_choco_texture.png", |
|
||||
"food_cake_choco_texture.png", |
|
||||
"food_cake_choco_texture_side.png", |
|
||||
"food_cake_choco_texture_side.png", |
|
||||
"food_cake_choco_texture_side.png", |
|
||||
"food_cake_choco_texture_side.png" |
|
||||
}, |
|
||||
walkable = false, |
|
||||
sunlight_propagates = true, |
|
||||
drawtype="nodebox", |
|
||||
paramtype = "light", |
|
||||
node_box = food.cake_box |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:cake_choco", |
|
||||
recipe = "food:cakemix_choco", |
|
||||
cooktime = 10, |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:cakemix_choco",{ |
|
||||
description = S("Chocolate Cake Mix"), |
|
||||
inventory_image = "food_cakemix_choco.png", |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:cakemix_choco", |
|
||||
recipe = { |
|
||||
{"","group:food_choco_powder",""}, |
|
||||
{"group:food_flour","group:food_sugar","group:food_egg"}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
food.module("cake_carrot", function() |
|
||||
minetest.register_node(":food:cake_carrot", { |
|
||||
description = S("Carrot Cake"), |
|
||||
on_use = food.item_eat(4), |
|
||||
groups={food=3,crumbly=3}, |
|
||||
walkable = false, |
|
||||
sunlight_propagates = true, |
|
||||
tiles = { |
|
||||
"food_cake_carrot_texture.png", |
|
||||
"food_cake_carrot_texture.png", |
|
||||
"food_cake_carrot_texture_side.png", |
|
||||
"food_cake_carrot_texture_side.png", |
|
||||
"food_cake_carrot_texture_side.png", |
|
||||
"food_cake_carrot_texture_side.png" |
|
||||
}, |
|
||||
drawtype="nodebox", |
|
||||
paramtype = "light", |
|
||||
node_box = food.cake_box |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:cake_carrot", |
|
||||
recipe = "food:cakemix_carrot", |
|
||||
cooktime = 10, |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:cakemix_carrot",{ |
|
||||
description = S("Carrot Cake Mix"), |
|
||||
inventory_image = "food_cakemix_carrot.png", |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:cakemix_carrot", |
|
||||
recipe = { |
|
||||
{"","group:food_carrot",""}, |
|
||||
{"group:food_flour","group:food_sugar","group:food_egg"}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
@ -1,9 +0,0 @@ |
|||||
For license information related to the "food" and "food_basic" mods, |
|
||||
see "food/rwfooddoc/rwfooddoc.txt". |
|
||||
|
|
||||
For license information related to these three mods, see the "LICENSE" |
|
||||
files in the associated directories: |
|
||||
|
|
||||
coderfruit |
|
||||
hudbars |
|
||||
hbhunger |
|
@ -1,23 +0,0 @@ |
|||||
Name: coderfood |
|
||||
Source: New modpack based on various mods and/or modpacks |
|
||||
License: See "license-modpack.txt" |
|
||||
|
|
||||
---------------------------------------------------------------------- |
|
||||
|
|
||||
1. The "food" and "food_basic" mods were extracted from the following |
|
||||
modpack: |
|
||||
|
|
||||
https://github.com/rubenwardy/food.git |
|
||||
|
|
||||
modpack-level documentation files were moved into a new subdirectory |
|
||||
of the "food" mod named "rwfooddoc". |
|
||||
|
|
||||
---------------------------------------------------------------------- |
|
||||
|
|
||||
2. Additions to that starting point: |
|
||||
|
|
||||
2a. Added the OldCoder mod "coderfruit". |
|
||||
|
|
||||
2b. Added Milan's forks of the mods "hbhunger" and "hudbars". |
|
||||
|
|
||||
2c. Added the files "00README" and "oldcoder.txt" (this file). |
|
@ -1 +0,0 @@ |
|||||
See "oldcoder.txt". |
|
@ -1 +0,0 @@ |
|||||
See "oldcoder.txt". |
|
@ -0,0 +1,146 @@ |
|||||
|
-- Deer. Descended from Sapier version. |
||||
|
|
||||
|
-- =================================================================== |
||||
|
-- Mob Framework Mod by Sapier |
||||
|
-- |
||||
|
-- You may copy, use, modify or do nearly anything except removing this |
||||
|
-- copyright notice. Of course, you are NOT allow to pretend you have |
||||
|
-- written it. |
||||
|
-- CC-BY-SA 3.0. Attribution: sapier. |
||||
|
-- |
||||
|
--! @file init.lua |
||||
|
--! @brief deer implementation |
||||
|
--! @copyright Sapier |
||||
|
--! @author Sapier |
||||
|
--! @date 2013-01-27 |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
local lcname = "deer" |
||||
|
local ucname = "Deer" |
||||
|
local msname = "codermobs_" .. lcname |
||||
|
local obj_name = "codermobs:" .. lcname |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
mobs_param = { |
||||
|
lcname = lcname , |
||||
|
ucname = ucname , |
||||
|
obj_name = obj_name , |
||||
|
|
||||
|
aoc = 2 , |
||||
|
obr = 1 , |
||||
|
day_mode = true , |
||||
|
min_light = 14 , |
||||
|
max_light = 20 , |
||||
|
min_height = 0 , |
||||
|
max_height = 200 , |
||||
|
spawn_chance = 8000 , |
||||
|
spawn_type = "animal" , |
||||
|
|
||||
|
spawn_nodes = { |
||||
|
"default:dirt_with_grass" , |
||||
|
"ethereal:green_dirt" , |
||||
|
"ethereal:green_dirt_top" , |
||||
|
"ethereal:grove_dirt" , |
||||
|
"mg:dirt_with_dry_grass" , |
||||
|
} , |
||||
|
|
||||
|
spawn_by = { |
||||
|
"group:grass" , |
||||
|
"flowers:mushroom_brown" , |
||||
|
} , |
||||
|
|
||||
|
add_egg = true , |
||||
|
egg_image = "wool_pink.png" , |
||||
|
} |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
codermobs.adjust_param() |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
mobs_param.core_param = { |
||||
|
type = mobs_param.spawn_type , |
||||
|
makes_footstep_sound = true , |
||||
|
|
||||
|
armor = 200 , |
||||
|
attack_npcs = false , |
||||
|
attack_type = "dogfight" , |
||||
|
damage = 2 , |
||||
|
fear_height = 3 , |
||||
|
group_attack = true , |
||||
|
hp_max = 15 , |
||||
|
hp_min = 5 , |
||||
|
jump_height = 6 , |
||||
|
jump = true , |
||||
|
owner_loyal = true , |
||||
|
passive = false , |
||||
|
pushable = true , |
||||
|
reach = 2 , |
||||
|
rotate = 270 , |
||||
|
run_velocity = 3 , |
||||
|
stepheight = 0.6 , |
||||
|
type = "animal" , |
||||
|
view_range = 10 , |
||||
|
walk_velocity = 2 , |
||||
|
|
||||
|
lava_damage = 5 , |
||||
|
light_damage = 0 , |
||||
|
water_damage = 0 , |
||||
|
|
||||
|
collisionbox = { -0.70, -1.10, -0.70, 0.70, 0.80, 0.70 } , |
||||
|
mesh = msname .. ".b3d" , |
||||
|
textures = {{ msname .. "_mesh.png" }} , |
||||
|
visual = "mesh" , |
||||
|
|
||||
|
sounds = { |
||||
|
}, |
||||
|
|
||||
|
follow = { "default:apple", "farming:potato" } , |
||||
|
|
||||
|
drops = { |
||||
|
{ |
||||
|
name = "animal_materials:meat_venison" , |
||||
|
chance = 1, min = 1, max = 1 , |
||||
|
} , |
||||
|
{ |
||||
|
name = "animal_materials:deer_horns" , |
||||
|
chance = 1, min = 1, max = 1 , |
||||
|
} , |
||||
|
{ |
||||
|
name = "animal_materials:fur_deer" , |
||||
|
chance = 4, min = 1, max = 1 , |
||||
|
} , |
||||
|
{ |
||||
|
name = "animal_materials:bone" , |
||||
|
chance = 4, min = 1, max = 1 , |
||||
|
} , |
||||
|
} , |
||||
|
|
||||
|
animation = { |
||||
|
walk_start = 0 , |
||||
|
walk_end = 60 , |
||||
|
stand_start = 61 , |
||||
|
stand_end = 120 , |
||||
|
speed_normal = 15 , |
||||
|
} , |
||||
|
|
||||
|
on_rightclick = function (self, clicker) |
||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then return end |
||||
|
if mobs:protect(self, clicker) then return end |
||||
|
|
||||
|
if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then |
||||
|
return |
||||
|
end |
||||
|
end, |
||||
|
} |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
codermobs.setup_mob() |
||||
|
codermobs.log_done() |
||||
|
|
||||
|
-- =================================================================== |
||||
|
-- End of file. |
@ -1,19 +0,0 @@ |
|||||
Name: codermobs |
|
||||
Source: New mod using existing media files |
|
||||
License: See "LICENSE" |
|
||||
|
|
||||
---------------------------------------------------------------------- |
|
||||
|
|
||||
1. This is a new mod which implements a number of Final Minetest 3D |
|
||||
mobs. |
|
||||
|
|
||||
For general information, see the "_game" documentation, which covers |
|
||||
this mod and the associated modpack in detail. |
|
||||
|
|
||||
---------------------------------------------------------------------- |
|
||||
|
|
||||
2. The code is largely new, but it includes elements from existing |
|
||||
mods. The media files, in most cases, have been extracted from the |
|
||||
same or similar mods. |
|
||||
|
|
||||
For license information, see "LICENSE". |
|
@ -0,0 +1,3 @@ |
|||||
|
This is a copy of Bucket Game. For more information, visit: |
||||
|
|
||||
|
https://minetest.org/ |
@ -0,0 +1,12 @@ |
|||||
|
For license information, see the following files, where they exist, in |
||||
|
each modpack or mod: |
||||
|
|
||||
|
oldcoder.txt |
||||
|
LICENSE |
||||
|
LICENSE.txt |
||||
|
license.txt |
||||
|
README.md |
||||
|
README.txt |
||||
|
readme.txt |
||||
|
|
||||
|
and/or files with similar names. |
@ -1,275 +0,0 @@ |
|||||
-- Minetest 0.4 mod: bones |
|
||||
-- See README.txt for licensing and other information. |
|
||||
|
|
||||
local function is_owner(pos, name) |
|
||||
local owner = minetest.get_meta(pos):get_string("owner") |
|
||||
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then |
|
||||
return true |
|
||||
end |
|
||||
return false |
|
||||
end |
|
||||
|
|
||||
local bones_formspec = |
|
||||
"size[8,9]" .. |
|
||||
default.gui_bg .. |
|
||||
default.gui_bg_img .. |
|
||||
default.gui_slots .. |
|
||||
"list[current_name;main;0,0.3;8,4;]" .. |
|
||||
"list[current_player;main;0,4.85;8,1;]" .. |
|
||||
"list[current_player;main;0,6.08;8,3;8]" .. |
|
||||
"listring[current_name;main]" .. |
|
||||
"listring[current_player;main]" .. |
|
||||
default.get_hotbar_bg(0,4.85) |
|
||||
|
|
||||
local share_bones_time = tonumber(minetest.setting_get("share_bones_time")) or 1200 |
|
||||
local share_bones_time_early = tonumber(minetest.setting_get("share_bones_time_early")) or share_bones_time / 4 |
|
||||
|
|
||||
minetest.register_node("bones:bones", { |
|
||||
description = "Bones", |
|
||||
tiles = { |
|
||||
"bones_top.png^[transform2", |
|
||||
"bones_bottom.png", |
|
||||
"bones_side.png", |
|
||||
"bones_side.png", |
|
||||
"bones_rear.png", |
|
||||
"bones_front.png" |
|
||||
}, |
|
||||
paramtype2 = "facedir", |
|
||||
groups = {dig_immediate = 2}, |
|
||||
sounds = default.node_sound_gravel_defaults(), |
|
||||
|
|
||||
can_dig = function(pos, player) |
|
||||
local inv = minetest.get_meta(pos):get_inventory() |
|
||||
local name = "" |
|
||||
if player then |
|
||||
name = player:get_player_name() |
|
||||
end |
|
||||
return is_owner(pos, name) and inv:is_empty("main") |
|
||||
end, |
|
||||
|
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) |
|
||||
if is_owner(pos, player:get_player_name()) then |
|
||||
return count |
|
||||
end |
|
||||
return 0 |
|
||||
end, |
|
||||
|
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player) |
|
||||
return 0 |
|
||||
end, |
|
||||
|
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player) |
|
||||
if is_owner(pos, player:get_player_name()) then |
|
||||
return stack:get_count() |
|
||||
end |
|
||||
return 0 |
|
||||
end, |
|
||||
|
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player) |
|
||||
local meta = minetest.get_meta(pos) |
|
||||
if meta:get_inventory():is_empty("main") then |
|
||||
minetest.remove_node(pos) |
|
||||
end |
|
||||
end, |
|
||||
|
|
||||
on_punch = function(pos, node, player) |
|
||||
if not is_owner(pos, player:get_player_name()) then |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
if minetest.get_meta(pos):get_string("infotext") == "" then |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
local inv = minetest.get_meta(pos):get_inventory() |
|
||||
local player_inv = player:get_inventory() |
|
||||
local has_space = true |
|
||||
|
|
||||
for i = 1, inv:get_size("main") do |
|
||||
local stk = inv:get_stack("main", i) |
|
||||
if player_inv:room_for_item("main", stk) then |
|
||||
inv:set_stack("main", i, nil) |
|
||||
player_inv:add_item("main", stk) |
|
||||
else |
|
||||
has_space = false |
|
||||
break |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
-- remove bones if player emptied them |
|
||||
if has_space then |
|
||||
if player_inv:room_for_item("main", {name = "bones:bones"}) then |
|
||||
player_inv:add_item("main", {name = "bones:bones"}) |
|
||||
else |
|
||||
minetest.add_item(pos,"bones:bones") |
|
||||
end |
|
||||
minetest.remove_node(pos) |
|
||||
end |
|
||||
end, |
|
||||
|
|
||||
on_timer = function(pos, elapsed) |
|
||||
local meta = minetest.get_meta(pos) |
|
||||
local time = meta:get_int("time") + elapsed |
|
||||
if time >= share_bones_time then |
|
||||
meta:set_string("infotext", meta:get_string("owner") .. "'s old bones") |
|
||||
meta:set_string("owner", "") |
|
||||
else |
|
||||
meta:set_int("time", time) |
|
||||
return true |
|
||||
end |
|
||||
end, |
|
||||
on_blast = function(pos) |
|
||||
end, |
|
||||
}) |
|
||||
|
|
||||
local function may_replace(pos, player) |
|
||||
local node_name = minetest.get_node(pos).name |
|
||||
local node_definition = minetest.registered_nodes[node_name] |
|
||||
|
|
||||
-- if the node is unknown, we return false |
|
||||
if not node_definition then |
|
||||
return false |
|
||||
end |
|
||||
|
|
||||
-- allow replacing air and liquids |
|
||||
if node_name == "air" or node_definition.liquidtype ~= "none" then |
|
||||
return true |
|
||||
end |
|
||||
|
|
||||
-- don't replace filled chests and other nodes that don't allow it |
|
||||
local can_dig_func = node_definition.can_dig |
|
||||
if can_dig_func and not can_dig_func(pos, player) then |
|
||||
return false |
|
||||
end |
|
||||
|
|
||||
-- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones? |
|
||||
-- flowers being squished by bones are more realistical than a squished stone, too |
|
||||
-- exception are of course any protected buildable_to |
|
||||
return node_definition.buildable_to and not minetest.is_protected(pos, player:get_player_name()) |
|
||||
end |
|
||||
|
|
||||
local drop = function(pos, itemstack) |
|
||||
local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count())) |
|
||||
if obj then |
|
||||
obj:setvelocity({ |
|
||||
x = math.random(-10, 10) / 9, |
|
||||
y = 5, |
|
||||
z = math.random(-10, 10) / 9, |
|
||||
}) |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
minetest.register_on_dieplayer(function(player) |
|
||||
|
|
||||
local bones_mode = minetest.setting_get("bones_mode") or "bones" |
|
||||
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then |
|
||||
bones_mode = "bones" |
|
||||
end |
|
||||
|
|
||||
local bones_position_message = minetest.settings:get_bool("bones_position_message") == true |
|
||||
local pos = vector.round(player:getpos()) |
|
||||
local player_name = player:get_player_name() |
|
||||
local pos_string = minetest.pos_to_string(pos) |
|
||||
|
|
||||
-- return if keep inventory set or in creative mode |
|
||||
if bones_mode == "keep" or (creative and creative.is_enabled_for |
|
||||
and creative.is_enabled_for(player:get_player_name())) then |
|
||||
minetest.log("action", player_name .. " dies at " .. pos_string .. |
|
||||
". No bones remain.") |
|
||||
if bones_position_message then |
|
||||
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. ".") |
|
||||
end |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
local player_inv = player:get_inventory() |
|
||||
if player_inv:is_empty("main") and |
|
||||
player_inv:is_empty("craft") then |
|
||||
minetest.log("action", player_name .. " dies at " .. pos_string .. |
|
||||
". No bones remain.") |
|
||||
if bones_position_message then |
|
||||
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. ".") |
|
||||
end |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
|
|
||||
-- check if it's possible to place bones, if not find space near player |
|
||||
if bones_mode == "bones" and not may_replace(pos, player) then |
|
||||
local air = minetest.find_node_near(pos, 1, {"air"}) |
|
||||
if air and not minetest.is_protected(air, player_name) then |
|
||||
pos = air |
|
||||
else |
|
||||
bones_mode = "drop" |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
if bones_mode == "drop" then |
|
||||
|
|
||||
-- drop inventory items |
|
||||
for i = 1, player_inv:get_size("main") do |
|
||||
drop(pos, player_inv:get_stack("main", i)) |
|
||||
end |
|
||||
player_inv:set_list("main", {}) |
|
||||
|
|
||||
-- drop crafting grid items |
|
||||
for i = 1, player_inv:get_size("craft") do |
|
||||
drop(pos, player_inv:get_stack("craft", i)) |
|
||||
end |
|
||||
player_inv:set_list("craft", {}) |
|
||||
|
|
||||
drop(pos, ItemStack("bones:bones")) |
|
||||
minetest.log("action", player_name .. " dies at " .. pos_string .. |
|
||||
". Inventory dropped") |
|
||||
if bones_position_message then |
|
||||
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. |
|
||||
", and dropped their inventory.") |
|
||||
end |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
local param2 = minetest.dir_to_facedir(player:get_look_dir()) |
|
||||
minetest.set_node(pos, {name = "bones:bones", param2 = param2}) |
|
||||
|
|
||||
minetest.log("action", player_name .. " dies at " .. pos_string .. |
|
||||
". Bones remain.") |
|
||||
if bones_position_message then |
|
||||
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. |
|
||||
", and bones remain.") |
|
||||
end |
|
||||
|
|
||||
local meta = minetest.get_meta(pos) |
|
||||
local inv = meta:get_inventory() |
|
||||
inv:set_size("main", 8 * 4) |
|
||||
inv:set_list("main", player_inv:get_list("main")) |
|
||||
|
|
||||
for i = 1, player_inv:get_size("craft") do |
|
||||
local stack = player_inv:get_stack("craft", i) |
|
||||
if inv:room_for_item("main", stack) then |
|
||||
inv:add_item("main", stack) |
|
||||
else |
|
||||
--drop if no space left |
|
||||
drop(pos, stack) |
|
||||
end |
|
||||
end |
|
||||
|
|
||||
player_inv:set_list("main", {}) |
|
||||
player_inv:set_list("craft", {}) |
|
||||
|
|
||||
meta:set_string("formspec", bones_formspec) |
|
||||
meta:set_string("owner", player_name) |
|
||||
|
|
||||
if share_bones_time ~= 0 then |
|
||||
meta:set_string("infotext", player_name .. "'s fresh bones") |
|
||||
|
|
||||
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then |
|
||||
meta:set_int("time", 0) |
|
||||
else |
|
||||
meta:set_int("time", (share_bones_time - share_bones_time_early)) |
|
||||
end |
|
||||
|
|
||||
minetest.get_node_timer(pos):start(10) |
|
||||
else |
|
||||
meta:set_string("infotext", player_name.."'s bones") |
|
||||
end |
|
||||
end) |
|
@ -1,54 +0,0 @@ |
|||||
# Minetest Handpainted Texture Pack |
|
||||
|
|
||||
**!!! WORK IN PROGRESS !!!** |
|
||||
|
|
||||
This will be a high-res (128x128) texture pack for Minetest. Its license is CC0 1.0. |
|
||||
|
|
||||
Realistic Milk Bucket: |
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) |
|
||||
Attribution: Copyright (C) 2015-2016 ElementW, Poikilos (modified by) |
|
||||
|
|
||||
Other files in this repo are actually [webtoon](https://github.com/pithydon/webtoon) |
|
||||
CC0 texture pack, which I keep rewriting with the new textures. |
|
||||
|
|
||||
The textures are largely my own work, but a lot of them are taken out of other |
|
||||
CC0 works. |
|
||||
|
|
||||
I won't be commiting extremely often in order to not bloat the repo with binary file |
|
||||
changes. |
|
||||
|
|
||||
Most notable texture sources (feel free to send me more sources or your own contributions): |
|
||||
|
|
||||
- https://www.blendswap.com/blends/view/74021 |
|
||||
- https://opengameart.org/content/glitch-sprite-assets-huge-collection |
|
||||
- https://opengameart.org/content/glitch-alpine-landscape-svg |
|
||||
- https://opengameart.org/content/handpainted-tileable-textures-512%D1%85512 |
|
||||
- https://opengameart.org/content/handpainted-stone-wall-textures |
|
||||
- https://opengameart.org/content/4-hand-painted-ground-textures |
|
||||
- https://opengameart.org/content/rpg-item-collection-3 |
|
||||
- https://opengameart.org/content/rpg-item-collection-2 |
|
||||
- https://opengameart.org/content/rpg-item-collection-1 |
|
||||
- https://opengameart.org/content/crate-barrel-bundle |
|
||||
- https://opengameart.org/content/desert-rock |
|
||||
- https://opengameart.org/content/glitch-groddle-forestmeadow-terrain-svg |
|
||||
- https://opengameart.org/content/free-handpainted-plants-2 |
|
||||
- https://opengameart.org/content/free-handpainted-plants |
|
||||
- https://opengameart.org/content/chest-blizzard-style |
|
||||
- https://opengameart.org/content/free-lowpoly-golds |
|
||||
- https://opengameart.org/content/stone-coffin |
|
||||
- https://opengameart.org/content/free-textures-pack-59 |
|
||||
- https://www.blendswap.com/blends/view/46952 |
|
||||
- https://www.blendswap.com/blends/view/73730 |
|
||||
- https://opengameart.org/content/wyrmsun-cc0-over-900-items |
|
||||
- https://opengameart.org/content/40-procedural-textures |
|
||||
- https://opengameart.org/content/procedural-texture-pack?page=1 |
|
||||
- https://opengameart.org/content/cool-leaves-textures |
|
||||
- https://www.deviantart.com/yughues/art/Free-IDKWIAD-3-730335893 |
|
||||
- https://www.deviantart.com/yughues/art/Free-IDKWIAD-4-732217780 |
|
||||
- https://opengameart.org/content/freebies-mundo-commissions |
|
||||
- https://pixabay.com/en/floral-paisley-background-flower-1556345/ |
|
||||
- https://deepart.io |
|
||||
- https://opengameart.org/content/fantasy-crystal-set |
|
||||
- https://opengameart.org/content/cute-prop-models |
|
||||
- https://www.blendswap.com/blends/view/89476 |
|
||||
- https://pixabay.com/en/bread-food-bakery-foodstuff-baking-3365842/ |
|
@ -1,304 +0,0 @@ |
|||||
-- FOOD MOD |
|
||||
-- A mod written by rubenwardy that adds |
|
||||
-- food to the minetest game |
|
||||
-- ===================================== |
|
||||
-- >> food_basic/ingredients.lua |
|
||||
-- Fallback ingredients |
|
||||
-- ===================================== |
|
||||
|
|
||||
-- Boilerplate to support localized strings if intllib mod is installed. |
|
||||
local S = 0 |
|
||||
if minetest.get_modpath("intllib") then |
|
||||
S = intllib.Getter() |
|
||||
else |
|
||||
S = function ( s ) return s end |
|
||||
end |
|
||||
|
|
||||
food.module("wheat", function() |
|
||||
minetest.register_craftitem(":food:wheat", { |
|
||||
description = S("Wheat"), |
|
||||
inventory_image = "food_wheat.png", |
|
||||
groups = {food_wheat=1} |
|
||||
}) |
|
||||
|
|
||||
food.craft({ |
|
||||
output = "food:wheat", |
|
||||
recipe = { |
|
||||
{"default:dry_shrub"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("flour", function() |
|
||||
minetest.register_craftitem(":food:flour", { |
|
||||
description = S("Flour"), |
|
||||
inventory_image = "food_flour.png", |
|
||||
groups = {food_flour = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:flour", |
|
||||
recipe = { |
|
||||
{"group:food_wheat"}, |
|
||||
{"group:food_wheat"} |
|
||||
} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:flour", |
|
||||
recipe = { |
|
||||
{"default:sand"}, |
|
||||
{"default:sand"} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("potato", function() |
|
||||
minetest.register_craftitem(":food:potato", { |
|
||||
description = S("Potato"), |
|
||||
inventory_image = "food_potato.png", |
|
||||
groups = {food_potato = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:potato", |
|
||||
recipe = { |
|
||||
{"default:dirt"}, |
|
||||
{"default:apple"} |
|
||||
|
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("orange", function() |
|
||||
minetest.register_craftitem(":food:orange", { |
|
||||
description = S("Orange"), |
|
||||
inventory_image = "food_orange.png", |
|
||||
groups = {food_orange = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:orange", |
|
||||
recipe = { |
|
||||
{"", "default:desert_sand", ""}, |
|
||||
{"default:desert_sand", "default:desert_sand", "default:desert_sand"}, |
|
||||
{"", "default:desert_sand", ""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("tomato", function() |
|
||||
minetest.register_craftitem(":food:tomato", { |
|
||||
description = S("Tomato"), |
|
||||
inventory_image = "food_tomato.png", |
|
||||
groups = {food_tomato = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:tomato", |
|
||||
recipe = { |
|
||||
{"", "default:desert_sand", ""}, |
|
||||
{"default:desert_sand", "", "default:desert_sand"}, |
|
||||
{"", "default:desert_sand", ""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("carrot", function() |
|
||||
minetest.register_craftitem(":food:carrot", { |
|
||||
description = S("Carrot"), |
|
||||
inventory_image = "food_carrot.png", |
|
||||
groups = {food_carrot=1}, |
|
||||
on_use = food.item_eat(3) |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:carrot", |
|
||||
recipe = { |
|
||||
{"default:apple", "default:apple", "default:apple"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("milk", function() |
|
||||
minetest.register_craftitem(":food:milk", { |
|
||||
description = S("Milk"), |
|
||||
image = "food_milk.png", |
|
||||
on_use = food.item_eat(2), |
|
||||
-- on_use = minetest.item_eat(2, 'vessels:drinking_glass'), |
|
||||
groups = { eatable=1, food_milk = 1 }, |
|
||||
stack_max=10 |
|
||||
}) |
|
||||
|
|
||||
end, true) |
|
||||
|
|
||||
food.module("egg", function() |
|
||||
minetest.register_craftitem(":food:egg", { |
|
||||
description = S("Egg"), |
|
||||
inventory_image = "food_egg.png", |
|
||||
groups = {food_egg=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:egg", |
|
||||
recipe = { |
|
||||
{"", "default:sand", ""}, |
|
||||
{"default:sand", "", "default:sand"}, |
|
||||
{"", "default:sand", ""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("cocoa", function() |
|
||||
minetest.register_craftitem(":food:cocoa", { |
|
||||
description = S("Cocoa Bean"), |
|
||||
inventory_image = "food_cocoa.png", |
|
||||
groups = {food_cocoa=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:cocoa", |
|
||||
recipe = { |
|
||||
{"", "default:apple", ""}, |
|
||||
{"default:apple", "", "default:apple"}, |
|
||||
{"", "default:apple", ""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("meat", function() |
|
||||
minetest.register_craftitem(":food:meat", { |
|
||||
description = S("Venison"), |
|
||||
inventory_image = "food_meat.png", |
|
||||
groups = {food_meat=1, food_chicken=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:meat", |
|
||||
recipe = "group:food_meat_raw", |
|
||||
cooktime = 30 |
|
||||
}) |
|
||||
|
|
||||
if not minetest.get_modpath("animalmaterials") then |
|
||||
minetest.register_craftitem(":food:meat_raw", { |
|
||||
description = S("Raw meat"), |
|
||||
image = "food_meat_raw.png", |
|
||||
on_use = food.item_eat(1), |
|
||||
groups = { meat=1, eatable=1, food_meat_raw=1 }, |
|
||||
stack_max=25 |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:meat_raw", |
|
||||
recipe = { |
|
||||
{"default:apple"}, |
|
||||
{"default:dirt"} |
|
||||
} |
|
||||
}) |
|
||||
end |
|
||||
end, true) |
|
||||
|
|
||||
food.module("sugar", function() |
|
||||
minetest.register_craftitem(":food:sugar", { |
|
||||
description = S("Sugar"), |
|
||||
inventory_image = "food_sugar.png", |
|
||||
groups = {food_sugar=1} |
|
||||
}) |
|
||||
|
|
||||
minetest.register_craft({ |
|
||||
output = "food:sugar 20", |
|
||||
recipe = { |
|
||||
{"default:papyrus"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("chocolate_powder", function() |
|
||||
minetest.register_craftitem(":food:chocolate_powder", { |
|
||||
description = S("Chocolate Powder"), |
|
||||
inventory_image = "food_chocolate_powder.png", |
|
||||
groups = {food_choco_powder = 1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:chocolate_powder 16", |
|
||||
recipe = { |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"}, |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"}, |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("pasta", function() |
|
||||
minetest.register_craftitem(":food:pasta",{ |
|
||||
description = S("Pasta"), |
|
||||
inventory_image = "food_pasta.png", |
|
||||
groups = {food_pasta=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:pasta 4", |
|
||||
type = "shapeless", |
|
||||
recipe = {"group:food_flour","group:food_egg","group:food_egg"} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("bowl", function() |
|
||||
minetest.register_craftitem(":food:bowl",{ |
|
||||
description = S("Bowl"), |
|
||||
inventory_image = "food_bowl.png", |
|
||||
groups = {food_bowl=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:bowl", |
|
||||
recipe = { |
|
||||
{"default:clay_lump","","default:clay_lump"}, |
|
||||
{"","default:clay_lump",""} |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("butter", function() |
|
||||
minetest.register_craftitem(":food:butter", { |
|
||||
description = S("Butter"), |
|
||||
inventory_image = "food_butter.png", |
|
||||
groups = {food_butter=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:butter", |
|
||||
recipe = {{"group:food_milkbucket","group:food_milkbucket"}}, |
|
||||
replacements = { |
|
||||
{"group:food_milkbucket","bucket:bucket_empty"}, |
|
||||
{"group:food_milkbucket","bucket:bucket_empty"} |
|
||||
}, |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:butter", |
|
||||
recipe = { |
|
||||
{"group:food_milk","group:food_milkbucket"} |
|
||||
}, |
|
||||
replacements = { |
|
||||
{"group:food_milkbucket","bucket:bucket_empty"}, |
|
||||
}, |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:butter", |
|
||||
recipe = { |
|
||||
{"group:food_milk","group:food_milk"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
food.module("cheese", function() |
|
||||
minetest.register_craftitem(":food:cheese", { |
|
||||
description = S("Cheese"), |
|
||||
inventory_image = "food_cheese.png", |
|
||||
on_use = food.item_eat(4), |
|
||||
groups = {food_cheese=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:cheese", |
|
||||
recipe = { |
|
||||
{"group:food_butter","group:food_butter"}, |
|
||||
} |
|
||||
}) |
|
||||
end, true) |
|
||||
|
|
||||
if (minetest.get_modpath("animalmaterials") and not minetest.get_modpath("mobfcooking")) then |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:meat", |
|
||||
recipe = "animalmaterials:meat_raw", |
|
||||
cooktime = 30 |
|
||||
}) |
|
||||
end |
|
@ -1,331 +0,0 @@ |
|||||
-- FOOD MOD |
|
||||
-- A mod written by rubenwardy that adds |
|
||||
-- food to the minetest game |
|
||||
-- ===================================== |
|
||||
-- >> food_basic/init.lua |
|
||||
-- Some basic foods |
|
||||
-- ===================================== |
|
||||
|
|
||||
print("Food Mod - Version 2.3") |
|
||||
|
|
||||
if not minetest.registered_nodes ["mobs:egg"] then |
|
||||
minetest.register_node(":mobs:egg", { |
|
||||
description = "Chicken Egg", |
|
||||
tiles = {"mobs_chicken_egg.png"}, |
|
||||
inventory_image = "mobs_chicken_egg.png", |
|
||||
visual_scale = 0.7 , |
|
||||
drawtype = "plantlike" , |
|
||||
wield_image = "mobs_chicken_egg.png" , |
|
||||
paramtype = "light" , |
|
||||
walkable = false, |
|
||||
is_ground_content = true, |
|
||||
sunlight_propagates = true, |
|
||||
selection_box = { |
|
||||
type = "fixed", |
|
||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2} |
|
||||
}, |
|
||||
groups = {snappy=2, dig_immediate=3}, |
|
||||
after_place_node = function(pos, placer, itemstack) |
|
||||
if placer:is_player() then |
|
||||
minetest.set_node(pos, {name = "mobs:egg", param2 = 1}) |
|
||||
end |
|
||||
end |
|
||||
}) |
|
||||
end |
|
||||
|
|
||||
if not minetest.registered_items ["mobs:bucket_milk"] then |
|
||||
minetest.register_craftitem (":mobs:bucket_milk", { |
|
||||
description = "Bucket of Milk", |
|
||||
inventory_image = "mobs_bucket_milk.png", |
|
||||
stack_max = 1, |
|
||||
on_use = minetest.item_eat (8, 'bucket:bucket_empty') , |
|
||||
}) |
|
||||
end |
|
||||
|
|
||||
dofile(minetest.get_modpath("food_basic").."/support.lua") |
|
||||
dofile(minetest.get_modpath("food_basic").."/ingredients.lua") |
|
||||
|
|
||||
-- Boilerplate to support localized strings if intllib mod is installed. |
|
||||
local S = 0 |
|
||||
if minetest.get_modpath("intllib") then |
|
||||
S = intllib.Getter() |
|
||||
else |
|
||||
S = function ( s ) return s end |
|
||||
end |
|
||||
|
|
||||
-- Register dark chocolate |
|
||||
food.module("dark_chocolate", function() |
|
||||
minetest.register_craftitem(":food:dark_chocolate",{ |
|
||||
description = S("Dark Chocolate"), |
|
||||
inventory_image = "food_dark_chocolate.png", |
|
||||
on_use = food.item_eat(3), |
|
||||
groups = {food_dark_chocolate=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:dark_chocolate", |
|
||||
recipe = { |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"} |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
-- Register milk chocolate |
|
||||
food.module("milk_chocolate", function() |
|
||||
minetest.register_craftitem(":food:milk_chocolate",{ |
|
||||
description = S("Milk Chocolate"), |
|
||||
inventory_image = "food_milk_chocolate.png", |
|
||||
on_use = food.item_eat(3), |
|
||||
groups = {food_milk_chocolate=1} |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:milk_chocolate", |
|
||||
recipe = { |
|
||||
{"","group:food_milk",""}, |
|
||||
{"group:food_cocoa","group:food_cocoa","group:food_cocoa"} |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
-- Register baked potato |
|
||||
food.module("baked_potato", function() |
|
||||
minetest.register_craftitem(":food:baked_potato", { |
|
||||
description = S("Baked Potato"), |
|
||||
inventory_image = "food_baked_potato.png", |
|
||||
on_use = food.item_eat(6), |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:baked_potato", |
|
||||
recipe = "group:food_potato", |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
-- Register pasta bake |
|
||||
food.module("pasta_bake", function() |
|
||||
minetest.register_craftitem(":food:pasta_bake",{ |
|
||||
description = S("Pasta Bake"), |
|
||||
inventory_image = "food_pasta_bake.png", |
|
||||
on_use = food.item_eat(4), |
|
||||
groups = {food=3} |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:pasta_bake_raw",{ |
|
||||
description = S("Raw Pasta Bake"), |
|
||||
inventory_image = "food_pasta_bake_raw.png", |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:pasta_bake", |
|
||||
type = "cooking", |
|
||||
recipe = "food:pasta_bake_raw" |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:pasta_bake_raw", |
|
||||
recipe = { |
|
||||
{"group:food_cheese"}, |
|
||||
{"group:food_pasta"}, |
|
||||
{"group:food_bowl"} |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
-- Register Soups |
|
||||
local chicken = "meat" |
|
||||
if minetest.get_modpath("mobs") and mobs.mod == "redo" then |
|
||||
chicken = "chicken" |
|
||||
end |
|
||||
local soups = { |
|
||||
{"tomato", "tomato"}, |
|
||||
{"chicken", chicken} |
|
||||
} |
|
||||
for i=1, #soups do |
|
||||
local flav = soups[i] |
|
||||
food.module("soup_"..flav[1], function() |
|
||||
minetest.register_craftitem(":food:soup_"..flav[1],{ |
|
||||
description = S(flav[1].." Soup"), |
|
||||
inventory_image = "food_soup_"..flav[1]..".png", |
|
||||
on_use = food.item_eat(4), |
|
||||
groups = {food=3} |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:soup_"..flav[1].."_raw",{ |
|
||||
description = S("Uncooked ".. flav[1].." Soup"), |
|
||||
inventory_image = "food_soup_"..flav[1].."_raw.png", |
|
||||
|
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:soup_"..flav[1], |
|
||||
recipe = "food:soup_"..flav[1].."_raw", |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:soup_"..flav[1].."_raw", |
|
||||
recipe = { |
|
||||
{"", "", ""}, |
|
||||
{"bucket:bucket_water", "group:food_"..flav[2], "bucket:bucket_water"}, |
|
||||
{"", "group:food_bowl", ""}, |
|
||||
}, |
|
||||
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"},{"bucket:bucket_water", "bucket:bucket_empty"}} |
|
||||
}) |
|
||||
end) |
|
||||
end |
|
||||
|
|
||||
-- Juices |
|
||||
local juices = {"apple", "orange", "cactus"} |
|
||||
for i=1, #juices do |
|
||||
local flav = juices[i] |
|
||||
food.module(flav.."_juice", function() |
|
||||
minetest.register_craftitem(":food:"..flav.."_juice", { |
|
||||
description = S(flav.." Juice"), |
|
||||
inventory_image = "food_"..flav.."_juice.png", |
|
||||
on_use = food.item_eat(2), |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:"..flav.."_juice 4", |
|
||||
recipe = { |
|
||||
{"","",""}, |
|
||||
{"","group:food_"..flav,""}, |
|
||||
{"","group:food_cup",""}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
end |
|
||||
|
|
||||
food.module("rainbow_juice", function() |
|
||||
minetest.register_craftitem(":food:rainbow_juice", { |
|
||||
description = S("Rainbow Juice"), |
|
||||
inventory_image = "food_rainbow_juice.png", |
|
||||
on_use = food.item_eat(20), |
|
||||
}) |
|
||||
|
|
||||
food.craft({ |
|
||||
output = "food:rainbow_juice 99", |
|
||||
recipe = { |
|
||||
{"","",""}, |
|
||||
{"","default:nyancat_rainbow",""}, |
|
||||
{"","group:food_cup",""}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
food.cake_box = { |
|
||||
type = "fixed", |
|
||||
fixed = { |
|
||||
{-0.250000,-0.500000,-0.296880,0.250000,-0.250000,0.312502}, |
|
||||
{-0.309375,-0.500000,-0.250000,0.309375,-0.250000,0.250000}, |
|
||||
{-0.250000,-0.250000,-0.250000,0.250000,-0.200000,0.250000} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
-- Register cakes |
|
||||
food.module("cake", function() |
|
||||
minetest.register_node(":food:cake", { |
|
||||
description = S("Cake"), |
|
||||
on_use = food.item_eat(4), |
|
||||
groups={food=3,crumbly=3}, |
|
||||
tiles = { |
|
||||
"food_cake_texture.png", |
|
||||
"food_cake_texture.png", |
|
||||
"food_cake_texture_side.png", |
|
||||
"food_cake_texture_side.png", |
|
||||
"food_cake_texture_side.png", |
|
||||
"food_cake_texture_side.png" |
|
||||
}, |
|
||||
walkable = false, |
|
||||
sunlight_propagates = true, |
|
||||
drawtype="nodebox", |
|
||||
paramtype = "light", |
|
||||
node_box = food.cake_box |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:cake", |
|
||||
recipe = "food:cakemix_plain", |
|
||||
cooktime = 10, |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:cakemix_plain",{ |
|
||||
description = S("Cake Mix"), |
|
||||
inventory_image = "food_cakemix_plain.png", |
|
||||
}) |
|
||||
minetest.register_craft({ |
|
||||
output = "food:cakemix_plain", |
|
||||
recipe = { |
|
||||
{"group:food_flour","group:food_sugar","group:food_egg"}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
|
|
||||
food.module("cake_choco", function() |
|
||||
minetest.register_node(":food:cake_choco", { |
|
||||
description = S("Chocolate Cake"), |
|
||||
on_use = food.item_eat(4), |
|
||||
groups={food=3,crumbly=3}, |
|
||||
tiles = { |
|
||||
"food_cake_choco_texture.png", |
|
||||
"food_cake_choco_texture.png", |
|
||||
"food_cake_choco_texture_side.png", |
|
||||
"food_cake_choco_texture_side.png", |
|
||||
"food_cake_choco_texture_side.png", |
|
||||
"food_cake_choco_texture_side.png" |
|
||||
}, |
|
||||
walkable = false, |
|
||||
sunlight_propagates = true, |
|
||||
drawtype="nodebox", |
|
||||
paramtype = "light", |
|
||||
node_box = food.cake_box |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:cake_choco", |
|
||||
recipe = "food:cakemix_choco", |
|
||||
cooktime = 10, |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:cakemix_choco",{ |
|
||||
description = S("Chocolate Cake Mix"), |
|
||||
inventory_image = "food_cakemix_choco.png", |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:cakemix_choco", |
|
||||
recipe = { |
|
||||
{"","group:food_choco_powder",""}, |
|
||||
{"group:food_flour","group:food_sugar","group:food_egg"}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
||||
food.module("cake_carrot", function() |
|
||||
minetest.register_node(":food:cake_carrot", { |
|
||||
description = S("Carrot Cake"), |
|
||||
on_use = food.item_eat(4), |
|
||||
groups={food=3,crumbly=3}, |
|
||||
walkable = false, |
|
||||
sunlight_propagates = true, |
|
||||
tiles = { |
|
||||
"food_cake_carrot_texture.png", |
|
||||
"food_cake_carrot_texture.png", |
|
||||
"food_cake_carrot_texture_side.png", |
|
||||
"food_cake_carrot_texture_side.png", |
|
||||
"food_cake_carrot_texture_side.png", |
|
||||
"food_cake_carrot_texture_side.png" |
|
||||
}, |
|
||||
drawtype="nodebox", |
|
||||
paramtype = "light", |
|
||||
node_box = food.cake_box |
|
||||
}) |
|
||||
food.craft({ |
|
||||
type = "cooking", |
|
||||
output = "food:cake_carrot", |
|
||||
recipe = "food:cakemix_carrot", |
|
||||
cooktime = 10, |
|
||||
}) |
|
||||
minetest.register_craftitem(":food:cakemix_carrot",{ |
|
||||
description = S("Carrot Cake Mix"), |
|
||||
inventory_image = "food_cakemix_carrot.png", |
|
||||
}) |
|
||||
food.craft({ |
|
||||
output = "food:cakemix_carrot", |
|
||||
recipe = { |
|
||||
{"","group:food_carrot",""}, |
|
||||
{"group:food_flour","group:food_sugar","group:food_egg"}, |
|
||||
} |
|
||||
}) |
|
||||
end) |
|
||||
|
|
@ -1,9 +0,0 @@ |
|||||
For license information related to the "food" and "food_basic" mods, |
|
||||
see "food/rwfooddoc/rwfooddoc.txt". |
|
||||
|
|
||||
For license information related to these three mods, see the "LICENSE" |
|
||||
files in the associated directories: |
|
||||
|
|
||||
coderfruit |
|
||||
hudbars |
|
||||
hbhunger |
|
@ -1,23 +0,0 @@ |
|||||
Name: coderfood |
|
||||
Source: New modpack based on various mods and/or modpacks |
|
||||
License: See "license-modpack.txt" |
|
||||
|
|
||||
---------------------------------------------------------------------- |
|
||||
|
|
||||
1. The "food" and "food_basic" mods were extracted from the following |
|
||||
modpack: |
|
||||
|
|
||||
https://github.com/rubenwardy/food.git |
|
||||
|
|
||||
modpack-level documentation files were moved into a new subdirectory |
|
||||
of the "food" mod named "rwfooddoc". |
|
||||
|
|
||||
---------------------------------------------------------------------- |
|
||||
|
|
||||
2. Additions to that starting point: |
|
||||
|
|
||||
2a. Added the OldCoder mod "coderfruit". |
|
||||
|
|
||||
2b. Added Milan's forks of the mods "hbhunger" and "hudbars". |
|
||||
|
|
||||
2c. Added the files "00README" and "oldcoder.txt" (this file). |
|
@ -1 +0,0 @@ |
|||||
See "oldcoder.txt". |
|
@ -1 +0,0 @@ |
|||||
See "oldcoder.txt". |
|
@ -1,228 +0,0 @@ |
|||||
-- Cow. Descended from Krupnovpavel-JurajVajda version. |
|
||||
|
|
||||
-- =================================================================== |
|
||||
|
|
||||
local lcname = "cow" |
|
||||
local ucname = "Cow" |
|
||||
local msname = "codermobs_" .. lcname |
|
||||
local obj_name = "codermobs:" .. lcname |
|
||||
|
|
||||
-- =================================================================== |
|
||||
|
|
||||
mobs_param = { |
|
||||
lcname = lcname , |
|
||||
ucname = ucname , |
|
||||
obj_name = obj_name , |
|
||||
|
|
||||
aoc = 2 , |
|
||||
obr = 1 , |
|
||||
day_mode = true , |
|
||||
min_light = 10 , |
|
||||
max_light = 20 , |
|
||||
min_height = -31000 , |
|
||||
max_height = 31000 , |
|
||||
scale = 1.25 , |
|
||||
spawn_chance = 40000 , |
|
||||
spawn_type = "animal" , |
|
||||
|
|
||||
spawn_nodes = { |
|
||||
"default:dirt_with_dry_grass" , |
|
||||
"default:dirt_with_grass" , |
|
||||
"earthgen:dirt_with_dry_grass" , |
|
||||
"ethereal:green_dirt" , |
|
||||
"ethereal:green_dirt_top" , |
|
||||
"ethereal:grove_dirt" , |
|
||||
"mg:dirt_with_dry_grass" , |
|
||||
} , |
|
||||
|
|
||||
add_egg = true , |
|
||||
egg_image = "default_grass.png" , |
|
||||
} |
|
||||
|
|
||||
-- =================================================================== |
|
||||
|
|
||||
codermobs.adjust_param() |
|
||||
|
|
||||
-- =================================================================== |
|
||||
|
|
||||
mobs_param.core_param = { |
|
||||
type = mobs_param.spawn_type , |
|
||||
|
|
||||
passive = false, |
|
||||
attack_type = "dogfight", |
|
||||
reach = 2, |
|
||||
damage = 4, |
|
||||
hp_min = 5, |
|
||||
hp_max = 20, |
|
||||
armor = 200, |
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4}, |
|
||||
visual = "mesh", |
|
||||
mesh = msname .. ".x" , |
|
||||
textures = { |
|
||||
{ msname .. "_01.png" } , |
|
||||
{ msname .. "_02.png" } , |
|
||||
}, |
|
||||
makes_footstep_sound = true, |
|
||||
sounds = { |
|
||||
random = msname , |
|
||||
}, |
|
||||
walk_velocity = 1, |
|
||||
run_velocity = 2, |
|
||||
jump = true, |
|
||||
drops = { |
|
||||
{ name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, |
|
||||
{ name = "mobs:leather", chance = 1, min = 1, max = 2}, |
|
||||
}, |
|
||||
water_damage = 1, |
|
||||
lava_damage = 5, |
|
||||
light_damage = 0, |
|
||||
animation = { |
|
||||
speed_normal = 15, |
|
||||
speed_run = 15, |
|
||||
stand_start = 0, |
|
||||
stand_end = 30, |
|
||||
walk_start = 35, |
|
||||
walk_end = 65, |
|
||||
run_start = 105, |
|
||||
run_end = 135, |
|
||||
punch_start = 70, |
|
||||
punch_end = 100, |
|
||||
}, |
|
||||
follow = "farming:wheat", |
|
||||
view_range = 8, |
|
||||
replace_rate = 10, |
|
||||
-- replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"}, |
|
||||
replace_what = { |
|
||||
{"group:grass", "air", 0}, |
|
||||
{"default:dirt_with_grass", "default:dirt", -1} |
|
||||
}, |
|
||||
replace_with = "air", |
|
||||
fear_height = 2, |
|
||||
on_rightclick = function(self, clicker) |
|
||||
|
|
||||
-- feed or tame |
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end |
|
||||
if mobs:protect(self, clicker) then return end |
|
||||
if mobs:capture_mob(self, clicker, 0, 5, 60, false, nil) then return end |
|
||||
|
|
||||
local tool = clicker:get_wielded_item() |
|
||||
local name = clicker:get_player_name() |
|
||||
|
|
||||
-- milk cow with empty bucket |
|
||||
if tool:get_name() == "bucket:bucket_empty" then |
|
||||
|
|
||||
--if self.gotten == true |
|
||||
if self.child == true then |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
if self.gotten == true then |
|
||||
minetest.chat_send_player(name, |
|
||||
"Cow already milked!") |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
local inv = clicker:get_inventory() |
|
||||
|
|
||||
inv:remove_item("main", "bucket:bucket_empty") |
|
||||
|
|
||||
if inv:room_for_item("main", {name = "mobs:bucket_milk"}) then |
|
||||
clicker:get_inventory():add_item("main", "mobs:bucket_milk") |
|
||||
else |
|
||||
local pos = self.object:get_pos() |
|
||||
pos.y = pos.y + 0.5 |
|
||||
minetest.add_item(pos, {name = "mobs:bucket_milk"}) |
|
||||
end |
|
||||
|
|
||||
self.gotten = true -- milked |
|
||||
|
|
||||
return |
|
||||
end |
|
||||
-- milk cow with empty glass |
|
||||
if tool:get_name() == "vessels:drinking_glass" then |
|
||||
|
|
||||
--if self.gotten == true |
|
||||
if self.child == true then |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
if self.gotten == true then |
|
||||
minetest.chat_send_player(name, |
|
||||
"Cow already milked!") |
|
||||
return |
|
||||
end |
|
||||
|
|
||||
local inv = clicker:get_inventory() |
|
||||
|
|
||||
inv:remove_item("main", "vessels:drinking_glass") |
|
||||
|
|
||||
if inv:room_for_item("main", {name = "food:milk"}) then |
|
||||
clicker:get_inventory():add_item("main", "food:milk") |
|
||||
else |
|
||||
local pos = self.object:get_pos() |
|
||||
pos.y = pos.y + 0.5 |
|
||||
minetest.add_item(pos, {name = "food:milk"}) |
|
||||
end |
|
||||
|
|
||||
self.gotten = true -- milked |
|
||||
|
|
||||
return |
|
||||
end |
|
||||
end, |
|
||||
} |
|
||||
|
|
||||
-- bucket of milk |
|
||||
minetest.register_craftitem(":mobs:bucket_milk", { |
|
||||
description = "Bucket of Milk", |
|
||||
inventory_image = "codermobs_bucket_milk.png", |
|
||||
stack_max = 1, |
|
||||
on_use = minetest.item_eat(8, 'bucket:bucket_empty'), |
|
||||
}) |
|
||||
|
|
||||
-- cheese wedge |
|
||||
minetest.register_craftitem(":mobs:cheese", { |
|
||||
description = "Cheese", |
|
||||
inventory_image = "codermobs_cheese.png", |
|
||||
on_use = minetest.item_eat (4) , |
|
||||
}) |
|
||||
|
|
||||
minetest.register_craft ({ |
|
||||
type = "cooking", |
|
||||
output = "mobs:cheese", |
|
||||
recipe = "mobs:bucket_milk", |
|
||||
cooktime = 5, |
|
||||
replacements = {{ "mobs:bucket_milk", "bucket:bucket_empty"}} |
|
||||
}) |
|
||||
|
|
||||
-- cheese block |
|
||||
minetest.register_node(":mobs:cheeseblock", { |
|
||||
description = "Cheese Block", |
|
||||
tiles = { "codermobs_cheeseblock.png" } , |
|
||||
is_ground_content = false, |
|
||||
groups = {crumbly = 3}, |
|
||||
sounds = default.node_sound_dirt_defaults() |
|
||||
}) |
|
||||
|
|
||||
minetest.register_craft ({ |
|
||||
output = "mobs:cheeseblock" , |
|
||||
recipe = { |
|
||||
{'mobs:cheese', 'mobs:cheese', 'mobs:cheese'}, |
|
||||
{'mobs:cheese', 'mobs:cheese', 'mobs:cheese'}, |
|
||||
{'mobs:cheese', 'mobs:cheese', 'mobs:cheese'}, |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
minetest.register_craft({ |
|
||||
output = "mobs:cheese 9", |
|
||||
recipe = { |
|
||||
{'mobs:cheeseblock'}, |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
-- =================================================================== |
|
||||
|
|
||||
codermobs.setup_mob() |
|
||||
codermobs.log_done() |
|
||||
|
|
||||
-- =================================================================== |
|
||||
-- End of file. |
|
@ -0,0 +1,146 @@ |
|||||
|
-- Deer. Descended from Sapier version. |
||||
|
|
||||
|
-- =================================================================== |
||||
|
-- Mob Framework Mod by Sapier |
||||
|
-- |
||||
|
-- You may copy, use, modify or do nearly anything except removing this |
||||
|
-- copyright notice. Of course, you are NOT allow to pretend you have |
||||
|
-- written it. |
||||
|
-- CC-BY-SA 3.0. Attribution: sapier. |
||||
|
-- |
||||
|
--! @file init.lua |
||||
|
--! @brief deer implementation |
||||
|
--! @copyright Sapier |
||||
|
--! @author Sapier |
||||
|
--! @date 2013-01-27 |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
local lcname = "deer" |
||||
|
local ucname = "Deer" |
||||
|
local msname = "codermobs_" .. lcname |
||||
|
local obj_name = "codermobs:" .. lcname |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
mobs_param = { |
||||
|
lcname = lcname , |
||||
|
ucname = ucname , |
||||
|
obj_name = obj_name , |
||||
|
|
||||
|
aoc = 2 , |
||||
|
obr = 1 , |
||||
|
day_mode = true , |
||||
|
min_light = 14 , |
||||
|
max_light = 20 , |
||||
|
min_height = 0 , |
||||
|
max_height = 200 , |
||||
|
spawn_chance = 8000 , |
||||
|
spawn_type = "animal" , |
||||
|
|
||||
|
spawn_nodes = { |
||||
|
"default:dirt_with_grass" , |
||||
|
"ethereal:green_dirt" , |
||||
|
"ethereal:green_dirt_top" , |
||||
|
"ethereal:grove_dirt" , |
||||
|
"mg:dirt_with_dry_grass" , |
||||
|
} , |
||||
|
|
||||
|
spawn_by = { |
||||
|
"group:grass" , |
||||
|
"flowers:mushroom_brown" , |
||||
|
} , |
||||
|
|
||||
|
add_egg = true , |
||||
|
egg_image = "wool_pink.png" , |
||||
|
} |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
codermobs.adjust_param() |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
mobs_param.core_param = { |
||||
|
type = mobs_param.spawn_type , |
||||
|
makes_footstep_sound = true , |
||||
|
|
||||
|
armor = 200 , |
||||
|
attack_npcs = false , |
||||
|
attack_type = "dogfight" , |
||||
|
damage = 2 , |
||||
|
fear_height = 3 , |
||||
|
group_attack = true , |
||||
|
hp_max = 15 , |
||||
|
hp_min = 5 , |
||||
|
jump_height = 6 , |
||||
|
jump = true , |
||||
|
owner_loyal = true , |
||||
|
passive = false , |
||||
|
pushable = true , |
||||
|
reach = 2 , |
||||
|
rotate = 270 , |
||||
|
run_velocity = 3 , |
||||
|
stepheight = 0.6 , |
||||
|
type = "animal" , |
||||
|
view_range = 10 , |
||||
|
walk_velocity = 2 , |
||||
|
|
||||
|
lava_damage = 5 , |
||||
|
light_damage = 0 , |
||||
|
water_damage = 0 , |
||||
|
|
||||
|
collisionbox = { -0.70, -1.10, -0.70, 0.70, 0.80, 0.70 } , |
||||
|
mesh = msname .. "_male.b3d" , |
||||
|
textures = {{ msname .. ".png" }} , |
||||
|
visual = "mesh" , |
||||
|
|
||||
|
sounds = { |
||||
|
}, |
||||
|
|
||||
|
follow = { "default:apple", "farming:potato" } , |
||||
|
|
||||
|
drops = { |
||||
|
{ |
||||
|
name = "animal_materials:meat_venison" , |
||||
|
chance = 1, min = 1, max = 1 , |
||||
|
} , |
||||
|
{ |
||||
|
name = "animal_materials:deer_horns" , |
||||
|
chance = 1, min = 1, max = 1 , |
||||
|
} , |
||||
|
{ |
||||
|
name = "animal_materials:fur_deer" , |
||||
|
chance = 4, min = 1, max = 1 , |
||||
|
} , |
||||
|
{ |
||||
|
name = "animal_materials:bone" , |
||||
|
chance = 4, min = 1, max = 1 , |
||||
|
} , |
||||
|
} , |
||||
|
|
||||
|
animation = { |
||||
|
walk_start = 0 , |
||||
|
walk_end = 60 , |
||||
|
stand_start = 61 , |
||||
|
stand_end = 120 , |
||||
|
speed_normal = 15 , |
||||
|
} , |
||||
|
|
||||
|
on_rightclick = function (self, clicker) |
||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then return end |
||||
|
if mobs:protect(self, clicker) then return end |
||||
|
|
||||
|
if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then |
||||
|
return |
||||
|
end |
||||
|
end, |
||||
|
} |
||||
|
|
||||
|
-- =================================================================== |
||||
|
|
||||
|
codermobs.setup_mob() |
||||
|
codermobs.log_done() |
||||
|
|
||||
|
-- =================================================================== |
||||
|
-- End of file. |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 603 KiB |
After Width: | Height: | Size: 564 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 201 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 128 KiB |
After Width: | Height: | Size: 128 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 238 KiB |
@ -0,0 +1,3 @@ |
|||||
|
see *.diff files for authors of new textures |
||||
|
Anything else: CC BY-SA 4.0 Poikilos |
||||
|
Notify me if any authors are missing. |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |