mirror of
https://github.com/MinetestForFun/fishing.git
synced 2025-07-22 10:00:26 +02:00
continue rewriting
refactor code rename files
This commit is contained in:
22
fishes.lua
22
fishes.lua
@ -3,20 +3,12 @@
|
||||
-- License (code & textures): WTFPL
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S
|
||||
if (minetest.get_modpath("intllib")) then
|
||||
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
else
|
||||
S = function ( s ) return s end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- Fish
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("fishing:fish_raw", {
|
||||
description = S("Fish"),
|
||||
description = fishing_setting.func.S("Fish"),
|
||||
groups = {},
|
||||
inventory_image = "fishing_fish.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
@ -25,7 +17,7 @@ minetest.register_craftitem("fishing:fish_raw", {
|
||||
-- Roasted Fish
|
||||
-----------------------------------------------------
|
||||
minetest.register_craftitem("fishing:fish", {
|
||||
description = S("Roasted Fish"),
|
||||
description = fishing_setting.func.S("Roasted Fish"),
|
||||
groups = {},
|
||||
inventory_image = "fishing_fish_cooked.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
@ -34,7 +26,7 @@ minetest.register_craftitem("fishing:fish_raw", {
|
||||
-- Sushi
|
||||
-----------------------------------------------------
|
||||
minetest.register_craftitem("fishing:sushi", {
|
||||
description = S("Sushi (Hoso Maki)"),
|
||||
description = fishing_setting.func.S("Sushi (Hoso Maki)"),
|
||||
groups = {},
|
||||
inventory_image = "fishing_sushi.png",
|
||||
on_use = minetest.item_eat(6),
|
||||
@ -44,7 +36,7 @@ minetest.register_craftitem("fishing:fish_raw", {
|
||||
-- Whatthef... it's a freakin' Shark!
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("fishing:shark", {
|
||||
description = S("Shark"),
|
||||
description = fishing_setting.func.S("Shark"),
|
||||
groups = {},
|
||||
inventory_image = "fishing_shark.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
@ -53,7 +45,7 @@ minetest.register_craftitem("fishing:shark", {
|
||||
-- Roasted Shark
|
||||
-----------------------------------------------------
|
||||
minetest.register_craftitem("fishing:shark_cooked", {
|
||||
description = S("Roasted Shark"),
|
||||
description = fishing_setting.func.S("Roasted Shark"),
|
||||
groups = {},
|
||||
inventory_image = "fishing_shark_cooked.png",
|
||||
on_use = minetest.item_eat(6),
|
||||
@ -63,7 +55,7 @@ minetest.register_craftitem("fishing:shark", {
|
||||
-- Pike
|
||||
-----------------------------------------------------------------------------------------------
|
||||
minetest.register_craftitem("fishing:pike", {
|
||||
description = S("Northern Pike"),
|
||||
description = fishing_setting.func.S("Northern Pike"),
|
||||
groups = {},
|
||||
inventory_image = "fishing_pike.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
@ -72,7 +64,7 @@ minetest.register_craftitem("fishing:pike", {
|
||||
-- Roasted Pike
|
||||
-----------------------------------------------------
|
||||
minetest.register_craftitem("fishing:pike_cooked", {
|
||||
description = S("Roasted Northern Pike"),
|
||||
description = fishing_setting.func.S("Roasted Northern Pike"),
|
||||
groups = {},
|
||||
inventory_image = "fishing_pike_cooked.png",
|
||||
on_use = minetest.item_eat(6),
|
||||
|
Reference in New Issue
Block a user