Mods update

master
daretmavi 2021-04-14 22:25:01 +02:00
parent 0a83f20edf
commit 65a74a8175
136 changed files with 1974 additions and 373 deletions

View File

@ -73,11 +73,11 @@ origin https://github.com/minetest-mods/dynamic_liquid (fetch)
Mod: environment/dynamic_liquid
origin https://notabug.org/tenplus1/farming (fetch)
* master 113fac2 [origin/master] added soy sauce
* master f1d52b4 [origin/master] reduce shapeless crafts
Mod: flora/farming
origin https://github.com/minetest-mods/i3.git (fetch)
* main 3db6bbe [origin/main] UI improvements
* main f85b0f7 [origin/main] Tweaking
Mod: gui/i3
origin https://repo.or.cz/minetest_hbarmor.git (fetch)
@ -113,7 +113,7 @@ origin https://github.com/TheTermos/mobkit (fetch)
Mod: lib_api/mobkit
origin https://notabug.org/tenplus1/mobs_redo (fetch)
* master c06d071 [origin/master] allow players with 'protection_bypass' to rename owned tamed mobs
* master c023ecc [origin/master] reduce shapeless crafts
Mod: lib_api/mobs_redo
origin https://github.com/appgurueu/modlib (fetch)
@ -129,7 +129,7 @@ origin git@github.com:minetest-mods/ts_workshop.git (fetch)
Mod: lib_api/ts_workshop
origin https://github.com/Skandarella/Animal-World.git (fetch)
* main a5bb0b5 [origin/main] Add files via upload
* main d4387aa [origin/main] Update depends.txt
Mod: mobs/mobs_mobs/Animal-World
origin https://github.com/hkzorman/advanced_npc.git (fetch)
@ -157,7 +157,7 @@ origin https://github.com/berengma/aerotest (fetch)
Mod: mobs/mobs_mobkit/aerotest
origin https://github.com/runsy/petz (fetch)
* master 8fd8bd4 [origin/master] fixes
* master db3fa98 [origin/master] fixes
Mod: mobs/mobs_mobkit/petz
origin https://github.com/berengma/water_life (fetch)
@ -185,7 +185,7 @@ origin https://github.com/minetest-mods/hbsprint/ (fetch)
Mod: player/hbsprint
origin https://gitlab.com/4w/hunger_ng.git (fetch)
* master a24b602 [origin/master] Merge branch 'tenplus1-master-patch-85031' into 'master'
* master ccd96fb [origin/master] remove debug leftover
Mod: player/hunger_ng
origin https://github.com/minetest-mods/skinsdb.git (fetch)
@ -201,7 +201,7 @@ origin https://github.com/minetest-mods/wielded_light.git (fetch)
Mod: player/wielded_light
origin https://notabug.org/TenPlus1/bonemeal.git (fetch)
* master 05e211a [origin/master] can grow cactus and papyrus
* master b5819d0 [origin/master] reduce shapeless crafts
Mod: tools/bonemeal
origin git@gitlab.com:daretmavi/bucket-lite.git (fetch)

0
mods/buildings/ts_doors/init.lua Executable file → Normal file
View File

View File

@ -117,9 +117,11 @@ minetest.register_node("farming:salt_crystal", {
},
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:salt 9",
recipe = {"farming:salt_crystal", "farming:mortar_pestle"},
recipe = {
{"farming:salt_crystal", "farming:mortar_pestle"}
},
replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}}
})
@ -211,9 +213,11 @@ minetest.register_craftitem("farming:garlic_bread", {
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:garlic_bread",
recipe = {"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"}
recipe = {
{"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"}
}
})
--= Donuts (thanks to Bockwurst for making the donut images)
@ -270,11 +274,11 @@ minetest.register_craftitem("farming:porridge", {
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:porridge",
recipe = {
"group:food_oats", "group:food_oats", "group:food_oats",
"group:food_oats", "group:food_bowl", "group:food_milk_glass"
{"group:food_oats", "group:food_oats", "group:food_oats"},
{"group:food_oats", "group:food_bowl", "group:food_milk_glass"}
},
replacements = {
{"mobs:glass_milk", "vessels:drinking_glass"},
@ -291,12 +295,12 @@ minetest.register_craftitem("farming:jaffa_cake", {
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:jaffa_cake",
recipe = {
"farming:baking_tray", "group:food_egg", "group:food_sugar",
"group:food_flour", "group:food_cocoa", "group:food_orange",
"group:food_milk"
{"farming:baking_tray", "group:food_egg", "group:food_sugar"},
{"group:food_flour", "group:food_cocoa", "group:food_orange"},
{"group:food_milk", "", ""}
},
replacements = {
{"farming:baking_tray", "farming:baking_tray"},
@ -314,10 +318,10 @@ minetest.register_craftitem("farming:apple_pie", {
minetest.register_craft({
output = "farming:apple_pie",
type = "shapeless",
-- type = "shapeless",
recipe = {
"group:food_flour", "group:food_sugar",
"group:food_apple", "group:food_baking_tray"
{"group:food_flour", "group:food_sugar", "group:food_apple"},
{"", "group:food_baking_tray", ""}
},
replacements = {{"group:food_baking_tray", "farming:baking_tray"}}
})
@ -342,11 +346,10 @@ minetest.register_craftitem("farming:cactus_juice", {
})
minetest.register_craft({
output = "farming:cactus_juice 2",
type = "shapeless",
output = "farming:cactus_juice",
-- type = "shapeless",
recipe = {
"vessels:drinking_glass", "vessels:drinking_glass",
"default:cactus", "farming:juicer"
{"default:cactus", "farming:juicer", "vessels:drinking_glass"}
},
replacements = {
{"group:food_juicer", "farming:juicer"}
@ -363,20 +366,18 @@ minetest.register_craftitem("farming:pasta", {
minetest.register_craft({
output = "farming:pasta",
type = "shapeless",
-- type = "shapeless",
recipe = {
"group:food_flour", "group:food_mixing_bowl",
"group:food_butter"
{"group:food_flour", "group:food_butter", "group:food_mixing_bowl"}
},
replacements = {{"group:food_mixing_bowl", "farming:mixing_bowl"}}
})
minetest.register_craft({
output = "farming:pasta",
type = "shapeless",
-- type = "shapeless",
recipe = {
"group:food_flour", "group:food_mixing_bowl",
"group:food_oil"
{"group:food_flour", "group:food_oil", "group:food_mixing_bowl"}
},
replacements = {
{"group:food_mixing_bowl", "farming:mixing_bowl"},
@ -394,10 +395,10 @@ minetest.register_craftitem("farming:spaghetti", {
minetest.register_craft({
output = "farming:spaghetti",
type = "shapeless",
-- type = "shapeless",
recipe = {
"group:food_pasta", "group:food_saucepan",
"group:food_tomato", "group:food_garlic_clove", "group:food_garlic_clove"
{"group:food_pasta", "group:food_saucepan", "group:food_tomato"},
{"group:food_garlic_clove", "group:food_garlic_clove", ""}
},
replacements = {{"group:food_saucepan", "farming:saucepan"}}
})
@ -412,11 +413,11 @@ minetest.register_craftitem("farming:bibimbap", {
minetest.register_craft({
output = "farming:bibimbap",
type = "shapeless",
-- type = "shapeless",
recipe = {
"group:food_skillet", "group:food_bowl", "group:food_egg", "group:food_rice",
"group:food_chicken_raw", "group:food_cabbage", "group:food_carrot",
"group:food_chili_pepper"
{"group:food_skillet", "group:food_bowl", "group:food_egg"},
{"group:food_rice", "group:food_chicken_raw", "group:food_cabbage"},
{"group:food_carrot", "group:food_chili_pepper", ""}
},
replacements = {{"group:food_skillet", "farming:skillet"}}
})
@ -441,12 +442,12 @@ minetest.register_craftitem("farming:burger", {
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:burger",
recipe = {
"farming:bread", "group:food_meat", "group:food_cheese",
"group:food_tomato", "group:food_cucumber", "group:food_onion",
"group:food_lettuce"
{"farming:bread", "group:food_meat", "group:food_cheese"},
{"group:food_tomato", "group:food_cucumber", "group:food_onion"},
{"group:food_lettuce", "", ""}
}
})
@ -464,7 +465,7 @@ minetest.register_craft({
recipe = {
"group:food_bowl", "group:food_tomato", "group:food_cucumber",
"group:food_lettuce", "group:food_oil"
},
}
})
-- Triple Berry Smoothie
@ -510,7 +511,7 @@ minetest.register_craft({
minetest.register_craftitem("farming:potato_omelet", {
description = S("Potato omelet"),
inventory_image = "farming_potato_omelet.png",
on_use = minetest.item_eat(6, "farming:bowl"),
on_use = minetest.item_eat(6, "farming:bowl")
})
minetest.register_craft({
@ -549,11 +550,11 @@ minetest.register_craftitem("farming:flan", {
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:flan",
recipe = {
"group:food_sugar", "group:food_milk", "farming:caramel",
"group:food_egg", "group:food_egg", "farming:vanilla_extract"
{"group:food_sugar", "group:food_milk", "farming:caramel"},
{"group:food_egg", "group:food_egg", "farming:vanilla_extract"}
},
replacements = {
{"cucina_vegana:soy_milk", "vessels:drinking_glass"},
@ -568,17 +569,17 @@ minetest.register_craftitem("farming:cheese_vegan", {
description = S("Vegan Cheese"),
inventory_image = "farming_cheese_vegan.png",
on_use = minetest.item_eat(2),
groups = {food_cheese = 1, flammable = 2},
groups = {food_cheese = 1, flammable = 2}
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:cheese_vegan",
recipe = {
"farming:soy_milk", "farming:soy_milk", "farming:soy_milk",
"group:food_salt", "group:food_peppercorn", "farming:bottle_ethanol",
"group:food_gelatin", "group:food_pot"
{"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"},
{"group:food_salt", "group:food_peppercorn", "farming:bottle_ethanol"},
{"group:food_gelatin", "group:food_pot", ""}
},
replacements = {
{"farming:soy_milk", "vessels:drinking_glass 3"},
@ -588,16 +589,16 @@ minetest.register_craft({
})
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "farming:cheese_vegan",
recipe = {
"farming:soy_milk", "farming:soy_milk", "farming:soy_milk",
"group:food_salt", "group:food_peppercorn", "group:food_lemon",
"group:food_gelatin", "group:food_pot"
{"farming:soy_milk", "farming:soy_milk", "farming:soy_milk"},
{"group:food_salt", "group:food_peppercorn", "group:food_lemon"},
{"group:food_gelatin", "group:food_pot", ""}
},
replacements = {
{"farming:soy_milk", "vessels:drinking_glass 3"},
{"farming:pot", "farming:pot"},
{"farming:pot", "farming:pot"}
}
})
@ -639,3 +640,25 @@ minetest.register_craft({
{"group:food_skillet", "farming:skillet"}
}
})
-- Mochi
minetest.register_craftitem("farming:mochi", {
description = S("Mochi"),
inventory_image = "farming_mochi.png",
on_use = minetest.item_eat(3),
groups = {flammable = 2},
})
minetest.register_craft({
type = "shapeless",
output = "farming:mochi",
recipe = {
"group:food_mortar_pestle", "group:food_rice", "group:food_rice",
"group:food_sugar", "bucket:bucket_river_water"
},
replacements = {
{"group:food_mortar_pestle", "farming:mortar_pestle"},
{"bucket:bucket_river_water", "bucket:bucket_empty"}
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

View File

@ -34,6 +34,7 @@ local clr = core.colorize
local parse_json = core.parse_json
local write_json = core.write_json
local get_inv = core.get_inventory
local chat_send = core.chat_send_player
local show_formspec = core.show_formspec
local check_privs = core.check_player_privs
@ -138,6 +139,9 @@ local PNG = {
waypoints = "i3_waypoint.png",
teleport = "i3_teleport.png",
add = "i3_add.png",
refresh = "i3_refresh.png",
visible = "i3_visible.png^\\[brighten",
nonvisible = "i3_non_visible.png",
cancel_hover = "i3_cancel.png^\\[brighten",
search_hover = "i3_search.png^\\[brighten",
@ -157,6 +161,7 @@ local PNG = {
waypoints_hover = "i3_waypoint_hover.png",
teleport_hover = "i3_teleport.png^\\[brighten",
add_hover = "i3_add.png^\\[brighten",
refresh_hover = "i3_refresh.png^\\[brighten",
}
local fs_elements = {
@ -178,9 +183,11 @@ local fs_elements = {
local styles = sprintf([[
style_type[field;border=false;bgcolor=transparent]
style_type[label,field;font_size=16]
style_type[image_button;border=false;sound=i3_click]
style_type[item_image_button;border=false;bgimg_hovered=%s;sound=i3_click]
style_type[button;border=false;content_offset=0]
style_type[image_button,item_image_button;border=false;sound=i3_click]
style_type[item_image_button;bgimg_hovered=%s]
style[pagenum,no_item,no_rcp;font=bold;font_size=18]
style[cancel;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[search;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[prev_page;fgimg=%s;fgimg_hovered=%s]
@ -190,11 +197,8 @@ local styles = sprintf([[
style[prev_usage;fgimg=%s;fgimg_hovered=%s]
style[next_usage;fgimg=%s;fgimg_hovered=%s]
style[waypoint_add;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[waypoint_delete;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[waypoint_teleport;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[pagenum,no_item,no_rcp;border=false;font=bold;font_size=18;content_offset=0]
style[btn_bag,btn_armor,btn_skins;font=bold;font_size=18;border=false;content_offset=0;sound=i3_click]
style[craft_rcp,craft_usg;border=false;noclip=true;font_size=16;sound=i3_craft;
style[btn_bag,btn_armor,btn_skins;font=bold;font_size=18;content_offset=0;sound=i3_click]
style[craft_rcp,craft_usg;noclip=true;font_size=16;sound=i3_craft;
bgimg=i3_btn9.png;bgimg_hovered=i3_btn9_hovered.png;
bgimg_pressed=i3_btn9_pressed.png;bgimg_middle=4,6]
]],
@ -207,9 +211,7 @@ PNG.prev, PNG.prev_hover,
PNG.next, PNG.next_hover,
PNG.prev, PNG.prev_hover,
PNG.next, PNG.next_hover,
PNG.add, PNG.add_hover,
PNG.trash, PNG.trash_hover,
PNG.teleport, PNG.teleport_hover)
PNG.add, PNG.add_hover)
local function get_lang_code(info)
return info and info.lang_code
@ -1255,8 +1257,7 @@ local function select_item(player, name, data, _f)
local stack = ItemStack(item)
local stackmax = stack:get_stack_max()
stack = fmt("%s %s", item, stackmax)
get_stack(player, name, stack, clr("#ff0", fmt("%u x %s", stackmax, item)))
return
return get_stack(player, name, stack, clr("#ff0", fmt("%u x %s", stackmax, get_desc(item))))
end
if item == data.query_item then return end
@ -1278,6 +1279,14 @@ local function repairable(tool)
return toolrepair and def and def.groups and def.groups.disable_repair ~= 1
end
local function get_waypoint(data, id)
for i, v in ipairs(data.waypoints) do
if id == v.id then
return v, i
end
end
end
local function is_fav(favs, query_item)
local fav, i
for j = 1, #favs do
@ -1291,7 +1300,7 @@ local function is_fav(favs, query_item)
return fav, i
end
local function get_tooltip(item, info)
local function get_tooltip(item, info, pos)
local tooltip
if info.groups then
@ -1309,7 +1318,7 @@ local function get_tooltip(item, info)
tooltip = S("Any item belonging to the groups: @1", groupstr)
end
else
tooltip = get_desc(item)
tooltip = info.meta_desc or get_desc(item)
end
local function add(str)
@ -1364,6 +1373,10 @@ local function get_tooltip(item, info)
end
end
if pos then
return fmt("tooltip", pos.x, pos.y, ITEM_BTN_SIZE, ITEM_BTN_SIZE, ESC(tooltip))
end
return fmt("tooltip[%s;%s]", item, ESC(tooltip))
end
@ -1401,20 +1414,33 @@ local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_siz
if rcp.type == "fuel" then
fs("animated_image", X + 0.05, Y, ITEM_BTN_SIZE, ITEM_BTN_SIZE, PNG.fire_anim, 8, 180)
else
local item = rcp.output
item = ItemStack(clean_name(item))
local item = ItemStack(rcp.output)
local meta = item:get_meta()
local name = item:get_name()
local count = item:get_count()
local bt_s = ITEM_BTN_SIZE * 1.2
fs("image", X, Y - 0.11, bt_s, bt_s, PNG.slot)
local _name = fmt("_%s", name)
local pos
fs("item_image_button",
X + 0.11, Y, ITEM_BTN_SIZE, ITEM_BTN_SIZE,
fmt("%s %u", name, count * (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1)),
_name, "")
if meta:get_string("color") ~= "" or meta:get_string("palette_index") ~= "" then
local rcp_usg = is_recipe and "rcp" or "usg"
fs(fmt("style_type[list;size=%f]", ITEM_BTN_SIZE))
fs("listcolors[#bababa50;#bababa99]")
fs(fmt("list[detached:i3_output_%s;main;%f,%f;1,1;]", rcp_usg, X + 0.11, Y))
fs("button", X + 0.11, Y, ITEM_BTN_SIZE, ITEM_BTN_SIZE, _name, "")
local inv = get_inv {type = "detached", name = fmt("i3_output_%s", rcp_usg)}
inv:set_stack("main", 1, item)
pos = {x = X + 0.11, y = Y}
else
fs("image", X, Y - 0.11, bt_s, bt_s, PNG.slot)
fs("item_image_button",
X + 0.11, Y, ITEM_BTN_SIZE, ITEM_BTN_SIZE,
fmt("%s %u", name, count * (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1)),
_name, "")
end
local def = reg_items[name]
local unknown = not def or nil
@ -1422,17 +1448,22 @@ local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_siz
local weird = name ~= "" and desc and weird_desc(desc) or nil
local burntime = fuel_cache[name] and fuel_cache[name].burntime
local short_desc = meta:get_string("short_description")
local long_desc = meta:get_string("description")
local meta_desc = (short_desc ~= "" and short_desc) or (long_desc ~= "" and long_desc)
local infos = {
unknown = unknown,
weird = weird,
burntime = burntime,
repair = repairable(name),
rarity = rcp.rarity,
tools = rcp.tools,
unknown = unknown,
weird = weird,
burntime = burntime,
repair = repairable(name),
rarity = rcp.rarity,
tools = rcp.tools,
meta_desc = meta_desc,
}
if next(infos) then
fs(get_tooltip(_name, infos))
fs(get_tooltip(_name, infos, pos))
end
end
end
@ -1458,9 +1489,11 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
end
for i = 1, width * rows do
local item = rcp.items[i] or ""
item = clean_name(item)
local name = match(item, "%S*")
local item = rcp.items[i] or ""
item = ItemStack(item)
local meta = item:get_meta()
local name = item:get_name()
local count = item:get_count()
local X = ceil((i - 1) % width - width)
X = X + (X * 0.2) + data.xoffset + 3.9
@ -1487,7 +1520,7 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
if is_group(name) then
groups = extract_groups(name)
item = groups_to_items(groups)
name = groups_to_items(groups)
end
local label = groups and "\nG" or ""
@ -1518,26 +1551,31 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
fs("image", X, Y, btn_size, btn_size, PNG.slot)
end
local btn_name = groups and fmt("group|%s|%s", groups[1], item) or item
local btn_name = groups and fmt("group|%s|%s", groups[1], name) or name
fs("item_image_button", X, Y, btn_size, btn_size,
fmt("%s %u", item, is_recipe and data.scrbar_rcp or data.scrbar_usg or 1),
fmt("%s %u", name, count * (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1)),
btn_name, label)
local def = reg_items[name]
local unknown = not def or nil
unknown = not groups and unknown or nil
unknown = not groups and unknown or nil
local desc = def and def.description
local weird = name ~= "" and desc and weird_desc(desc) or nil
local burntime = fuel_cache[name] and fuel_cache[name].burntime
local short_desc = meta:get_string("short_description")
local long_desc = meta:get_string("description")
local meta_desc = (short_desc ~= "" and short_desc) or (long_desc ~= "" and long_desc) or nil
local infos = {
unknown = unknown,
weird = weird,
groups = groups,
burntime = burntime,
cooktime = cooktime,
replace = replace,
unknown = unknown,
weird = weird,
groups = groups,
burntime = burntime,
cooktime = cooktime,
replace = replace,
meta_desc = meta_desc,
}
if next(infos) then
@ -1553,6 +1591,13 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
end
local function get_rcp_lbl(fs, data, panel, rn, is_recipe)
local rcp = is_recipe and panel.rcp[data.rnum] or panel.rcp[data.unum]
if rcp.custom then
fs("hypertext", data.xoffset + 4.8, data.yoffset + 0.2, 3, 0.6, "custom_rcp",
fmt("<global size=16><right><i>%s</i></right>", ES"Custom recipe"))
end
local lbl = ES("Usage @1 of @2", data.unum, rn)
if is_recipe then
@ -1562,7 +1607,7 @@ local function get_rcp_lbl(fs, data, panel, rn, is_recipe)
local one = rn == 1
local y = data.yoffset + 3.3
fs("hypertext", data.xoffset + (one and 4.7 or 3.95), y, 3, 0.6, "",
fs("hypertext", data.xoffset + (one and 4.7 or 3.95), y, 3, 0.6, "rcp_num",
fmt("<global size=16><right>%s</right>", lbl))
if not one then
@ -1575,7 +1620,6 @@ local function get_rcp_lbl(fs, data, panel, rn, is_recipe)
fs("image_button", data.xoffset + 7.5, y, size, size, "", next_name, "")
end
local rcp = is_recipe and panel.rcp[data.rnum] or panel.rcp[data.unum]
get_grid_fs(fs, data, rcp, is_recipe)
end
@ -1621,7 +1665,7 @@ local function get_model_fs(fs, data, def, model_alias)
t[#t + 1] = t[#t]
end
fs("model", data.xoffset + 6.6, data.yoffset + 0.05, 1.3, 1.3, "",
fs("model", data.xoffset + 6.6, data.yoffset + 0.05, 1.3, 1.3, "preview",
def.mesh, concat(t, ","), "0,0", "true", "true",
model_alias and model_alias.frames or "")
end
@ -1714,16 +1758,16 @@ local function get_rcp_extra(player, data, fs, panel, is_recipe, is_usage)
local rn = panel.rcp and #panel.rcp
if rn then
local rcp_normal = is_recipe and panel.rcp[data.rnum].type == "normal"
local usg_normal = is_usage and panel.rcp[data.unum].type == "normal"
local rcp_ok = is_recipe and panel.rcp[data.rnum].type == "normal"
local usg_ok = is_usage and panel.rcp[data.unum].type == "normal"
local max_stacks_rcp, max_stacks_usg = 0, 0
local inv = player:get_inventory()
if rcp_normal then
if rcp_ok then
max_stacks_rcp = get_stack_max(inv, data, is_recipe, panel.rcp[data.rnum])
end
if usg_normal then
if usg_ok then
max_stacks_usg = get_stack_max(inv, data, is_recipe, panel.rcp[data.unum])
end
@ -1795,7 +1839,7 @@ local function get_panels(player, data, fs)
end
local function add_subtitle(fs, name, y, ctn_len, font_size, label)
fs(fmt("style[%s;font=bold;font_size=%u;border=false;content_offset=0]", name, font_size))
fs(fmt("style[%s;font=bold;font_size=%u]", name, font_size))
fs("button", 0, y, ctn_len, 0.5, name, ESC(label))
fs("image", 0, y + 0.55, ctn_len, 0.035, PNG.bar)
end
@ -1868,6 +1912,68 @@ local function get_award_list(data, fs, ctn_len, yextra, award_list, awards_unlo
end
end
local function get_waypoint_fs(fs, data, name, yextra, ctn_len)
fs(fmt("box[0,%f;4.9,0.6;#bababa25]", yextra + 1.1))
fs("label", 0, yextra + 0.85, ES"Waypoint name:")
fs(fmt("field[0.1,%f;4.8,0.6;waypoint_name;;]", yextra + 1.1))
fs("image_button", 5.1, yextra + 1.15, 0.5, 0.5, "", "waypoint_add", "")
fs(fmt("tooltip[waypoint_add;%s]", ES"Add waypoint"))
if #data.waypoints == 0 then return end
fs("image", 0, yextra + 2, ctn_len, 0.035, PNG.bar)
for i, v in ipairs(data.waypoints) do
local y = yextra + 1.65 + (i - (i * 0.3))
local icon_size, yi = 0.35, y + 0.12
fs("style_type[box;colors=#bababa30,#bababa30,#bababa05,#bababa05]")
fs("box", 0, y, ctn_len, 0.6, "")
local waypoint_name, lim = v.name, 18
if #v.name > lim then
waypoint_name = snip(waypoint_name, lim)
end
fs("style_type[label;font_size=17]")
local hex = fmt("%02x", v.color)
while #hex < 6 do
hex = "0" .. hex
end
fs("label", 0.15, y + 0.33, clr(fmt("#%s", hex), waypoint_name))
local del = fmt("waypoint_%u_delete", v.id)
fs(fmt("style[%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]", del, PNG.trash, PNG.trash_hover))
fs("image_button", ctn_len - 0.5, yi, icon_size, icon_size, "", del, "")
fs(fmt("tooltip[%s;%s]", del, ES"Remove waypoint"))
local rfs = fmt("waypoint_%u_refresh", v.id)
fs(fmt("style[%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]", rfs, PNG.refresh, PNG.refresh_hover))
fs("image_button", ctn_len - 1, yi, icon_size, icon_size, "", rfs, "")
fs(fmt("tooltip[%s;%s]", rfs, ES"Change color"))
local vsb = fmt("waypoint_%u_hide", v.id)
fs(fmt("style[%s;fgimg=%s;content_offset=0]", vsb, v.hide and PNG.nonvisible or PNG.visible))
fs("image_button", ctn_len - 1.5, yi, icon_size, icon_size, "", vsb, "")
fs(fmt("tooltip[%s;%s]", vsb, v.hide and ES"Show waypoint" or ES"Hide waypoint"))
if core.is_creative_enabled(name) then
local tp = fmt("waypoint_%u_teleport", v.id)
fs(fmt("style[%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]",
tp, PNG.teleport, PNG.teleport_hover))
fs("image_button", ctn_len - 2, yi, icon_size, icon_size, "", tp, "")
fs(fmt("tooltip[%s;%s]", tp, ES"Teleport to waypoint"))
end
end
fs("style_type[label;font_size=16]")
end
local function get_ctn_content(fs, data, player, yoffset, ctn_len, award_list, awards_unlocked, award_list_nb)
local name = player:get_player_name()
add_subtitle(fs, "player_name", 0, ctn_len, 22, ESC(name))
@ -1918,7 +2024,7 @@ local function get_ctn_content(fs, data, player, yoffset, ctn_len, award_list, a
fs("box", (data.subcat - 1) * 1.18, yextra + 0.45, 1, 0.045, "#f9826c")
local function not_installed(modname)
fs("hypertext", 0, yextra + 0.9, ctn_len, 0.6, "",
fs("hypertext", 0, yextra + 0.9, ctn_len, 0.6, "not_installed",
fmt("<center><style color=#7bf font=mono>%s</style> not installed</center>", modname))
end
@ -1926,7 +2032,7 @@ local function get_ctn_content(fs, data, player, yoffset, ctn_len, award_list, a
fs(fmt("list[detached:%s_backpack;main;0,%f;1,1;]", ESC(name), yextra + 0.7))
if not data.bag:get_stack("main", 1):is_empty() then
fs("hypertext", 1.2, yextra + 0.89, ctn_len - 1.9, 0.8, "",
fs("hypertext", 1.2, yextra + 0.89, ctn_len - 1.9, 0.8, "bpk",
ES("The inventory is extended by @1 slots", BAG_SIZES[data.bag_size] - INV_SIZE))
end
@ -1967,34 +2073,7 @@ local function get_ctn_content(fs, data, player, yoffset, ctn_len, award_list, a
end
elseif data.subcat == 5 then
local waypoints = {}
for _, v in ipairs(data.waypoints or {}) do
insert(waypoints, v.name)
end
fs(fmt("dropdown[0,%f;4.2,0.6;waypoints;%s;%u;true]",
yextra + 0.7, concat(waypoints, ","), data.waypoint_id))
local no_waypoint = not data.waypoints or #data.waypoints == 0
if not no_waypoint then
fs("image_button", 4.4, yextra + 0.75, 0.5, 0.5, "", "waypoint_delete", "")
fs(fmt("tooltip[waypoint_delete;%s]", ES"Delete waypoint"))
if core.is_creative_enabled(name) then
fs("image_button",
no_waypoint and 4.4 or 5.1, yextra + 0.77, 0.5, 0.5,
"", "waypoint_teleport", "")
fs(fmt("tooltip[waypoint_teleport;%s]", ES"Teleport to waypoint"))
end
end
fs(fmt("box[0,%f;4.2,0.6;#bababa25]", yextra + 1.5))
fs(fmt("field[0.1,%f;4.1,0.6;waypoint_name;;]", yextra + 1.5))
fs("image_button", 4.4, yextra + 1.55, 0.5, 0.5, "", "waypoint_add", "")
fs(fmt("tooltip[waypoint_add;%s]", ES"Add waypoint"))
get_waypoint_fs(fs, data, name, yextra, ctn_len)
end
end
@ -2210,7 +2289,7 @@ local function init_data(player, info)
export_counts = {},
current_tab = 1,
subcat = 1,
waypoint_id = 1,
scrbar_inv = 0,
lang_code = get_lang_code(info),
}
@ -2354,7 +2433,7 @@ local function get_inventory_fs(player, data, fs)
local max_val = 15
if __3darmor and data.subcat == 2 then
if (data.scrbar_inv or 0) >= max_val then
if data.scrbar_inv >= max_val then
data.scrbar_inv = data.scrbar_inv + 10
end
@ -2375,7 +2454,12 @@ local function get_inventory_fs(player, data, fs)
max_val = max_val + (award_list_nb * 13)
elseif data.subcat == 5 then
max_val = max_val + 3
local wp_nb = #data.waypoints
if wp_nb > 0 then
local mul = (wp_nb > 8 and 7) or (wp_nb > 4 and 6) or 5
max_val = max_val + 11 + (wp_nb * mul)
end
end
fs(fmt([[
@ -2383,7 +2467,7 @@ local function get_inventory_fs(player, data, fs)
scrollbar[%f,0.2;0.2,%f;vertical;scrbar_inv;%u]
scrollbaroptions[arrows=default;thumbsize=0;max=1000]
]],
(max_val * 4) / 15, max_val, 9.8, ctn_hgt, data.scrbar_inv or 0))
(max_val * 4) / 15, max_val, 9.8, ctn_hgt, data.scrbar_inv))
fs(fmt("scroll_container[3.9,0.2;%f,%f;scrbar_inv;vertical]", ctn_len, ctn_hgt))
@ -2474,14 +2558,52 @@ i3.new_tab {
skins.set_player_skin(player, _skins[data.skin_id])
end
if fields.waypoints then
data.waypoint_id = tonumber(fields.waypoints)
end
for field in pairs(fields) do
if sub(field, 1, 4) == "btn_" then
data.subcat = indexof(SUBCAT, sub(field, 5))
break
elseif find(field, "waypoint_%d+") then
local id, action = match(field, "_(%d+)_(%w+)$")
id = tonum(id)
local waypoint, _id = get_waypoint(data, id)
if action == "delete" then
player:hud_remove(waypoint.id)
remove(data.waypoints, _id)
elseif action == "teleport" then
local pos = waypoint.pos
pos.y = pos.y + 0.5
player:set_pos(pos)
msg(name, fmt("Teleported to %s", clr("#ff0", waypoint.name)))
elseif action == "refresh" then
local color = random(0xffffff)
waypoint.color = color
player:hud_change(id, "number", color)
elseif action == "hide" then
if waypoint.hide then
local new_id = player:hud_add {
hud_elem_type = "waypoint",
name = waypoint.name,
text = " m",
world_pos = waypoint.pos,
number = waypoint.color,
z_index = -300,
}
waypoint.id = new_id
waypoint.hide = nil
else
player:hud_remove(waypoint.id)
waypoint.hide = true
end
end
break
end
end
@ -2501,13 +2623,10 @@ i3.new_tab {
return
elseif fields.waypoint_add then
data.waypoints = data.waypoints or {}
local waypoint = fields.waypoint_name
local last = #data.waypoints + 1
data.waypoint_id = last
if fields.waypoint_name == "" then
waypoint = fmt("Waypoint %u", last)
waypoint = "Waypoint"
end
local color = random(0xffffff)
@ -2523,20 +2642,7 @@ i3.new_tab {
}
insert(data.waypoints, {name = waypoint, pos = pos, color = color, id = id})
elseif fields.waypoint_delete then
local waypoint = data.waypoints[data.waypoint_id]
player:hud_remove(waypoint.id)
remove(data.waypoints, data.waypoint_id)
data.waypoint_id = data.waypoint_id + (data.waypoint_id == 1 and 0 or -1)
elseif fields.waypoint_teleport then
local waypoint = data.waypoints[data.waypoint_id]
local pos = waypoint.pos
pos.y = pos.y + 0.5
player:set_pos(pos)
msg(name, fmt("Teleported to %s", clr("#ff0", waypoint.name)))
data.scrbar_inv = data.scrbar_inv + 1000
end
return set_fs(player)
@ -2605,6 +2711,12 @@ local trash = create_inventory("i3_trash", {
trash:set_size("main", 1)
local output_rcp = create_inventory("i3_output_rcp", {})
output_rcp:set_size("main", 1)
local output_usg = create_inventory("i3_output_usg", {})
output_usg:set_size("main", 1)
core.register_on_player_inventory_action(function(player, _, _, info)
local name = player:get_player_name()
@ -2884,18 +2996,21 @@ end
local function init_waypoints(player)
local name = player:get_player_name()
local data = pdata[name]
data.waypoints = data.waypoints or {}
for _, v in ipairs(data.waypoints or {}) do
local id = player:hud_add {
hud_elem_type = "waypoint",
name = v.name,
text = " m",
world_pos = v.pos,
number = v.color,
z_index = -300,
}
for _, v in ipairs(data.waypoints) do
if not v.hide then
local id = player:hud_add {
hud_elem_type = "waypoint",
name = v.name,
text = " m",
world_pos = v.pos,
number = v.color,
z_index = -300,
}
v.id = id
v.id = id
end
end
end

View File

@ -12,7 +12,7 @@ local toolrepair
local tabs = {}
local progressive_mode = core.settings:get_bool "i3_progressive_mode"
local progressive_mode = core.settings:get_bool "i3_progressive_mode" and not(core.is_creative_enabled())
local damage_enabled = core.settings:get_bool "enable_damage"
local __3darmor, __skinsdb, __awards
@ -34,6 +34,7 @@ local clr = core.colorize
local parse_json = core.parse_json
local write_json = core.write_json
local get_inv = core.get_inventory
local chat_send = core.chat_send_player
local show_formspec = core.show_formspec
local check_privs = core.check_player_privs
@ -138,6 +139,9 @@ local PNG = {
waypoints = "i3_waypoint.png",
teleport = "i3_teleport.png",
add = "i3_add.png",
refresh = "i3_refresh.png",
visible = "i3_visible.png^\\[brighten",
nonvisible = "i3_non_visible.png",
cancel_hover = "i3_cancel.png^\\[brighten",
search_hover = "i3_search.png^\\[brighten",
@ -157,6 +161,7 @@ local PNG = {
waypoints_hover = "i3_waypoint_hover.png",
teleport_hover = "i3_teleport.png^\\[brighten",
add_hover = "i3_add.png^\\[brighten",
refresh_hover = "i3_refresh.png^\\[brighten",
}
local fs_elements = {
@ -178,9 +183,11 @@ local fs_elements = {
local styles = sprintf([[
style_type[field;border=false;bgcolor=transparent]
style_type[label,field;font_size=16]
style_type[image_button;border=false;sound=i3_click]
style_type[item_image_button;border=false;bgimg_hovered=%s;sound=i3_click]
style_type[button;border=false;content_offset=0]
style_type[image_button,item_image_button;border=false;sound=i3_click]
style_type[item_image_button;bgimg_hovered=%s]
style[pagenum,no_item,no_rcp;font=bold;font_size=18]
style[cancel;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[search;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[prev_page;fgimg=%s;fgimg_hovered=%s]
@ -190,11 +197,8 @@ local styles = sprintf([[
style[prev_usage;fgimg=%s;fgimg_hovered=%s]
style[next_usage;fgimg=%s;fgimg_hovered=%s]
style[waypoint_add;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[waypoint_delete;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[waypoint_teleport;fgimg=%s;fgimg_hovered=%s;content_offset=0]
style[pagenum,no_item,no_rcp;border=false;font=bold;font_size=18;content_offset=0]
style[btn_bag,btn_armor,btn_skins;font=bold;font_size=18;border=false;content_offset=0;sound=i3_click]
style[craft_rcp,craft_usg;border=false;noclip=true;font_size=16;sound=i3_craft;
style[btn_bag,btn_armor,btn_skins;font=bold;font_size=18;content_offset=0;sound=i3_click]
style[craft_rcp,craft_usg;noclip=true;font_size=16;sound=i3_craft;
bgimg=i3_btn9.png;bgimg_hovered=i3_btn9_hovered.png;
bgimg_pressed=i3_btn9_pressed.png;bgimg_middle=4,6]
]],
@ -207,9 +211,7 @@ PNG.prev, PNG.prev_hover,
PNG.next, PNG.next_hover,
PNG.prev, PNG.prev_hover,
PNG.next, PNG.next_hover,
PNG.add, PNG.add_hover,
PNG.trash, PNG.trash_hover,
PNG.teleport, PNG.teleport_hover)
PNG.add, PNG.add_hover)
local function get_lang_code(info)
return info and info.lang_code
@ -1255,8 +1257,7 @@ local function select_item(player, name, data, _f)
local stack = ItemStack(item)
local stackmax = stack:get_stack_max()
stack = fmt("%s %s", item, stackmax)
get_stack(player, name, stack, clr("#ff0", fmt("%u x %s", stackmax, item)))
return
return get_stack(player, name, stack, clr("#ff0", fmt("%u x %s", stackmax, get_desc(item))))
end
if item == data.query_item then return end
@ -1278,6 +1279,14 @@ local function repairable(tool)
return toolrepair and def and def.groups and def.groups.disable_repair ~= 1
end
local function get_waypoint(data, id)
for i, v in ipairs(data.waypoints) do
if id == v.id then
return v, i
end
end
end
local function is_fav(favs, query_item)
local fav, i
for j = 1, #favs do
@ -1291,7 +1300,7 @@ local function is_fav(favs, query_item)
return fav, i
end
local function get_tooltip(item, info)
local function get_tooltip(item, info, pos)
local tooltip
if info.groups then
@ -1309,7 +1318,7 @@ local function get_tooltip(item, info)
tooltip = S("Any item belonging to the groups: @1", groupstr)
end
else
tooltip = get_desc(item)
tooltip = info.meta_desc or get_desc(item)
end
local function add(str)
@ -1364,6 +1373,10 @@ local function get_tooltip(item, info)
end
end
if pos then
return fmt("tooltip", pos.x, pos.y, ITEM_BTN_SIZE, ITEM_BTN_SIZE, ESC(tooltip))
end
return fmt("tooltip[%s;%s]", item, ESC(tooltip))
end
@ -1401,20 +1414,33 @@ local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_siz
if rcp.type == "fuel" then
fs("animated_image", X + 0.05, Y, ITEM_BTN_SIZE, ITEM_BTN_SIZE, PNG.fire_anim, 8, 180)
else
local item = rcp.output
item = ItemStack(clean_name(item))
local item = ItemStack(rcp.output)
local meta = item:get_meta()
local name = item:get_name()
local count = item:get_count()
local bt_s = ITEM_BTN_SIZE * 1.2
fs("image", X, Y - 0.11, bt_s, bt_s, PNG.slot)
local _name = fmt("_%s", name)
local pos
fs("item_image_button",
X + 0.11, Y, ITEM_BTN_SIZE, ITEM_BTN_SIZE,
fmt("%s %u", name, count * (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1)),
_name, "")
if meta:get_string("color") ~= "" or meta:get_string("palette_index") ~= "" then
local rcp_usg = is_recipe and "rcp" or "usg"
fs(fmt("style_type[list;size=%f]", ITEM_BTN_SIZE))
fs("listcolors[#bababa50;#bababa99]")
fs(fmt("list[detached:i3_output_%s;main;%f,%f;1,1;]", rcp_usg, X + 0.11, Y))
fs("button", X + 0.11, Y, ITEM_BTN_SIZE, ITEM_BTN_SIZE, _name, "")
local inv = get_inv {type = "detached", name = fmt("i3_output_%s", rcp_usg)}
inv:set_stack("main", 1, item)
pos = {x = X + 0.11, y = Y}
else
fs("image", X, Y - 0.11, bt_s, bt_s, PNG.slot)
fs("item_image_button",
X + 0.11, Y, ITEM_BTN_SIZE, ITEM_BTN_SIZE,
fmt("%s %u", name, count * (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1)),
_name, "")
end
local def = reg_items[name]
local unknown = not def or nil
@ -1422,17 +1448,22 @@ local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_siz
local weird = name ~= "" and desc and weird_desc(desc) or nil
local burntime = fuel_cache[name] and fuel_cache[name].burntime
local short_desc = meta:get_string("short_description")
local long_desc = meta:get_string("description")
local meta_desc = (short_desc ~= "" and short_desc) or (long_desc ~= "" and long_desc)
local infos = {
unknown = unknown,
weird = weird,
burntime = burntime,
repair = repairable(name),
rarity = rcp.rarity,
tools = rcp.tools,
unknown = unknown,
weird = weird,
burntime = burntime,
repair = repairable(name),
rarity = rcp.rarity,
tools = rcp.tools,
meta_desc = meta_desc,
}
if next(infos) then
fs(get_tooltip(_name, infos))
fs(get_tooltip(_name, infos, pos))
end
end
end
@ -1458,9 +1489,11 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
end
for i = 1, width * rows do
local item = rcp.items[i] or ""
item = clean_name(item)
local name = match(item, "%S*")
local item = rcp.items[i] or ""
item = ItemStack(item)
local meta = item:get_meta()
local name = item:get_name()
local count = item:get_count()
local X = ceil((i - 1) % width - width)
X = X + (X * 0.2) + data.xoffset + 3.9
@ -1487,7 +1520,7 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
if is_group(name) then
groups = extract_groups(name)
item = groups_to_items(groups)
name = groups_to_items(groups)
end
local label = groups and "\nG" or ""
@ -1518,26 +1551,31 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
fs("image", X, Y, btn_size, btn_size, PNG.slot)
end
local btn_name = groups and fmt("group|%s|%s", groups[1], item) or item
local btn_name = groups and fmt("group|%s|%s", groups[1], name) or name
fs("item_image_button", X, Y, btn_size, btn_size,
fmt("%s %u", item, is_recipe and data.scrbar_rcp or data.scrbar_usg or 1),
fmt("%s %u", name, count * (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1)),
btn_name, label)
local def = reg_items[name]
local unknown = not def or nil
unknown = not groups and unknown or nil
unknown = not groups and unknown or nil
local desc = def and def.description
local weird = name ~= "" and desc and weird_desc(desc) or nil
local burntime = fuel_cache[name] and fuel_cache[name].burntime
local short_desc = meta:get_string("short_description")
local long_desc = meta:get_string("description")
local meta_desc = (short_desc ~= "" and short_desc) or (long_desc ~= "" and long_desc) or nil
local infos = {
unknown = unknown,
weird = weird,
groups = groups,
burntime = burntime,
cooktime = cooktime,
replace = replace,
unknown = unknown,
weird = weird,
groups = groups,
burntime = burntime,
cooktime = cooktime,
replace = replace,
meta_desc = meta_desc,
}
if next(infos) then
@ -1553,6 +1591,13 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
end
local function get_rcp_lbl(fs, data, panel, rn, is_recipe)
local rcp = is_recipe and panel.rcp[data.rnum] or panel.rcp[data.unum]
if rcp.custom then
fs("hypertext", data.xoffset + 4.8, data.yoffset + 0.2, 3, 0.6, "custom_rcp",
fmt("<global size=16><right><i>%s</i></right>", ES"Custom recipe"))
end
local lbl = ES("Usage @1 of @2", data.unum, rn)
if is_recipe then
@ -1562,7 +1607,7 @@ local function get_rcp_lbl(fs, data, panel, rn, is_recipe)
local one = rn == 1
local y = data.yoffset + 3.3
fs("hypertext", data.xoffset + (one and 4.7 or 3.95), y, 3, 0.6, "",
fs("hypertext", data.xoffset + (one and 4.7 or 3.95), y, 3, 0.6, "rcp_num",
fmt("<global size=16><right>%s</right>", lbl))
if not one then
@ -1575,7 +1620,6 @@ local function get_rcp_lbl(fs, data, panel, rn, is_recipe)
fs("image_button", data.xoffset + 7.5, y, size, size, "", next_name, "")
end
local rcp = is_recipe and panel.rcp[data.rnum] or panel.rcp[data.unum]
get_grid_fs(fs, data, rcp, is_recipe)
end
@ -1621,7 +1665,7 @@ local function get_model_fs(fs, data, def, model_alias)
t[#t + 1] = t[#t]
end
fs("model", data.xoffset + 6.6, data.yoffset + 0.05, 1.3, 1.3, "",
fs("model", data.xoffset + 6.6, data.yoffset + 0.05, 1.3, 1.3, "preview",
def.mesh, concat(t, ","), "0,0", "true", "true",
model_alias and model_alias.frames or "")
end
@ -1714,16 +1758,16 @@ local function get_rcp_extra(player, data, fs, panel, is_recipe, is_usage)
local rn = panel.rcp and #panel.rcp
if rn then
local rcp_normal = is_recipe and panel.rcp[data.rnum].type == "normal"
local usg_normal = is_usage and panel.rcp[data.unum].type == "normal"
local rcp_ok = is_recipe and panel.rcp[data.rnum].type == "normal"
local usg_ok = is_usage and panel.rcp[data.unum].type == "normal"
local max_stacks_rcp, max_stacks_usg = 0, 0
local inv = player:get_inventory()
if rcp_normal then
if rcp_ok then
max_stacks_rcp = get_stack_max(inv, data, is_recipe, panel.rcp[data.rnum])
end
if usg_normal then
if usg_ok then
max_stacks_usg = get_stack_max(inv, data, is_recipe, panel.rcp[data.unum])
end
@ -1795,7 +1839,7 @@ local function get_panels(player, data, fs)
end
local function add_subtitle(fs, name, y, ctn_len, font_size, label)
fs(fmt("style[%s;font=bold;font_size=%u;border=false;content_offset=0]", name, font_size))
fs(fmt("style[%s;font=bold;font_size=%u]", name, font_size))
fs("button", 0, y, ctn_len, 0.5, name, ESC(label))
fs("image", 0, y + 0.55, ctn_len, 0.035, PNG.bar)
end
@ -1868,6 +1912,68 @@ local function get_award_list(data, fs, ctn_len, yextra, award_list, awards_unlo
end
end
local function get_waypoint_fs(fs, data, name, yextra, ctn_len)
fs(fmt("box[0,%f;4.9,0.6;#bababa25]", yextra + 1.1))
fs("label", 0, yextra + 0.85, ES"Waypoint name:")
fs(fmt("field[0.1,%f;4.8,0.6;waypoint_name;;]", yextra + 1.1))
fs("image_button", 5.1, yextra + 1.15, 0.5, 0.5, "", "waypoint_add", "")
fs(fmt("tooltip[waypoint_add;%s]", ES"Add waypoint"))
if #data.waypoints == 0 then return end
fs("image", 0, yextra + 2, ctn_len, 0.035, PNG.bar)
for i, v in ipairs(data.waypoints) do
local y = yextra + 1.65 + (i - (i * 0.3))
local icon_size, yi = 0.35, y + 0.12
fs("style_type[box;colors=#bababa30,#bababa30,#bababa05,#bababa05]")
fs("box", 0, y, ctn_len, 0.6, "")
local waypoint_name, lim = v.name, 18
if #v.name > lim then
waypoint_name = snip(waypoint_name, lim)
end
fs("style_type[label;font_size=17]")
local hex = fmt("%02x", v.color)
while #hex < 6 do
hex = "0" .. hex
end
fs("label", 0.15, y + 0.33, clr(fmt("#%s", hex), waypoint_name))
local del = fmt("waypoint_%u_delete", v.id)
fs(fmt("style[%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]", del, PNG.trash, PNG.trash_hover))
fs("image_button", ctn_len - 0.5, yi, icon_size, icon_size, "", del, "")
fs(fmt("tooltip[%s;%s]", del, ES"Remove waypoint"))
local rfs = fmt("waypoint_%u_refresh", v.id)
fs(fmt("style[%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]", rfs, PNG.refresh, PNG.refresh_hover))
fs("image_button", ctn_len - 1, yi, icon_size, icon_size, "", rfs, "")
fs(fmt("tooltip[%s;%s]", rfs, ES"Change color"))
local vsb = fmt("waypoint_%u_hide", v.id)
fs(fmt("style[%s;fgimg=%s;content_offset=0]", vsb, v.hide and PNG.nonvisible or PNG.visible))
fs("image_button", ctn_len - 1.5, yi, icon_size, icon_size, "", vsb, "")
fs(fmt("tooltip[%s;%s]", vsb, v.hide and ES"Show waypoint" or ES"Hide waypoint"))
if core.is_creative_enabled(name) then
local tp = fmt("waypoint_%u_teleport", v.id)
fs(fmt("style[%s;fgimg=%s;fgimg_hovered=%s;content_offset=0]",
tp, PNG.teleport, PNG.teleport_hover))
fs("image_button", ctn_len - 2, yi, icon_size, icon_size, "", tp, "")
fs(fmt("tooltip[%s;%s]", tp, ES"Teleport to waypoint"))
end
end
fs("style_type[label;font_size=16]")
end
local function get_ctn_content(fs, data, player, yoffset, ctn_len, award_list, awards_unlocked, award_list_nb)
local name = player:get_player_name()
add_subtitle(fs, "player_name", 0, ctn_len, 22, ESC(name))
@ -1914,7 +2020,7 @@ local function get_ctn_content(fs, data, player, yoffset, ctn_len, award_list, a
fs("box", (data.subcat - 1) * 1.18, yextra + 0.45, 1, 0.045, "#f9826c")
local function not_installed(modname)
fs("hypertext", 0, yextra + 0.9, ctn_len, 0.6, "",
fs("hypertext", 0, yextra + 0.9, ctn_len, 0.6, "not_installed",
fmt("<center><style color=#7bf font=mono>%s</style> not installed</center>", modname))
end
@ -1922,7 +2028,7 @@ local function get_ctn_content(fs, data, player, yoffset, ctn_len, award_list, a
fs(fmt("list[detached:%s_backpack;main;0,%f;1,1;]", ESC(name), yextra + 0.7))
if not data.bag:get_stack("main", 1):is_empty() then
fs("hypertext", 1.2, yextra + 0.89, ctn_len - 1.9, 0.8, "",
fs("hypertext", 1.2, yextra + 0.89, ctn_len - 1.9, 0.8, "bpk",
ES("The inventory is extended by @1 slots", BAG_SIZES[data.bag_size] - INV_SIZE))
end
@ -1963,34 +2069,7 @@ local function get_ctn_content(fs, data, player, yoffset, ctn_len, award_list, a
end
elseif data.subcat == 5 then
local waypoints = {}
for _, v in ipairs(data.waypoints or {}) do
insert(waypoints, v.name)
end
fs(fmt("dropdown[0,%f;4.2,0.6;waypoints;%s;%u;true]",
yextra + 0.7, concat(waypoints, ","), data.waypoint_id))
local no_waypoint = not data.waypoints or #data.waypoints == 0
if not no_waypoint then
fs("image_button", 4.4, yextra + 0.75, 0.5, 0.5, "", "waypoint_delete", "")
fs(fmt("tooltip[waypoint_delete;%s]", ES"Delete waypoint"))
if core.is_creative_enabled(name) then
fs("image_button",
no_waypoint and 4.4 or 5.1, yextra + 0.77, 0.5, 0.5,
"", "waypoint_teleport", "")
fs(fmt("tooltip[waypoint_teleport;%s]", ES"Teleport to waypoint"))
end
end
fs(fmt("box[0,%f;4.2,0.6;#bababa25]", yextra + 1.5))
fs(fmt("field[0.1,%f;4.1,0.6;waypoint_name;;]", yextra + 1.5))
fs("image_button", 4.4, yextra + 1.55, 0.5, 0.5, "", "waypoint_add", "")
fs(fmt("tooltip[waypoint_add;%s]", ES"Add waypoint"))
get_waypoint_fs(fs, data, name, yextra, ctn_len)
end
end
@ -2206,7 +2285,7 @@ local function init_data(player, info)
export_counts = {},
current_tab = 1,
subcat = 1,
waypoint_id = 1,
scrbar_inv = 0,
lang_code = get_lang_code(info),
}
@ -2350,7 +2429,7 @@ local function get_inventory_fs(player, data, fs)
local max_val = 15
if __3darmor and data.subcat == 2 then
if (data.scrbar_inv or 0) >= max_val then
if data.scrbar_inv >= max_val then
data.scrbar_inv = data.scrbar_inv + 10
end
@ -2371,7 +2450,12 @@ local function get_inventory_fs(player, data, fs)
max_val = max_val + (award_list_nb * 13)
elseif data.subcat == 5 then
max_val = max_val + 3
local wp_nb = #data.waypoints
if wp_nb > 0 then
local mul = (wp_nb > 8 and 7) or (wp_nb > 4 and 6) or 5
max_val = max_val + 11 + (wp_nb * mul)
end
end
fs(fmt([[
@ -2379,7 +2463,7 @@ local function get_inventory_fs(player, data, fs)
scrollbar[%f,0.2;0.2,%f;vertical;scrbar_inv;%u]
scrollbaroptions[arrows=default;thumbsize=0;max=1000]
]],
(max_val * 4) / 15, max_val, 9.8, ctn_hgt, data.scrbar_inv or 0))
(max_val * 4) / 15, max_val, 9.8, ctn_hgt, data.scrbar_inv))
fs(fmt("scroll_container[3.9,0.2;%f,%f;scrbar_inv;vertical]", ctn_len, ctn_hgt))
@ -2469,14 +2553,52 @@ i3.new_tab {
skins.set_player_skin(player, _skins[data.skin_id])
end
if fields.waypoints then
data.waypoint_id = tonumber(fields.waypoints)
end
for field in pairs(fields) do
if sub(field, 1, 4) == "btn_" then
data.subcat = indexof(SUBCAT, sub(field, 5))
break
elseif find(field, "waypoint_%d+") then
local id, action = match(field, "_(%d+)_(%w+)$")
id = tonum(id)
local waypoint, _id = get_waypoint(data, id)
if action == "delete" then
player:hud_remove(waypoint.id)
remove(data.waypoints, _id)
elseif action == "teleport" then
local pos = waypoint.pos
pos.y = pos.y + 0.5
player:set_pos(pos)
msg(name, fmt("Teleported to %s", clr("#ff0", waypoint.name)))
elseif action == "refresh" then
local color = random(0xffffff)
waypoint.color = color
player:hud_change(id, "number", color)
elseif action == "hide" then
if waypoint.hide then
local new_id = player:hud_add {
hud_elem_type = "waypoint",
name = waypoint.name,
text = " m",
world_pos = waypoint.pos,
number = waypoint.color,
z_index = -300,
}
waypoint.id = new_id
waypoint.hide = nil
else
player:hud_remove(waypoint.id)
waypoint.hide = true
end
end
break
end
end
@ -2496,13 +2618,10 @@ i3.new_tab {
return
elseif fields.waypoint_add then
data.waypoints = data.waypoints or {}
local waypoint = fields.waypoint_name
local last = #data.waypoints + 1
data.waypoint_id = last
if fields.waypoint_name == "" then
waypoint = fmt("Waypoint %u", last)
waypoint = "Waypoint"
end
local color = random(0xffffff)
@ -2518,20 +2637,7 @@ i3.new_tab {
}
insert(data.waypoints, {name = waypoint, pos = pos, color = color, id = id})
elseif fields.waypoint_delete then
local waypoint = data.waypoints[data.waypoint_id]
player:hud_remove(waypoint.id)
remove(data.waypoints, data.waypoint_id)
data.waypoint_id = data.waypoint_id + (data.waypoint_id == 1 and 0 or -1)
elseif fields.waypoint_teleport then
local waypoint = data.waypoints[data.waypoint_id]
local pos = waypoint.pos
pos.y = pos.y + 0.5
player:set_pos(pos)
msg(name, fmt("Teleported to %s", clr("#ff0", waypoint.name)))
data.scrbar_inv = data.scrbar_inv + 1000
end
return set_fs(player)
@ -2600,6 +2706,12 @@ local trash = create_inventory("i3_trash", {
trash:set_size("main", 1)
local output_rcp = create_inventory("i3_output_rcp", {})
output_rcp:set_size("main", 1)
local output_usg = create_inventory("i3_output_usg", {})
output_usg:set_size("main", 1)
core.register_on_player_inventory_action(function(player, _, _, info)
local name = player:get_player_name()
@ -2879,18 +2991,21 @@ end
local function init_waypoints(player)
local name = player:get_player_name()
local data = pdata[name]
data.waypoints = data.waypoints or {}
for _, v in ipairs(data.waypoints or {}) do
local id = player:hud_add {
hud_elem_type = "waypoint",
name = v.name,
text = " m",
world_pos = v.pos,
number = v.color,
z_index = -300,
}
for _, v in ipairs(data.waypoints) do
if not v.hide then
local id = player:hud_add {
hud_elem_type = "waypoint",
name = v.name,
text = " m",
world_pos = v.pos,
number = v.color,
z_index = -300,
}
v.id = id
v.id = id
end
end
end

View File

@ -1,14 +1,22 @@
local mt = ItemStack("default:wood")
mt:get_meta():set_string("description", "test wood")
mt:get_meta():set_string("color", "green")
local mt2 = ItemStack("dye:red")
mt2:get_meta():set_string("description", "test red")
mt2:get_meta():set_string("color", "#ff0")
minetest.register_craft({
output = minetest.itemstring_with_palette("default:wood", 3),
output = mt:to_string(),
type = "shapeless",
recipe = {
"default:wood",
"dye:red",
mt2:to_string(),
},
})
i3.register_craft({
result = "default:ladder_wood",
result = "default:ladder_wood 2",
items = {"default:copper_ingot 7, default:tin_ingot, default:steel_ingot 2"},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi")
mobs = {
mod = "redo",
version = "20210407",
version = "20210411",
intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}
}
@ -1070,7 +1070,11 @@ function mob_class:do_env_damage()
end
-- particle appears at random mob height
pos.y = pos.y + random(self.collisionbox[2], self.collisionbox[5])
local py = {
x = pos.x,
y = pos.y + random(self.collisionbox[2], self.collisionbox[5]),
z = pos.z
}
local nodef = minetest.registered_nodes[self.standing_in]
@ -1080,7 +1084,7 @@ function mob_class:do_env_damage()
self.health = self.health - self.water_damage
effect(pos, 5, "bubble.png", nil, nil, 1, nil)
effect(py, 5, "bubble.png", nil, nil, 1, nil)
if self:check_for_death({type = "environment",
pos = pos, node = self.standing_in}) then
@ -1093,7 +1097,7 @@ function mob_class:do_env_damage()
self.health = self.health - self.lava_damage
effect(pos, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true)
effect(py, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true)
if self:check_for_death({type = "environment", pos = pos,
node = self.standing_in, hot = true}) then
@ -1106,7 +1110,7 @@ function mob_class:do_env_damage()
self.health = self.health - self.fire_damage
effect(pos, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true)
effect(py, 15, "fire_basic_flame.png", 1, 5, 1, 0.2, 15, true)
if self:check_for_death({type = "environment", pos = pos,
node = self.standing_in, hot = true}) then
@ -1115,11 +1119,11 @@ function mob_class:do_env_damage()
-- damage_per_second node check (not fire and lava)
elseif nodef.damage_per_second ~= 0
and nodef.groups.lava == 0 and nodef.groups.fire == 0 then
and nodef.groups.lava == nil and nodef.groups.fire == nil then
self.health = self.health - nodef.damage_per_second
effect(pos, 5, "tnt_smoke.png")
effect(py, 5, "tnt_smoke.png")
if self:check_for_death({type = "environment",
pos = pos, node = self.standing_in}) then
@ -1132,7 +1136,7 @@ function mob_class:do_env_damage()
self.health = self.health - self.air_damage
effect(pos, 3, "bubble.png", 1, 1, 1, 0.2)
effect(py, 3, "bubble.png", 1, 1, 1, 0.2)
if self:check_for_death({type = "environment",
pos = pos, node = self.standing_in}) then
@ -1150,7 +1154,7 @@ function mob_class:do_env_damage()
self.health = self.health - self.light_damage
effect(pos, 5, "tnt_smoke.png")
effect(py, 5, "tnt_smoke.png")
if self:check_for_death({type = "light"}) then
return true
@ -4614,7 +4618,8 @@ function mobs:protect(self, clicker)
return true
end
if self.protected then
if (self.protected and tool_name == "mobs:protector")
or (self.protected == 2 and tool_name == "mobs:protector2") then
minetest.chat_send_player(name, S("Already protected!"))
return true
end

View File

@ -10,9 +10,9 @@ minetest.register_craftitem("mobs:nametag", {
if minetest.get_modpath("dye") and minetest.get_modpath("farming") then
minetest.register_craft({
type = "shapeless",
-- type = "shapeless",
output = "mobs:nametag",
recipe = {"default:paper", "dye:black", "farming:string"}
recipe = {{"default:paper", "dye:black", "farming:string"}}
})
end
@ -362,10 +362,10 @@ minetest.register_node("mobs:meatblock", {
minetest.register_craft({
output = "mobs:meatblock",
type = "shapeless",
-- type = "shapeless",
recipe = {
"group:food_meat", "group:food_meat", "group:food_meat",
"group:food_meat", "group:food_meat", "group:food_meat",
"group:food_meat", "group:food_meat", "group:food_meat"
{"group:food_meat", "group:food_meat", "group:food_meat"},
{"group:food_meat", "group:food_meat", "group:food_meat"},
{"group:food_meat", "group:food_meat", "group:food_meat"}
}
})

View File

@ -174,9 +174,16 @@ petz.create_form = function(player_name, buy)
form_size.h = form_size.h + 2
buttonexit_pos.x = buttonexit_pos.x + 1
buttonexit_pos.y = buttonexit_pos.y - 2
local item_description = petz.settings.selling_exchange_items_list[pet.exchange_item_index].description or ""
local item_description
local item_inventory_image
if petz.settings.selling_exchange_items_list[pet.exchange_item_index] then
item_description = petz.settings.selling_exchange_items_list[pet.exchange_item_index].description or ""
item_inventory_image = petz.settings.selling_exchange_items_list[pet.exchange_item_index].inventory_image or ""
else
item_description = ""
item_inventory_image = ""
end
local item_amount = pet.exchange_item_amount or 1
local item_inventory_image = petz.settings.selling_exchange_items_list[pet.exchange_item_index].inventory_image or ""
tab_form = tab_form ..
"label[0.375,1.85;"..S("Cost")..": ]"..
"label[2,1.85;"..item_description.."]"..

View File

@ -51,7 +51,7 @@ function petz.bh_lay_antegg(self, pos)
--Lay in front (air node) and above a Ant Bed Node
local node_name_front, egg_pos = petz.node_name_in(self, "front")
local node_name_front_below = petz.node_name_in(self, "front_below")
if node_name_front == "air" and node_name_front_below == "petz:antbed" then
if egg_pos and node_name_front == "air" and node_name_front_below == "petz:antbed" then
minetest.place_node(egg_pos, {name="petz:antegg"})
petz.increase_egg_count(self)
return true

View File

@ -26,6 +26,8 @@ Lincense for original Code (mobs redo + mobs_animal): (MIT) Copyright (c) 2014 K
Modified Code by Liil/Wilhelmine/Liil (c) 2021
Textures, Models and Animation by Liil/Wilhelmine/Liil under (MIT) License (c) 2021
Sounds are from freesound.org under Creative Commons License. Thanks to Lauramel, Gleith, Theveomammoth11, Vataa, D-Jones, Pol, Robinhood76,
sesmo42, Missburusdeer2011, Hazure, Inspectorj, Benboncan, Spookymodem, Drobiumdesign, J-zazvurek, Benboncan, Felix-blume, Sihil, Kabit, Roubignolle, Egomassive, Florianreichelt, Fxasc, Extrafon, Cognito-perceptu, Jjbubo, Blessedcup, Jaegrover, Yks and Pillonoise for the sounds!
Beluga and Leopard Seal sound by Liil/Wilhelmine/Liil.
Other sounds are from freesound.org under Creative Commons License. Thanks to Lauramel, Gleith, Theveomammoth11, Vataa, D-Jones, Pol, Robinhood76,
sesmo42, Missburusdeer2011, Hazure, Inspectorj, Benboncan, Spookymodem, Drobiumdesign, J-zazvurek, Benboncan, Felix-blume, Sihil, Kabit, Roubignolle,
Egomassive, Florianreichelt, Fxasc, Extrafon, Cognito-perceptu, Jjbubo, Blessedcup, Jaegrover, Yks, Pillonoise, Traade, Tilano408, j0ck0, Mings, Befig and Stackpool for the sounds!
Thanks to Nagaty Studio for the Hyena Sounds! Source: https://www.youtube.com/c/NagatyStudio/about

View File

@ -24,7 +24,7 @@ mobs:register_mob("animalworld:anteater", {
walk_velocity = 0.7,
run_velocity = 2,
runaway = false,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion",},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle"},
jump = false,
jump_height = 3,
pushable = true,

View File

@ -23,7 +23,7 @@ stepheight = 3,
walk_velocity = 5,
run_velocity = 6,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
fall_speed = 0,
jump = true,
jump_height = 6,

View File

@ -46,7 +46,7 @@ stepheight = 1,
},
follow = {
"ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
"ethereal:fish_raw", "animalworld:whalemeat_raw", "animalworld:rawfish", "mobs_fish:tropical",
"mobs:meat_raw", "animalworld:rabbit_raw", "xocean:fish_edible", "farming:melon_slice", "farming:melon_slice", "water_life:meat_raw", "water_life:meat_raw", "fishing:fish_raw", "animalworld:chicken_raw"
},
view_range = 8,

View File

@ -0,0 +1,127 @@
mobs:register_mob("animalworld:beluga", {
stepheight = 1,
type = "animal",
passive = true,
attack_type = "dogfight",
group_attack = true,
owner_loyal = true,
attack_npcs = false,
reach = 2,
damage = 1,
hp_min = 250,
hp_max = 455,
armor = 100,
collisionbox = {-0.8, -0.01, -0.8, 0.8, 1.2, 0.8},
visual = "mesh",
mesh = "Beluga.b3d",
textures = {
{"texturebeluga.png"},
},
makes_footstep_sound = true,
sounds = {
random = "animalworld_beluga",
attack = "animalworld_beluga2",
damage = "animalworld_beluga3",
death = "animalworld_beluga4",
},
walk_velocity = 2,
run_velocity = 5,
fly = true,
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing",
fall_speed = 0,
jump = true,
jump_height = 0,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle"},
pushable = true,
follow = {
"mobs:meat_raw", "animalworld:rawfish", "xocean:fish_edible", "ethereal:fish_raw", "mobs:clownfish_raw", "mobs:bluefish_raw", "fishing:bait_worm", "fishing:clownfish_raw", "fishing:bluewhite_raw", "fishing:exoticfish_raw", "fishing:fish_raw", "fishing:carp_raw", "fishing:perch_raw", "water_life:meat_raw", "fishing:shark_raw", "fishing:pike_raw", "animalworld:rawmollusk", "nativevillages:catfish_raw"
},
view_range = 15,
drops = {
{name = "animalworld:whaleblubber", chance = 1, min = 3, max = 10},
{name = "animalworld:whalemeat_raw", chance = 1, min = 3, max = 10},
},
water_damage = 0,
air_damage = 1,
lava_damage = 5,
light_damage = 0,
fear_height = 0,
animation = {
speed_normal = 50,
stand_start = 0,
stand_end = 100,
fly_start = 150,
fly_end = 250,
fly2_start = 250,
fly2_end = 350,
die_start = 1, -- we dont have a specific death animation so we will
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
die_speed = 1, -- have mob rotate when dying.
die_loop = false,
die_rotate = true,
},
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,
})
if not mobs.custom_spawn_animalworld then
mobs:spawn({
name = "animalworld:beluga",
nodes = {"default:water_source"},
neighbors = {"default:ice", "default:snowblock"},
min_light = 0,
interval = 30,
chance = 2, -- 15000
active_object_count = 3,
min_height = -15,
max_height = 1,
})
end
mobs:register_egg("animalworld:beluga", ("Beluga Whale"), "abeluga.png")
mobs:alias_mob("animalworld:beluga", "animalworld:beluga") -- compatibility
-- raw whale
minetest.register_craftitem(":animalworld:whalemeat_raw", {
description = ("Raw Whale Meat"),
inventory_image = "animalworld_whalemeat_raw.png",
on_use = minetest.item_eat(4),
groups = {food_meat_raw = 1, flammable = 2},
})
-- cooked whale
minetest.register_craftitem(":animalworld:whalemeat_cooked", {
description = ("Cooked Whale Meat"),
inventory_image = "animalworld_whalemeat_cooked.png",
on_use = minetest.item_eat(8),
groups = {food_meat = 1, flammable = 2},
})
minetest.register_craft({
type = "cooking",
output = "animalworld:whalemeat_cooked",
recipe = "animalworld:whalemeat_raw",
cooktime = 2,
})
minetest.register_craft({
type = "fuel",
recipe = "animalworld:whaleblubber",
burntime = 10,
})
minetest.register_craftitem("animalworld:whaleblubber", {
description = ("Whale Blubber"),
inventory_image = "animalworld_whaleblubber.png",
})

View File

@ -23,7 +23,7 @@ stepheight = 3,
walk_velocity = 2,
run_velocity = 4,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = true,
jump_height = 6,
stepheight = 3,

View File

@ -25,7 +25,7 @@ mobs:register_mob("animalworld:camel", {
walk_velocity = 2,
run_velocity = 5,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle"},
jump = false,
jump_height = 3,
pushable = true,

View File

@ -24,7 +24,7 @@ stepheight = 0.0,
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing",
fall_speed = 0,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
stepheight = 0.0,
drops = {

View File

@ -25,7 +25,7 @@ stepheight = 1,
walk_velocity = 0.7,
run_velocity = 1,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
jump_height = 6,
drops = {

View File

@ -4,4 +4,4 @@ ethereal?
xocean?
farming?
fishing?
hunger_ng?
hunger_ng?

View File

@ -0,0 +1,89 @@
mobs:register_mob("animalworld:fox", {
stepheight = 1,
type = "animal",
passive = false,
attack_type = "dogfight",
group_attack = true,
owner_loyal = true,
attack_npcs = false,
reach = 2,
damage = 3,
hp_min = 10,
hp_max = 25,
armor = 100,
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
visual = "mesh",
mesh = "Fox.b3d",
textures = {
{"texturefox.png"},
{"texturefox2.png"},
{"texturefox3.png"},
},
makes_footstep_sound = true,
sounds = {
random = "animalworld_fox3",
attack = "animalworld_fox",
damage = "animalworld_fox2",
},
walk_velocity = 2,
run_velocity = 3,
jump = true,
jump_height = 6,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
pushable = true,
follow = {"default:apple", "farming:potato", "ethereal:banana_bread", "farming:melon_slice", "farming:carrot", "farming:seed_rice", "farming:corn", "ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
"mobs:meat_raw", "animalworld:rabbit_raw", "xocean:fish_edible", "fishing:fish_raw", "water_life:meat_raw", "fishing:carp_raw", "animalworld:chicken_raw"},
view_range = 12,
drops = {
{name = "mobs:leather", chance = 7, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fear_height = 2,
animation = {
speed_normal = 120,
stand_speed = 50,
stand_start = 0,
stand_end = 100,
stand2_start = 100,
stand2_end = 200,
walk_start = 200,
walk_end = 300,
punch_start = 300,
punch_end = 400,
die_start = 1, -- we dont have a specific death animation so we will
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
die_speed = 1, -- have mob rotate when dying.
die_loop = false,
die_rotate = true,
},
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,
})
if not mobs.custom_spawn_animalworld then
mobs:spawn({
name = "animalworld:fox",
nodes = {"default:permafrost", "default:permafrost_with_moss", "default:permafrost_with_stones"},
neighbors = {"animalworld:animalworld_tundrashrub1"},
min_light = 0,
interval = 60,
chance = 2, -- 15000
active_object_count = 2,
min_height = 1,
max_height = 80,
})
end
mobs:register_egg("animalworld:fox", ("Fox"), "afox.png")
mobs:alias_mob("animalworld:fox", "animalworld:fox") -- compatibility

View File

@ -22,7 +22,7 @@ sounds = {
walk_velocity = 2,
run_velocity = 3,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = true,
jump_height = 6,
drops = {

View File

@ -25,7 +25,7 @@ mobs:register_mob("animalworld:gnu", {
walk_velocity = 1,
run_velocity = 4,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
jump_height = 3,
pushable = true,

View File

@ -24,7 +24,7 @@ stepheight = 0.0,
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing",
fall_speed = 0,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
stepheight = 0.0,
drops = {

View File

@ -22,7 +22,7 @@ mobs:register_mob("animalworld:goldenmole", {
},
walk_velocity = 1,
run_velocity = 3,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle"},
jump = false,
jump_height = 6,
pushable = true,

View File

@ -20,7 +20,7 @@ stepheight = 1,
walk_velocity = 3,
run_velocity = 6,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = true,
jump_height = 6,
drops = {

View File

@ -71,4 +71,10 @@ hunger_ng.add_hunger_data('animalworld:egg', {
hunger_ng.add_hunger_data('animalworld:bugice', {
satiates = 1.0,
})
hunger_ng.add_hunger_data('animalworld:whalemeat_raw', {
satiates = 5.0,
})
hunger_ng.add_hunger_data('animalworld:whalemeat_cooked', {
satiates = 15.0,
})
end

View File

@ -72,6 +72,15 @@ dofile(path .. "treelobster.lua") --
dofile(path .. "notoptera.lua") --
dofile(path .. "seahorse.lua") --
dofile(path .. "trophies.lua") --
dofile(path .. "tundravegetation.lua") --
dofile(path .. "polarbear.lua") --
dofile(path .. "muskox.lua") --
dofile(path .. "fox.lua") --
dofile(path .. "beluga.lua") --
dofile(path .. "leopardseal.lua") --
dofile(path .. "stellerseagle.lua") --
dofile(path .. "otter.lua") --
dofile(path .. "monkey.lua") --
dofile(path .. "hunger.lua") --

View File

@ -22,7 +22,7 @@ mobs:register_mob("animalworld:kangaroo", {
walk_velocity = 5,
run_velocity = 5,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = true,
jump_height = 8,
pushable = true,

View File

@ -0,0 +1,83 @@
mobs:register_mob("animalworld:leopardseal", {
stepheight = 0.6,
type = "monster",
passive = false,
attack_type = "dogfight",
attack_animals = true,
reach = 2,
damage = 5,
hp_min = 20,
hp_max = 55,
armor = 100,
collisionbox = {-0.4, -0.01, -0.4, 0.8, 0.6, 0.4},
visual = "mesh",
mesh = "Leopardseal.b3d",
visual_size = {x = 1.0, y = 1.0},
textures = {
{"textureleopardseal.png"},
},
sounds = {
random = "animalworld_leopardseal",
attack = "animalworld_leopardseal2",
},
makes_footstep_sound = true,
walk_velocity = 1,
run_velocity = 3,
runaway = false,
jump = false,
stepheight = 1.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
},
water_damage = 0,
lava_damage = 4,
light_damage = 0,
fear_height = 2,
animation = {
speed_normal = 100,
stand_speed = 50,
stand_start = 0,
stand_end = 100,
walk_start = 100,
walk_end = 200,
punch_start = 200,
punch_end = 300,
fly_speed = 50,
fly_start = 350, -- swim animation
fly_end = 450,
-- 50-70 is slide/water idle
},
fly_in = {"default:water_source", "default:water_flowing", "default:river_water_flowing", "default:river_water"},
floats = 0,
follow = {
"ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
"mobs_fish:clownfish_set", "mobs_fish:tropical_set", "xocean:fish_edible", "mobs:bluefish_raw", "animalworld:rawmollusk", "nativevillages:catfish_raw"
},
view_range = 10,
on_rightclick = function(self, clicker)
-- feed or tame
if mobs:feed_tame(self, clicker, 4, false, true) then return end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
end,
})
if not mobs.custom_spawn_animalworld then
mobs:spawn({
name = "animalworld:leopardseal",
nodes = {"default:ice", "default:snowblock"},
neighbors = {"default:water_source"},
min_light = 0,
interval = 60,
chance = 2, -- 15000
active_object_count = 1,
min_height = -10,
max_height = 10,
day_toggle = true,
})
end
mobs:register_egg("animalworld:leopardseal", ("Leopard Seal"), "aleopardseal.png")

View File

@ -23,7 +23,7 @@ mobs:register_mob("animalworld:lobster", {
walk_velocity = 0.5,
run_velocity = 1,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
jump_height = 3,
pushable = true,

View File

@ -25,7 +25,7 @@ stepheight = 3,
walk_chance = 15,
run_velocity = 4,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = true,
jump_height = 6,
stepheight = 3,

View File

@ -24,7 +24,7 @@ stepheight = 0.0,
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing",
fall_speed = 0,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
stepheight = 0.0,
drops = {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,123 @@
mobs:register_mob("animalworld:monkey", {
stepheight = 3,
type = "animal",
passive = false,
attack_type = "dogshoot",
dogshoot_switch = 1,
dogshoot_count_max = 3, -- shoot for 10 seconds
dogshoot_count2_max = 5, -- dogfight for 3 seconds
shoot_interval = 1,
arrow = "animalworld:pooball",
shoot_offset = 0.8,
group_attack = true,
owner_loyal = true,
attack_npcs = true,
reach = 2,
damage = 4,
hp_min = 15,
hp_max = 35,
armor = 100,
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
visual = "mesh",
mesh = "Monkey.b3d",
textures = {
{"texturemonkey.png"},
{"texturemonkey2.png"},
{"texturemonkey3.png"},
{"texturemonkey4.png"},
{"texturemonkey5.png"},
},
makes_footstep_sound = true,
sounds = {
random = "animalworld_monkey",
attack = "animalworld_monkey2",
damage = "animalworld_monkey3",
},
walk_velocity = 2,
run_velocity = 3,
walk_chance = 20,
jump = true,
jump_height = 8,
pushable = true,
follow = {"default:apple", "farming:potato", "ethereal:banana_bread", "farming:carrot", "farming:seed_rice", "farming:corn", "farming:wheat", "farming:beans", "farming:barley", "farming:oat", "farming:rye", "mobs:cheese", "farming:bread", "ethereal:banana_bread", "ethereal:banana", "farming:cabbage", "farming:lettuce", "farming:melon_slice", "animalworld:termitequeen", "animalworld:locust_roasted"},
view_range = 15,
replace_rate = 10,
replace_what = {"farming:soil", "farming:soil_wet"},
replace_with = "default:dirt",
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fear_height = 4,
animation = {
speed_normal = 100,
stand_speed = 75,
stand_start = 350,
stand_end = 450,
walk_start = 0,
walk_end = 100,
punch_start = 100,
punch_end = 200,
shoot_start = 200,
shoot_end = 300,
die_start = 1, -- we dont have a specific death animation so we will
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
die_speed = 1, -- have mob rotate when dying.
die_loop = false,
die_rotate = true,
},
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,
})
if not mobs.custom_spawn_animalworld then
mobs:spawn({
name = "animalworld:monkey",
nodes = {"default:dry_dirt_with_dry_grass", "default:dirt_with_rainforest_litter", "default:jungleleaves"},
min_light = 0,
interval = 60,
chance = 8000, -- 15000
active_object_count = 6,
min_height = 30,
max_height = 75,
day_toggle = true,
})
end
mobs:register_egg("animalworld:monkey", ("Monkey"), "amonkey.png")
mobs:register_arrow("animalworld:pooball", {
visual = "sprite",
visual_size = {x=.5, y=.5},
textures = {"animalworld_pooball.png"},
velocity = 12,
drop = true,
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=13},
}, nil)
end,
hit_mob = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups = {fleshy=13},
}, nil)
end,
hit_node = function(self, pos, node)
end,
})

View File

@ -25,7 +25,7 @@ mobs:register_mob("animalworld:moose", {
walk_velocity = 1,
run_velocity = 3,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle"},
jump = false,
jump_height = 3,
pushable = true,

View File

@ -0,0 +1,90 @@
mobs:register_mob("animalworld:muskox", {
stepheight = 1,
type = "animal",
passive = false,
attack_type = "dogfight",
group_attack = true,
owner_loyal = true,
attack_npcs = true,
reach = 2,
damage = 8,
hp_min = 25,
hp_max = 75,
armor = 100,
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
visual = "mesh",
mesh = "Muskox.b3d",
textures = {
{"texturemuskox.png"},
},
makes_footstep_sound = true,
sounds = {
random = "animalworld_muskox",
attack = "animalworld_muskox2",
},
walk_velocity = 1,
run_velocity = 3,
jump = true,
jump_height = 6,
pushable = true,
follow = {"default:apple", "farming:potato", "ethereal:banana_bread", "farming:melon_slice", "farming:carrot", "farming:seed_rice", "farming:corn", "ethereal:snowygrass", "ethereal:crystalgrass"},
view_range = 6,
replace_rate = 10,
replace_what = {"farming:soil", "farming:soil_wet"},
replace_with = "default:dirt",
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "animalworld:muskoxcorpse", chance = 7, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fear_height = 2,
animation = {
speed_normal = 50,
stand_speed = 50,
stand_start = 0,
stand_end = 100,
stand2_start = 100,
stand2_end = 200,
walk_start = 200,
walk_end = 300,
punch_speed = 100,
punch_start = 300,
punch_end = 400,
die_start = 1, -- we dont have a specific death animation so we will
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
die_speed = 1, -- have mob rotate when dying.
die_loop = false,
die_rotate = true,
},
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,
})
if not mobs.custom_spawn_animalworld then
mobs:spawn({
name = "animalworld:muskox",
nodes = {"default:permafrost", "default:permafrost_with_moss", "default:permafrost_with_stones"},
neighbors = {"animalworld:animalworld_tundrashrub1"},
min_light = 0,
interval = 60,
chance = 2, -- 15000
active_object_count = 5,
min_height = 10,
max_height = 60,
day_toggle = true,
})
end
mobs:register_egg("animalworld:muskox", ("Musk Ox"), "amuskox.png")
mobs:alias_mob("animalworld:muskox", "animalworld:muskox") -- compatibility

View File

@ -26,7 +26,7 @@ stepheight = 1,
walk_velocity = 0.7,
run_velocity = 3,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle"},
drops = {
{name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1},
{name = "animalworld:chicken_feather", chance = 1, min = 0, max = 2},

View File

@ -23,7 +23,7 @@ mobs:register_mob("animalworld:notoptera", {
run_velocity = 1,
walk_chance = 50,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = true,
jump_height = 6,
pushable = true,

View File

@ -23,7 +23,7 @@ mobs:register_mob("animalworld:nymph", {
walk_velocity = 0.6,
run_velocity = 2,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
jump_height = 3,
pushable = true,

View File

@ -25,7 +25,7 @@ stepheight = 0.0,
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing",
fall_speed = 0,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
stepheight = 0.0,
drops = {

View File

@ -0,0 +1,80 @@
mobs:register_mob("animalworld:otter", {
type = "animal",
passive = true,
reach = 1,
hp_min = 20,
hp_max = 55,
armor = 100,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
visual = "mesh",
mesh = "Otter.b3d",
visual_size = {x = 1.0, y = 1.0},
textures = {
{"textureotter.png"},
},
sounds = {
random = "animalworld_otter",
attack = "animalworld_otter2",
damage = "animalworld_otter3",
},
makes_footstep_sound = true,
walk_velocity = 1.5,
run_velocity = 2,
runaway = true,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle"},
jump = false,
stepheight = 1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
{name = "mobs:leather", chance = 7, min = 1, max = 1},
},
water_damage = 0,
lava_damage = 4,
light_damage = 0,
fear_height = 2,
animation = {
speed_normal = 100,
stand_speed = 70,
stand_start = 0,
stand_end = 100,
walk_start = 100,
walk_end = 200,
fly_start = 250, -- swim animation
fly_end = 350,
-- 50-70 is slide/water idle
},
fly_in = {"default:water_source", "default:water_flowing", "default:river_water_flowing", "default:river_water"},
floats = 0,
follow = {
"ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
"mobs_fish:clownfish_set", "mobs_fish:tropical_set", "xocean:fish_edible", "mobs:bluefish_raw", "nativevillages:catfish_raw"
},
view_range = 10,
on_rightclick = function(self, clicker)
-- feed or tame
if mobs:feed_tame(self, clicker, 4, false, true) then return end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
end,
})
if not mobs.custom_spawn_animalworld then
mobs:spawn({
name = "animalworld:otter",
nodes = {"default:water_source", "default:river_water_source"},
neighbors = {"flowers:waterlily_waving"},
min_light = 0,
interval = 60,
chance = 2, -- 15000
active_object_count = 2,
min_height = -5,
max_height = 10,
day_toggle = true,
})
end
mobs:register_egg("animalworld:otter", ("Otter"), "aotter.png")

View File

@ -0,0 +1,84 @@
mobs:register_mob("animalworld:polarbear", {
type = "monster",
passive = false,
attack_type = "dogfight",
attack_animals = true,
reach = 2,
damage = 10,
hp_min = 25,
hp_max = 80,
armor = 100,
collisionbox = {-0.6, -0.01, -0.6, 0.6, 0.95, 0.6},
visual = "mesh",
mesh = "Polarbear.b3d",
visual_size = {x = 1.0, y = 1.0},
textures = {
{"texturepolarbear.png"},
},
sounds = {
random = "animalworld_bear",
},
makes_footstep_sound = true,
walk_velocity = 1,
run_velocity = 3,
runaway = false,
jump = false,
jump_height = 6,
stepheight = 2,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
{name = "animalworld:polarbearcorpse", chance = 7, min = 1, max = 1},
},
fly_in = {"default:water_source", "default:water_flowing", "default:river_water_flowing", "default:river_water"},
water_damage = 0,
lava_damage = 4,
light_damage = 0,
fear_height = 2,
animation = {
speed_normal = 50,
stand_start = 0,
stand_end = 100,
stand_start = 100,
stand_end = 200,
walk_start = 200,
walk_end = 300,
fly_start = 400,
fly_end = 500,
punch_start = 300,
punch_end = 400,
},
follow = {
"ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
"mobs:meat_raw", "animalworld:rabbit_raw", "xocean:fish_edible", "farming:melon_slice", "farming:melon_slice", "water_life:meat_raw", "water_life:meat_raw", "fishing:fish_raw", "animalworld:chicken_raw", "nativevillages:catfish_raw", "nativevillages:chicken_raw", "animalworld:whalemeat_raw"
},
view_range = 12,
on_rightclick = function(self, clicker)
-- feed or tame
if mobs:feed_tame(self, clicker, 4, false, true) then return end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
end,
})
if not mobs.custom_spawn_animalworld then
mobs:spawn({
name = "animalworld:polarbear",
nodes = {"default:ice", "default:snowblock"},
neighbors = {"default:water_source"},
min_light = 0,
interval = 60,
chance = 2, -- 15000
active_object_count = 1,
min_height = -10,
max_height = 10,
day_toggle = true,
})
end
mobs:register_egg("animalworld:polarbear", ("Polar Bear"), "apolarbear.png")

View File

@ -22,7 +22,7 @@ stepheight = 3,
walk_velocity = 5,
run_velocity = 6,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
fall_speed = 0,
jump = true,
jump_height = 6,

View File

@ -24,7 +24,7 @@ mobs:register_mob("animalworld:reindeer", {
walk_velocity = 1,
run_velocity = 3,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
jump_height = 3,
pushable = true,

View File

@ -25,7 +25,7 @@ stepheight = 0.0,
fly_in = "default:water_source", "default:river_water_source", "default:water_flowing", "default:river_water_flowing",
fall_speed = 0,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "player"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle", "player"},
jump = false,
stepheight = 0.0,
drops = {

View File

@ -22,7 +22,7 @@ stepheight = 0.6,
run_velocity = 1,
runaway = true,
runaway = true,
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion"},
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "animalworld:divingbeetle", "animalworld:scorpion", "animalworld:polarbear", "animalworld:leopardseal", "animalworld:stellerseagle"},
jump = false,
stepheight = 1.1,
drops = {
@ -47,7 +47,7 @@ stepheight = 0.6,
floats = 0,
follow = {
"ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
"mobs_fish:clownfish_set", "mobs_fish:tropical_set", "xocean:fish_edible", "mobs:bluefish_raw"
"mobs_fish:clownfish_set", "mobs_fish:tropical_set", "xocean:fish_edible", "mobs:bluefish_raw", "nativevillages:catfish_raw"
},
view_range = 10,
@ -71,7 +71,7 @@ mobs:spawn({
min_light = 14,
interval = 60,
chance = 8000, -- 15000
active_object_count = 3,
active_object_count = 4,
min_height = 0,
max_height = 10,
day_toggle = true,

View File

@ -33,7 +33,7 @@ mobs:register_mob("animalworld:snail", {
drops = {
{name = "animalworld:snail", chance = 3, min = 1, max = 1},
},
water_damage = 0,
water_damage = 1,
lava_damage = 5,
light_damage = 0,
fear_height = 3,

View File

@ -0,0 +1,84 @@
mobs:register_mob("animalworld:stellerseagle", {
stepheight = 3,
type = "monster",
passive = false,
attack_type = "dogfight",
attack_animals = true,
owner_loyal = true,
reach = 2,
damage = 6,
hp_min = 25,
hp_max = 45,
armor = 100,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.5, 0.3},
visual = "mesh",
mesh = "Stellerseagle.b3d",
visual_size = {x = 1.0, y = 1.0},
textures = {
{"texturestellerseagle.png"},
},
sounds = {
random = "animalworld_stellerseagle",
attack = "animalworld_stellerseagle2",
},
makes_footstep_sound = false,
walk_velocity = 5,
run_velocity = 5,
fall_speed = 0,
jump = true,
jump_height = 6,
stepheight = 3,
fly = true,
drops = {
{name = "animalworld:chicken_raw", chance = 1, min = 1, max = 1},
{name = "animalworld:chicken_feather", chance = 1, min = 1, max = 1},
},
water_damage = 1,
lava_damage = 4,
light_damage = 0,
fear_height = 0,
animation = {
speed_normal = 100,
stand_start = 0,
stand_end = 100,
fly_start = 150, -- swim animation
fly_end = 250,
punch_start = 250,
punch_end = 350,
-- 50-70 is slide/water idle
},
fly_in = {"air"},
floats = 0,
follow = {
"animalworld:rabbit_raw", "mobs:meat_raw", "animalworld:chicken_raw", "water_life:meat_raw", "ethereal:fish_raw", "animalworld:rawfish", "mobs_fish:tropical",
"mobs_fish:clownfish_set", "mobs_fish:tropical_set", "xocean:fish_edible", "mobs:bluefish_raw", "animalworld:rawmollusk", "nativevillages:catfish_raw"
},
view_range = 16,
on_rightclick = function(self, clicker)
-- feed or tame
if mobs:feed_tame(self, clicker, 4, false, true) then return end
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
end,
})
if not mobs.custom_spawn_animalworld then
mobs:spawn({
name = "animalworld:stellerseagle",
nodes = {"default:permafrost", "default:permafrost_with_moss", "default:permafrost_with_stones"},
min_light = 0,
interval = 60,
chance = 2, -- 15000
active_object_count = 2,
min_height = 30,
max_height = 100,
day_toggle = true,
})
end
mobs:register_egg("animalworld:stellerseagle", ("Stellers Sea Eagle"), "astellerseagle.png")

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Some files were not shown because too many files have changed in this diff Show More