diff --git a/mods/lord/Entities/lord_traders/init.lua b/mods/lord/Entities/lord_traders/init.lua new file mode 100644 index 000000000..eaf6f02bd --- /dev/null +++ b/mods/lord/Entities/lord_traders/init.lua @@ -0,0 +1,9 @@ +local mod_path = minetest.get_modpath(minetest.get_current_modname()) +local old_require = require +require = function(name) return dofile(mod_path .. "/src/" .. name:gsub("%.", "/") .. ".lua") end + + +require("traders") + + +require = old_require diff --git a/mods/lord/Entities/lord_traders/locale/lottmobs.en.tr b/mods/lord/Entities/lord_traders/locale/lottmobs.en.tr new file mode 100644 index 000000000..670593f4f --- /dev/null +++ b/mods/lord/Entities/lord_traders/locale/lottmobs.en.tr @@ -0,0 +1,94 @@ +# textdomain: lord_traders + +Trader=Trader +Hello=Hello +'s stock:='s stock: +Selection=Selection +Price=Price +Payment=Payment +Brought items=Brought items + +### traders/config.lua (messages) ### +We have many treasures, and for the right price we might be willing to part with them...=We have many treasures, and for the right price we might be willing to part with them... +Don't even think of stealing our treasure... If you do, heads shall roll.=Don't even think of stealing our treasure... If you do, heads shall roll. +What are you doing here? What do you want from us?=What are you doing here? What do you want from us? +Be careful when you enter our homes, a fall from the ladder could well prove deadly.=Be careful when you enter our homes, a fall from the ladder could well prove deadly. +If you want to mine, do so. There's plenty of iron to go around!=If you want to mine, do so. There's plenty of iron to go around! +If you venture deep underground, beware! The monsters there are very powerful, and kill the unprepared instantly.=If you venture deep underground, beware! The monsters there are very powerful, and kill the unprepared instantly. +Welcome to our lovely forest home, weary traveler. Refresh yourself here.=Welcome to our lovely forest home, weary traveler. Refresh yourself here. +Sauron grows in power. Shall we be able to vanquish him again?=Sauron grows in power. Shall we be able to vanquish him again? +We are a peace loving people, but if we are angered, our wrath is terrible!=We are a peace loving people, but if we are angered, our wrath is terrible! +Rest among us and prepare yourself, for war is imminent.=Rest among us and prepare yourself, for war is imminent. +If you wish to buy goods from us, there are certain traders who wander our land.=If you wish to buy goods from us, there are certain traders who wander our land. +Beware! Our society, and all societies, are on the edge of a knife blade - one false move and all will end, and Sauron will rule supreme.=Beware! Our society, and all societies, are on the edge of a knife blade - one false move and all will end, and Sauron will rule supreme. +Ah, what a lovely land we have, so peaceful, so beautiful.=Ah, what a lovely land we have, so peaceful, so beautiful. +There's nothing quite like the smell of pipe smoke rising on a cold October morning, is there?=There's nothing quite like the smell of pipe smoke rising on a cold October morning, is there? +If you are in need of any food, there are traders who wander around and they usually have a good stock.=If you are in need of any food, there are traders who wander around and they usually have a good stock. +If you are thinking that you'll find adventures here, think again! Good day!=If you are thinking that you'll find adventures here, think again! Good day! +We hear tales of war, but they cannot be more than tales - like that of the Oliphaunt.=We hear tales of war, but they cannot be more than tales - like that of the Oliphaunt. +Food is meant to be enjoyed, not rushed. Don't just eat a little here and a little there, sit down for a proper meal sometimes...=Food is meant to be enjoyed, not rushed. Don't just eat a little here and a little there, sit down for a proper meal sometimes... +War comes swiftly... We are preparing, but are we doing enough?=War comes swiftly... We are preparing, but are we doing enough? +The noble race of man rises in the world! Even the dwarves are starting to show interest in some of our goods.=The noble race of man rises in the world! Even the dwarves are starting to show interest in some of our goods. +Are you willing to fight with us? We have much to lose, but much to gain also! We must rally together.=Are you willing to fight with us? We have much to lose, but much to gain also! We must rally together. +Don't listen to those who say that all this talk of war will come to nothing, for we are at war now.=Don't listen to those who say that all this talk of war will come to nothing, for we are at war now. +We suffer raids from orcs, and other evil things, yet we do nothing! We must act, and act with force!=We suffer raids from orcs, and other evil things, yet we do nothing! We must act, and act with force! +Life here is far from normal. We wish for peace, yet the only way we can get peace is through war...=Life here is far from normal. We wish for peace, yet the only way we can get peace is through war... +DIE!!!", "Urrrrrrrrrrrrrghhhhhhhhhhhhhhhhhhh!!=DIE!!!", "Urrrrrrrrrrrrrghhhhhhhhhhhhhhhhhhh!! +Arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr!", "KILL! KILL! KILL!=Arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr!", "KILL! KILL! KILL! + +### traders/config.lua (names) ### +#dwarf +Azaghâl=Azaghâl +Balbrin=Balbrin +Borin=Borin +Farin=Farin +Flói=Flói +Frerin=Frerin +Grór=Grór +Lóni=Lóni +Náli=Náli +Narvi=Narvi +Telchar=Telchar +Thion=Thion + +#elf +Annael=Annael +Anairë=Anairë +Curufin=Curufin +Erestor=Erestor +Gwindor=Gwindor +Irimë=Irimë +Oropher=Oropher +Maglor=Maglor +Quennar=Quennar +Rúmil=Rúmil +Orgof=Orgof +Voronwë=Voronwë + +#hobbit +Adalgrim=Adalgrim +Bodo=Bodo +Cotman=Cotman +Doderic=Doderic +Falco=Falco +Gormadoc=Gormadoc +Hobson=Hobson +Ilberic=Ilberic +Largo=Largo +Madoc=Madoc +Orgulas=Orgulas +Rorimac=Rorimac + +#human +Aratan=Aratan +Arvegil=Arvegil +Belegorn=Belegorn +Celepharn=Celepharn +Dúnhere=Dúnhere +Elatan=Elatan +Gilraen=Gilraen +Írimon=Írimon +Minardil=Minardil +Oromendil=Oromendil +Tarcil=Tarcil +Vorondil=Vorondil diff --git a/mods/lord/Entities/lord_traders/locale/lottmobs.ru.tr b/mods/lord/Entities/lord_traders/locale/lottmobs.ru.tr new file mode 100644 index 000000000..aa30396c6 --- /dev/null +++ b/mods/lord/Entities/lord_traders/locale/lottmobs.ru.tr @@ -0,0 +1,94 @@ +# textdomain: lord_traders + +Trader=Торговец +Hello=Привет +'s stock:=, товары: +Selection=Товар +Price=Цена +Payment=Оплата +Brought items=Покупка + +### traders/config.lua (messages) ### +We have many treasures, and for the right price we might be willing to part with them...=У нас много сокровищ, и за правильную цену мы могли бы с ними расстаться... +Don't even think of stealing our treasure... If you do, heads shall roll.=Даже не думайте о том, чтобы украсть наше сокровище ... Если вы это сделаете, лишитесь головы. +What are you doing here? What do you want from us?=Что вы здесь делаете? Что вы хотите от нас? +Be careful when you enter our homes, a fall from the ladder could well prove deadly.=Будьте осторожны, когда вы входите в наши дома, падение с лестницы может оказаться смертельным. +If you want to mine, do so. There's plenty of iron to go around!=Если вы хотите добывать, то добывайте. Вокруг много железа, в перед и с песней! +If you venture deep underground, beware! The monsters there are very powerful, and kill the unprepared instantly.=Если вы рискнете зарыться глубоко под землю, берегитесь! Монстры там очень сильные, и убивают неподготовленного мгновенно. +Welcome to our lovely forest home, weary traveler. Refresh yourself here.=Добро пожаловать в наш прекрасный лесной дом, утомленный путешественник. Передохните здесь. +Sauron grows in power. Shall we be able to vanquish him again?=Власть Саурона растет. Сможем ли мы снова его победить? +We are a peace loving people, but if we are angered, our wrath is terrible!=Мы не злопамятные, но злые и память у нас хорошая! +Rest among us and prepare yourself, for war is imminent.=Нам всем нужно готовиться, потому что война неизбежна. +If you wish to buy goods from us, there are certain traders who wander our land.=Хочешь что-то купить покупай, или проваливай от сюда. +Beware! Our society, and all societies, are on the edge of a knife blade - one false move and all will end, and Sauron will rule supreme.=Осторожно! Мы все ходим по лезвию ножа. Одно ложное движение - все закончится, а Саурон будет правителем всего и вся. +Ah, what a lovely land we have, so peaceful, so beautiful.=Ах, какая прекрасная земля у нас, такая мирная, такая красивая. +There's nothing quite like the smell of pipe smoke rising on a cold October morning, is there?=Нет ничего лучше запаха дымящейся трубки, в холодное октябрьское утро, не так ли? +If you are in need of any food, there are traders who wander around and they usually have a good stock.=Если вам нужна еда, найдите торговца, который бродит неподалеку, у него обычно большой выбор. +If you are thinking that you'll find adventures here, think again! Good day!=Если вы думаете, что здесь найдете приключения, подумайте еще раз! Добрый вечер! +We hear tales of war, but they cannot be more than tales - like that of the Oliphaunt.=Мы слышим рассказы о войне, и нам кажется что это сказки - как у Олифаунта. +Food is meant to be enjoyed, not rushed. Don't just eat a little here and a little there, sit down for a proper meal sometimes...=Пища должна нравиться, и внешне и на вкус. Иногда нужно не просто поесть немного здесь и немного там, а посидеть в хорошей компании. +War comes swiftly... We are preparing, but are we doing enough?=Война надвигается быстро ... Мы готовимся, но ко всему ли? +The noble race of man rises in the world! Even the dwarves are starting to show interest in some of our goods.=Благородная раса людей вновь расцветает! Даже гномы начинают проявлять интерес к некоторым нашим товарам. +Are you willing to fight with us? We have much to lose, but much to gain also! We must rally together.=Готовы ли вы сразиться вместе с нами? Нам многое предстоит потерять, но еще больше мы должны выиграть! Нам нужно сплотиться вместе. +Don't listen to those who say that all this talk of war will come to nothing, for we are at war now.=Не слушайте тех, кто говорит, что все эти разговоры о войне ни к чему не приведут, они просто тролли. +We suffer raids from orcs, and other evil things, yet we do nothing! We must act, and act with force!=Мы терпим набеги орков и других тварей, и ничего не делаем! Мы должны действовать и действовать немедленно! +Life here is far from normal. We wish for peace, yet the only way we can get peace is through war...=Жизнь здесь далека от идеала. Мы желаем мира, но единственный способ получить мир - это война... +DIE!!!, Urrrrrrrrrrrrrghhhhhhhhhhhhhhhhhhh!!=УМРИ!!! Убббббллллллюююююдддддооокккккк!! +Arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr!, KILL! KILL! KILL!=Хрррррррррррррррррррр!, СМЕРТЬ! СМЕРТЬ! СМЕРТЬ! + +### trader_goods.lua ### +#dwarf +Azaghâl=Azaghâl +Balbrin=Balbrin +Borin=Borin +Farin=Farin +Flói=Flói +Frerin=Frerin +Grór=Grór +Lóni=Lóni +Náli=Náli +Narvi=Narvi +Telchar=Telchar +Thion=Thion + +#elf +Annael=Annael +Anairë=Anairë +Curufin=Curufin +Erestor=Erestor +Gwindor=Gwindor +Irimë=Irimë +Oropher=Oropher +Maglor=Maglor +Quennar=Quennar +Rúmil=Rúmil +Orgof=Orgof +Voronwë=Voronwë + +#hobbit +Adalgrim=Adalgrim +Bodo=Bodo +Cotman=Cotman +Doderic=Doderic +Falco=Falco +Gormadoc=Gormadoc +Hobson=Hobson +Ilberic=Ilberic +Largo=Largo +Madoc=Madoc +Orgulas=Orgulas +Rorimac=Rorimac + +#human +Aratan=Aratan +Arvegil=Arvegil +Belegorn=Belegorn +Celepharn=Celepharn +Dúnhere=Dúnhere +Elatan=Elatan +Gilraen=Gilraen +Írimon=Írimon +Minardil=Minardil +Oromendil=Oromendil +Tarcil=Tarcil +Vorondil=Vorondil diff --git a/mods/lord/Entities/lord_traders/locale/template.txt b/mods/lord/Entities/lord_traders/locale/template.txt new file mode 100644 index 000000000..f4fcbfc84 --- /dev/null +++ b/mods/lord/Entities/lord_traders/locale/template.txt @@ -0,0 +1,94 @@ +# textdomain: lord_traders + +Trader= +Hello= +'s stock:= +Selection= +Price= +Payment= +Brought items= + +### traders/config.lua (messages) ### +We have many treasures, and for the right price we might be willing to part with them...= +Don't even think of stealing our treasure... If you do, heads shall roll.= +What are you doing here? What do you want from us?= +Be careful when you enter our homes, a fall from the ladder could well prove deadly.= +If you want to mine, do so. There's plenty of iron to go around!= +If you venture deep underground, beware! The monsters there are very powerful, and kill the unprepared instantly.= +Welcome to our lovely forest home, weary traveler. Refresh yourself here.= +Sauron grows in power. Shall we be able to vanquish him again?= +We are a peace loving people, but if we are angered, our wrath is terrible!= +Rest among us and prepare yourself, for war is imminent.= +If you wish to buy goods from us, there are certain traders who wander our land.= +Beware! Our society, and all societies, are on the edge of a knife blade - one false move and all will end, and Sauron will rule supreme.= +Ah, what a lovely land we have, so peaceful, so beautiful.= +There's nothing quite like the smell of pipe smoke rising on a cold October morning, is there?= +If you are in need of any food, there are traders who wander around and they usually have a good stock.= +If you are thinking that you'll find adventures here, think again! Good day!= +We hear tales of war, but they cannot be more than tales - like that of the Oliphaunt.= +Food is meant to be enjoyed, not rushed. Don't just eat a little here and a little there, sit down for a proper meal sometimes...= +War comes swiftly... We are preparing, but are we doing enough?= +The noble race of man rises in the world! Even the dwarves are starting to show interest in some of our goods.= +Are you willing to fight with us? We have much to lose, but much to gain also! We must rally together.= +Don't listen to those who say that all this talk of war will come to nothing, for we are at war now.= +We suffer raids from orcs, and other evil things, yet we do nothing! We must act, and act with force!= +Life here is far from normal. We wish for peace, yet the only way we can get peace is through war...= +DIE!!!, Urrrrrrrrrrrrrghhhhhhhhhhhhhhhhhhh!!= +Arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr!, KILL! KILL! KILL!= + +### trader_goods.lua ### +#dwarf +Azaghâl= +Balbrin= +Borin= +Farin= +Flói= +Frerin= +Grór= +Lóni= +Náli= +Narvi= +Telchar= +Thion= + +#elf +Annael= +Anairë= +Curufin= +Erestor= +Gwindor= +Irimë= +Oropher= +Maglor= +Quennar= +Rúmil= +Orgof= +Voronwë= + +#hobbit +Adalgrim= +Bodo= +Cotman= +Doderic= +Falco= +Gormadoc= +Hobson= +Ilberic= +Largo= +Madoc= +Orgulas= +Rorimac= + +#human +Aratan= +Arvegil= +Belegorn= +Celepharn= +Dúnhere= +Elatan= +Gilraen= +Írimon= +Minardil= +Oromendil= +Tarcil= +Vorondil= diff --git a/mods/lord/Entities/lord_traders/mod.conf b/mods/lord/Entities/lord_traders/mod.conf new file mode 100644 index 000000000..38236a493 --- /dev/null +++ b/mods/lord/Entities/lord_traders/mod.conf @@ -0,0 +1,11 @@ +name = lord_traders +description = Traders mobs for LORD. (Builtin game mod) +depends = mobs, lottmobs, lottarmor, lottother, lord_money +optional_d = default, farming, boats, tools, lottblocks, lottplants, lottores, lottthrowing, lottfarming, lottpotion, lord_books + +# mobs -- uses common engine 'mobs redo' +# lottmobs -- uses sounds & mod prefix `:lottmobs` for entities. Its for no aliases for old entities on map. +# lottarmor -- uses model (& goods) +# lottother -- follows lottother:narya (& goods) +# lord_money -- trading coins +#other mods uses for trading (items/goods) diff --git a/mods/lord/Entities/lottmobs/src/traders.lua b/mods/lord/Entities/lord_traders/src/traders.lua similarity index 84% rename from mods/lord/Entities/lottmobs/src/traders.lua rename to mods/lord/Entities/lord_traders/src/traders.lua index 813e1d153..8164bd782 100644 --- a/mods/lord/Entities/lottmobs/src/traders.lua +++ b/mods/lord/Entities/lord_traders/src/traders.lua @@ -2,10 +2,10 @@ local mod_path = minetest.get_modpath(minetest.get_current_modname()) local require = function(name) return dofile(mod_path .. "/src/" .. name:gsub("%.", "/") .. ".lua") end -local trader = require("trader") +local trader = require("traders.trader") -trader.register("lottmobs:elf_trader", { +trader.register(":lottmobs:elf_trader", { race = "elf", hp_min = 20, hp_max = 50, @@ -14,7 +14,6 @@ trader.register("lottmobs:elf_trader", { { "lottmobs_elf_trader.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png" }, }, visual_size = { x = 0.95, y = 1.15 }, - mesh = "lottarmor_character_old.b3d", view_range = 20, walk_velocity = 1.5, run_velocity = 5, @@ -28,7 +27,7 @@ trader.register("lottmobs:elf_trader", { }, }) -trader.register("lottmobs:human_trader", { +trader.register(":lottmobs:human_trader", { race = "man", hp_min = 15, hp_max = 35, @@ -36,14 +35,13 @@ trader.register("lottmobs:human_trader", { textures = { { "lottmobs_human_trader.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png" }, }, - mesh = "lottarmor_character_old.b3d", view_range = 12, run_velocity = 3, armor = 100, damage = 5, }) -trader.register("lottmobs:hobbit_trader", { +trader.register(":lottmobs:hobbit_trader", { race = "hobbit", hp_min = 5, hp_max = 15, @@ -52,7 +50,6 @@ trader.register("lottmobs:hobbit_trader", { { "lottmobs_hobbit_trader.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png" }, }, visual_size = { x = 1.1, y = 0.75 }, - mesh = "lottarmor_character_old.b3d", armor = 300, lava_damage = 5, follow = nil, @@ -62,7 +59,7 @@ trader.register("lottmobs:hobbit_trader", { sounds = nil, }) -trader.register("lottmobs:dwarf_trader", { +trader.register(":lottmobs:dwarf_trader", { race = "dwarf", hp_min = 20, hp_max = 30, @@ -71,14 +68,13 @@ trader.register("lottmobs:dwarf_trader", { { "lottmobs_dwarf_trader.png", "lottarmor_trans.png", "lottarmor_trans.png", "lottarmor_trans.png" }, }, visual_size = { x = 1.1, y = 0.85 }, - mesh = "lottarmor_character_old.b3d", view_range = 10, run_velocity = 2, armor = 200, damage = 4, }) -mobs:spawn_specific("lottmobs:elf_trader", {"lottmapgen:lorien_grass"}, {"air"}, 0, 20, 30, 90000, 2, -31000, 31000) +mobs:spawn_specific("lottmobs:elf_trader", {"lottmapgen:lorien_grass"}, {"air"}, -1, 20, 30, 90000, 2, -31000, 31000) mobs:spawn_specific("lottmobs:human_trader", {"lottmapgen:rohan_grass"}, {"air"}, -1, 20, 30, 90000, 2, -31000, 31000) mobs:spawn_specific("lottmobs:human_trader", {"lottmapgen:gondor_grass"}, {"air"}, -1, 20, 30, 90000, 2, -31000, 31000) mobs:spawn_specific("lottmobs:hobbit_trader",{"lottmapgen:shire_grass"}, {"air"}, -1, 20, 30, 90000, 2, -31000, 31000) diff --git a/mods/lord/Entities/lottmobs/src/trader_config.lua b/mods/lord/Entities/lord_traders/src/traders/config.lua similarity index 95% rename from mods/lord/Entities/lottmobs/src/trader_config.lua rename to mods/lord/Entities/lord_traders/src/traders/config.lua index 81b4509ec..7b8472728 100644 --- a/mods/lord/Entities/lottmobs/src/trader_config.lua +++ b/mods/lord/Entities/lord_traders/src/traders/config.lua @@ -1,20 +1,18 @@ ---Item table format: ---{thing selling, price (in gold ingots), chance that it won't appear in the trader's inventory} -local SL = minetest.get_translator("lottmobs") +local SL = minetest.get_translator("lord_traders") ---- @class trader.config ---- @field items table key: stack_string, value: {price: stack_string, chance: percent} +--- @class traders.config +--- @field items table key: stack_string, value: {price: stack_string, chance: percent} --- @field names string[] random names for traders --- @field messages string[] random messages for traders ---- @class trader.config.good +--- @class traders.config.good --- @field price string stack_string --- @field chance number percent ---- @type trader.config[] +--- @type traders.config[] local trader_config = {} ---- @type trader.config +--- @type traders.config trader_config.dwarf = { items = { ["lord_money:gold_coin 1"] = { price = "lord_money:silver_coin 10", chance = 5 }, @@ -50,7 +48,7 @@ trader_config.dwarf = { SL("If you venture deep underground, beware! The monsters there are very powerful, and kill the unprepared instantly."), -- luacheck: no_max_line_length } } ---- @type trader.config +--- @type traders.config trader_config.elf = { items = { ["lord_money:gold_coin 1"] = { price = "lord_money:silver_coin 10", chance = 5 }, @@ -86,7 +84,7 @@ trader_config.elf = { SL("Beware! Our society, and all societies, are on the edge of a knife blade - one false move and all will end, and Sauron will rule supreme."), -- luacheck: no_max_line_length } } ---- @type trader.config +--- @type traders.config trader_config.hobbit = { items = { ["lord_money:gold_coin 1"] = { price = "lord_money:silver_coin 10", chance = 5 }, @@ -122,7 +120,7 @@ trader_config.hobbit = { SL("Food is meant to be enjoyed, not rushed. Don't just eat a little here and a little there, sit down for a proper meal sometimes..."), -- luacheck: no_max_line_length } } ---- @type trader.config +--- @type traders.config trader_config.human = { items = { ["lord_money:gold_coin 1"] = { price = "lord_money:silver_coin 10", chance = 5 }, diff --git a/mods/lord/Entities/lottmobs/src/trader.lua b/mods/lord/Entities/lord_traders/src/traders/trader.lua similarity index 90% rename from mods/lord/Entities/lottmobs/src/trader.lua rename to mods/lord/Entities/lord_traders/src/traders/trader.lua index 60ddf6ce7..7947ce5d7 100644 --- a/mods/lord/Entities/lottmobs/src/trader.lua +++ b/mods/lord/Entities/lord_traders/src/traders/trader.lua @@ -1,11 +1,11 @@ -local SL = minetest.get_translator("lottmobs") +local SL = minetest.get_translator("lord_traders") ---- @type trader.config[] -local config = dofile(minetest.get_modpath("lottmobs").."/src/trader_config.lua") ---- @type trader.Form -local Form = dofile(minetest.get_modpath("lottmobs").."/src/trader_Form.lua") ---- @type trader.Inventory -local Inventory = dofile(minetest.get_modpath("lottmobs").."/src/trader_Inventory.lua") +--- @type traders.config[] +local config = require("traders.config") +--- @type traders.trader.Form +local Form = require("traders.trader.Form") +--- @type traders.trader.Inventory +local Inventory = require("traders.trader.Inventory") --- @param self LuaEntity @@ -24,6 +24,7 @@ end local common_trader_definition = { type = "npc", visual = "mesh", + mesh = "lottarmor_character_old.b3d", animation = { speed_normal = 15, speed_run = 15, diff --git a/mods/lord/Entities/lottmobs/src/trader_Form.lua b/mods/lord/Entities/lord_traders/src/traders/trader/Form.lua similarity index 74% rename from mods/lord/Entities/lottmobs/src/trader_Form.lua rename to mods/lord/Entities/lord_traders/src/traders/trader/Form.lua index 6d2d8c41d..b63bdb72d 100644 --- a/mods/lord/Entities/lottmobs/src/trader_Form.lua +++ b/mods/lord/Entities/lord_traders/src/traders/trader/Form.lua @@ -1,7 +1,7 @@ -local S = minetest.get_translator("lottmobs") +local S = minetest.get_translator("lord_traders") --- ---- @class trader.Form +--- @class traders.trader.Form --- local Form = { --- @const @@ -20,7 +20,7 @@ local Form = { --- @public --- @param player Player --- @param inventory_id string ---- @return trader.Form +--- @return traders.trader.Form function Form:new(player, inventory_id, trader_name) local class = self self = {} @@ -41,15 +41,15 @@ end --- @return string function Form:get_spec() return "size[8,10;]" .. - "label[0,0;"..S("Trader").." " .. S(self.trader_name) .. S("'s stock:").."]" .. + "label[0,0;" .. S("Trader") .. " " .. S(self.trader_name) .. S("'s stock:") .. "]" .. "list[detached:" .. self.inventory_id .. ";goods;.5,.5;3,5;]" .. - "label[4.5,0.5;"..S("Selection").."]" .. + "label[4.5,0.5;" .. S("Selection") .. "]" .. "list[detached:" .. self.inventory_id .. ";selection;4.5,1;5.5,2;]" .. - "label[6,0.5;"..S("Price").."]" .. + "label[6,0.5;" .. S("Price") .. "]" .. "list[detached:" .. self.inventory_id .. ";price;6,1;7,2;]" .. - "label[4.5,3.5;"..S("Payment").."]" .. + "label[4.5,3.5;" .. S("Payment") .. "]" .. "list[detached:" .. self.inventory_id .. ";payment;4.5,4;5.5,5;]" .. - "label[6,3.5;"..S("Brought items").."]" .. + "label[6,3.5;" .. S("Brought items") .. "]" .. "list[detached:" .. self.inventory_id .. ";takeaway;6,4;7.5,5.5;]" .. "list[current_player;main;0,6;8,4;]" end diff --git a/mods/lord/Entities/lottmobs/src/trader_Inventory.lua b/mods/lord/Entities/lord_traders/src/traders/trader/Inventory.lua similarity index 96% rename from mods/lord/Entities/lottmobs/src/trader_Inventory.lua rename to mods/lord/Entities/lord_traders/src/traders/trader/Inventory.lua index 36de48575..1c559339e 100644 --- a/mods/lord/Entities/lottmobs/src/trader_Inventory.lua +++ b/mods/lord/Entities/lord_traders/src/traders/trader/Inventory.lua @@ -24,7 +24,7 @@ local function update_takeaway(inv) end --- @param trader_inventory InvRef ---- @param goods_config trader.config.good[] +--- @param goods_config traders.config.good[] local function add_goods(trader_inventory, goods_config) local max_goods = trader_inventory:get_size("goods") local i = 1 @@ -49,7 +49,7 @@ local function get_discount(price, same_race) end --- @param good_stack_string string ---- @param goods_config trader.config.good[] +--- @param goods_config traders.config.good[] --- @param same_race boolean --- @return string|nil stack string (for ex.: "lord_money:silver_coin 9") local function get_price_for(good_stack_string, goods_config, same_race) @@ -156,7 +156,7 @@ end --- ---- @class trader.Inventory +--- @class traders.trader.Inventory --- local Inventory = { --- @type string @@ -165,7 +165,7 @@ local Inventory = { entity_id = nil, --- @type string detached_inv_id = nil, - --- @type trader.config.good[] + --- @type traders.config.good[] goods_config = nil, --- @type boolean same_race = false, @@ -175,9 +175,9 @@ local Inventory = { --- @public --- @param player Player --- @param entity LuaEntity ---- @param goods_config trader.config.good[] +--- @param goods_config traders.config.good[] --- @param race_privilege string ---- @return trader.Inventory +--- @return traders.trader.Inventory function Inventory:new(player, entity, goods_config, race_privilege) local class = self self = {} diff --git a/mods/lord/Entities/lottmobs/textures/lottmobs_dwarf_trader.png b/mods/lord/Entities/lord_traders/textures/lottmobs_dwarf_trader.png similarity index 100% rename from mods/lord/Entities/lottmobs/textures/lottmobs_dwarf_trader.png rename to mods/lord/Entities/lord_traders/textures/lottmobs_dwarf_trader.png diff --git a/mods/lord/Entities/lottmobs/textures/lottmobs_elf_trader.png b/mods/lord/Entities/lord_traders/textures/lottmobs_elf_trader.png similarity index 100% rename from mods/lord/Entities/lottmobs/textures/lottmobs_elf_trader.png rename to mods/lord/Entities/lord_traders/textures/lottmobs_elf_trader.png diff --git a/mods/lord/Entities/lottmobs/textures/lottmobs_hobbit_trader.png b/mods/lord/Entities/lord_traders/textures/lottmobs_hobbit_trader.png similarity index 100% rename from mods/lord/Entities/lottmobs/textures/lottmobs_hobbit_trader.png rename to mods/lord/Entities/lord_traders/textures/lottmobs_hobbit_trader.png diff --git a/mods/lord/Entities/lottmobs/textures/lottmobs_human_trader.png b/mods/lord/Entities/lord_traders/textures/lottmobs_human_trader.png similarity index 100% rename from mods/lord/Entities/lottmobs/textures/lottmobs_human_trader.png rename to mods/lord/Entities/lord_traders/textures/lottmobs_human_trader.png diff --git a/mods/lord/Entities/lottmobs/init.lua b/mods/lord/Entities/lottmobs/init.lua index 0595d3e00..919ac2971 100644 --- a/mods/lord/Entities/lottmobs/init.lua +++ b/mods/lord/Entities/lottmobs/init.lua @@ -46,7 +46,6 @@ dofile(minetest.get_modpath("lottmobs").."/dwarfs.lua") dofile(minetest.get_modpath("lottmobs").."/horse.lua") dofile(minetest.get_modpath("lottmobs").."/warg.lua") dofile(minetest.get_modpath("lottmobs").."/boar.lua") -dofile(minetest.get_modpath("lottmobs").."/src/traders.lua") dofile(minetest.get_modpath("lottmobs").."/animals.lua") dofile(minetest.get_modpath("lottmobs").."/fishes.lua") diff --git a/mods/lord/Entities/lottmobs/locale/lottmobs.en.tr b/mods/lord/Entities/lottmobs/locale/lottmobs.en.tr index 7faf3dc3e..0aabf4f48 100644 --- a/mods/lord/Entities/lottmobs/locale/lottmobs.en.tr +++ b/mods/lord/Entities/lottmobs/locale/lottmobs.en.tr @@ -43,96 +43,3 @@ Fish raw=Fish raw Fish cooked=Fish cooked Clownfish=Clownfish Tropical fish=Tropical fish - -### trader.lua ### -Trader=Trader -Hello=Hello -have a look at my wares.=have a look at my wares. -'s stock:='s stock: -Selection=Selection -Price=Price -Payment=Payment -Brought items=Brought items -We have many treasures, and for the right price we might be willing to part with them...=We have many treasures, and for the right price we might be willing to part with them... -Don't even think of stealing our treasure... If you do, heads shall roll.=Don't even think of stealing our treasure... If you do, heads shall roll. -What are you doing here? What do you want from us?=What are you doing here? What do you want from us? -Be careful when you enter our homes, a fall from the ladder could well prove deadly.=Be careful when you enter our homes, a fall from the ladder could well prove deadly. -If you want to mine, do so. There's plenty of iron to go around!=If you want to mine, do so. There's plenty of iron to go around! -If you venture deep underground, beware! The monsters there are very powerful, and kill the unprepared instantly.=If you venture deep underground, beware! The monsters there are very powerful, and kill the unprepared instantly. -Welcome to our lovely forest home, weary traveler. Refresh yourself here.=Welcome to our lovely forest home, weary traveler. Refresh yourself here. -Sauron grows in power. Shall we be able to vanquish him again?=Sauron grows in power. Shall we be able to vanquish him again? -We are a peace loving people, but if we are angered, our wrath is terrible!=We are a peace loving people, but if we are angered, our wrath is terrible! -Rest among us and prepare yourself, for war is imminent.=Rest among us and prepare yourself, for war is imminent. -If you wish to buy goods from us, there are certain traders who wander our land.=If you wish to buy goods from us, there are certain traders who wander our land. -Beware! Our society, and all societies, are on the edge of a knife blade - one false move and all will end, and Sauron will rule supreme.=Beware! Our society, and all societies, are on the edge of a knife blade - one false move and all will end, and Sauron will rule supreme. -Ah, what a lovely land we have, so peaceful, so beautiful.=Ah, what a lovely land we have, so peaceful, so beautiful. -There's nothing quite like the smell of pipe smoke rising on a cold October morning, is there?=There's nothing quite like the smell of pipe smoke rising on a cold October morning, is there? -If you are in need of any food, there are traders who wander around and they usually have a good stock.=If you are in need of any food, there are traders who wander around and they usually have a good stock. -If you are thinking that you'll find adventures here, think again! Good day!=If you are thinking that you'll find adventures here, think again! Good day! -We hear tales of war, but they cannot be more than tales - like that of the Oliphaunt.=We hear tales of war, but they cannot be more than tales - like that of the Oliphaunt. -Food is meant to be enjoyed, not rushed. Don't just eat a little here and a little there, sit down for a proper meal sometimes...=Food is meant to be enjoyed, not rushed. Don't just eat a little here and a little there, sit down for a proper meal sometimes... -War comes swiftly... We are preparing, but are we doing enough?=War comes swiftly... We are preparing, but are we doing enough? -The noble race of man rises in the world! Even the dwarves are starting to show interest in some of our goods.=The noble race of man rises in the world! Even the dwarves are starting to show interest in some of our goods. -Are you willing to fight with us? We have much to lose, but much to gain also! We must rally together.=Are you willing to fight with us? We have much to lose, but much to gain also! We must rally together. -Don't listen to those who say that all this talk of war will come to nothing, for we are at war now.=Don't listen to those who say that all this talk of war will come to nothing, for we are at war now. -We suffer raids from orcs, and other evil things, yet we do nothing! We must act, and act with force!=We suffer raids from orcs, and other evil things, yet we do nothing! We must act, and act with force! -Life here is far from normal. We wish for peace, yet the only way we can get peace is through war...=Life here is far from normal. We wish for peace, yet the only way we can get peace is through war... -DIE!!!", "Urrrrrrrrrrrrrghhhhhhhhhhhhhhhhhhh!!=DIE!!!", "Urrrrrrrrrrrrrghhhhhhhhhhhhhhhhhhh!! -Arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr!", "KILL! KILL! KILL!=Arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr!", "KILL! KILL! KILL! - -### trader_goods.lua ### -#dwarf -Azaghâl=Azaghâl -Balbrin=Balbrin -Borin=Borin -Farin=Farin -Flói=Flói -Frerin=Frerin -Grór=Grór -Lóni=Lóni -Náli=Náli -Narvi=Narvi -Telchar=Telchar -Thion=Thion - -#elf -Annael=Annael -Anairë=Anairë -Curufin=Curufin -Erestor=Erestor -Gwindor=Gwindor -Irimë=Irimë -Oropher=Oropher -Maglor=Maglor -Quennar=Quennar -Rúmil=Rúmil -Orgof=Orgof -Voronwë=Voronwë - -#hobbit -Adalgrim=Adalgrim -Bodo=Bodo -Cotman=Cotman -Doderic=Doderic -Falco=Falco -Gormadoc=Gormadoc -Hobson=Hobson -Ilberic=Ilberic -Largo=Largo -Madoc=Madoc -Orgulas=Orgulas -Rorimac=Rorimac - -#human -Aratan=Aratan -Arvegil=Arvegil -Belegorn=Belegorn -Celepharn=Celepharn -Dúnhere=Dúnhere -Elatan=Elatan -Gilraen=Gilraen -Írimon=Írimon -Minardil=Minardil -Oromendil=Oromendil -Tarcil=Tarcil -Vorondil=Vorondil diff --git a/mods/lord/Entities/lottmobs/locale/lottmobs.ru.tr b/mods/lord/Entities/lottmobs/locale/lottmobs.ru.tr index 165ad2697..948c488c5 100644 --- a/mods/lord/Entities/lottmobs/locale/lottmobs.ru.tr +++ b/mods/lord/Entities/lottmobs/locale/lottmobs.ru.tr @@ -43,96 +43,3 @@ Fish raw=Сырая рыба Fish cooked=Жареная рыба Clownfish=Рыба клоун Tropical fish=Тропическая рыба - -### trader.lua ### -Trader=Торговец -Hello=Привет -have a look at my wares.=взгляни на мои товары. -'s stock:=, товары: -Selection=Товар -Price=Цена -Payment=Оплата -Brought items=Покупка -We have many treasures, and for the right price we might be willing to part with them...=У нас много сокровищ, и за правильную цену мы могли бы с ними расстаться... -Don't even think of stealing our treasure... If you do, heads shall roll.=Даже не думайте о том, чтобы украсть наше сокровище ... Если вы это сделаете, лишитесь головы. -What are you doing here? What do you want from us?=Что вы здесь делаете? Что вы хотите от нас? -Be careful when you enter our homes, a fall from the ladder could well prove deadly.=Будьте осторожны, когда вы входите в наши дома, падение с лестницы может оказаться смертельным. -If you want to mine, do so. There's plenty of iron to go around!=Если вы хотите добывать, то добывайте. Вокруг много железа, в перед и с песней! -If you venture deep underground, beware! The monsters there are very powerful, and kill the unprepared instantly.=Если вы рискнете зарыться глубоко под землю, берегитесь! Монстры там очень сильные, и убивают неподготовленного мгновенно. -Welcome to our lovely forest home, weary traveler. Refresh yourself here.=Добро пожаловать в наш прекрасный лесной дом, утомленный путешественник. Передохните здесь. -Sauron grows in power. Shall we be able to vanquish him again?=Власть Саурона растет. Сможем ли мы снова его победить? -We are a peace loving people, but if we are angered, our wrath is terrible!=Мы не злопамятные, но злые и память у нас хорошая! -Rest among us and prepare yourself, for war is imminent.=Нам всем нужно готовиться, потому что война неизбежна. -If you wish to buy goods from us, there are certain traders who wander our land.=Хочешь что-то купить покупай, или проваливай от сюда. -Beware! Our society, and all societies, are on the edge of a knife blade - one false move and all will end, and Sauron will rule supreme.=Осторожно! Мы все ходим по лезвию ножа. Одно ложное движение - все закончится, а Саурон будет правителем всего и вся. -Ah, what a lovely land we have, so peaceful, so beautiful.=Ах, какая прекрасная земля у нас, такая мирная, такая красивая. -There's nothing quite like the smell of pipe smoke rising on a cold October morning, is there?=Нет ничего лучше запаха дымящейся трубки, в холодное октябрьское утро, не так ли? -If you are in need of any food, there are traders who wander around and they usually have a good stock.=Если вам нужна еда, найдите торговца, который бродит неподалеку, у него обычно большой выбор. -If you are thinking that you'll find adventures here, think again! Good day!=Если вы думаете, что здесь найдете приключения, подумайте еще раз! Добрый вечер! -We hear tales of war, but they cannot be more than tales - like that of the Oliphaunt.=Мы слышим рассказы о войне, и нам кажется что это сказки - как у Олифаунта. -Food is meant to be enjoyed, not rushed. Don't just eat a little here and a little there, sit down for a proper meal sometimes...=Пища должна нравиться, и внешне и на вкус. Иногда нужно не просто поесть немного здесь и немного там, а посидеть в хорошей компании. -War comes swiftly... We are preparing, but are we doing enough?=Война надвигается быстро ... Мы готовимся, но ко всему ли? -The noble race of man rises in the world! Even the dwarves are starting to show interest in some of our goods.=Благородная раса людей вновь расцветает! Даже гномы начинают проявлять интерес к некоторым нашим товарам. -Are you willing to fight with us? We have much to lose, but much to gain also! We must rally together.=Готовы ли вы сразиться вместе с нами? Нам многое предстоит потерять, но еще больше мы должны выиграть! Нам нужно сплотиться вместе. -Don't listen to those who say that all this talk of war will come to nothing, for we are at war now.=Не слушайте тех, кто говорит, что все эти разговоры о войне ни к чему не приведут, они просто тролли. -We suffer raids from orcs, and other evil things, yet we do nothing! We must act, and act with force!=Мы терпим набеги орков и других тварей, и ничего не делаем! Мы должны действовать и действовать немедленно! -Life here is far from normal. We wish for peace, yet the only way we can get peace is through war...=Жизнь здесь далека от идеала. Мы желаем мира, но единственный способ получить мир - это война... -DIE!!!, Urrrrrrrrrrrrrghhhhhhhhhhhhhhhhhhh!!=УМРИ!!! Убббббллллллюююююдддддооокккккк!! -Arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr!, KILL! KILL! KILL!=Хрррррррррррррррррррр!, СМЕРТЬ! СМЕРТЬ! СМЕРТЬ! - -### trader_goods.lua ### -#dwarf -Azaghâl=Azaghâl -Balbrin=Balbrin -Borin=Borin -Farin=Farin -Flói=Flói -Frerin=Frerin -Grór=Grór -Lóni=Lóni -Náli=Náli -Narvi=Narvi -Telchar=Telchar -Thion=Thion - -#elf -Annael=Annael -Anairë=Anairë -Curufin=Curufin -Erestor=Erestor -Gwindor=Gwindor -Irimë=Irimë -Oropher=Oropher -Maglor=Maglor -Quennar=Quennar -Rúmil=Rúmil -Orgof=Orgof -Voronwë=Voronwë - -#hobbit -Adalgrim=Adalgrim -Bodo=Bodo -Cotman=Cotman -Doderic=Doderic -Falco=Falco -Gormadoc=Gormadoc -Hobson=Hobson -Ilberic=Ilberic -Largo=Largo -Madoc=Madoc -Orgulas=Orgulas -Rorimac=Rorimac - -#human -Aratan=Aratan -Arvegil=Arvegil -Belegorn=Belegorn -Celepharn=Celepharn -Dúnhere=Dúnhere -Elatan=Elatan -Gilraen=Gilraen -Írimon=Írimon -Minardil=Minardil -Oromendil=Oromendil -Tarcil=Tarcil -Vorondil=Vorondil diff --git a/mods/lord/Entities/lottmobs/locale/template.txt b/mods/lord/Entities/lottmobs/locale/template.txt index 9fc02a52e..d288caeb5 100644 --- a/mods/lord/Entities/lottmobs/locale/template.txt +++ b/mods/lord/Entities/lottmobs/locale/template.txt @@ -43,96 +43,3 @@ Fish raw= Fish cooked= Clownfish= Tropical fish= - -### trader.lua ### -Trader= -Hello= -have a look at my wares.= -'s stock:= -Selection= -Price= -Payment= -Brought items= -We have many treasures, and for the right price we might be willing to part with them...= -Don't even think of stealing our treasure... If you do, heads shall roll.= -What are you doing here? What do you want from us?= -Be careful when you enter our homes, a fall from the ladder could well prove deadly.= -If you want to mine, do so. There's plenty of iron to go around!= -If you venture deep underground, beware! The monsters there are very powerful, and kill the unprepared instantly.= -Welcome to our lovely forest home, weary traveler. Refresh yourself here.= -Sauron grows in power. Shall we be able to vanquish him again?= -We are a peace loving people, but if we are angered, our wrath is terrible!= -Rest among us and prepare yourself, for war is imminent.= -If you wish to buy goods from us, there are certain traders who wander our land.= -Beware! Our society, and all societies, are on the edge of a knife blade - one false move and all will end, and Sauron will rule supreme.= -Ah, what a lovely land we have, so peaceful, so beautiful.= -There's nothing quite like the smell of pipe smoke rising on a cold October morning, is there?= -If you are in need of any food, there are traders who wander around and they usually have a good stock.= -If you are thinking that you'll find adventures here, think again! Good day!= -We hear tales of war, but they cannot be more than tales - like that of the Oliphaunt.= -Food is meant to be enjoyed, not rushed. Don't just eat a little here and a little there, sit down for a proper meal sometimes...= -War comes swiftly... We are preparing, but are we doing enough?= -The noble race of man rises in the world! Even the dwarves are starting to show interest in some of our goods.= -Are you willing to fight with us? We have much to lose, but much to gain also! We must rally together.= -Don't listen to those who say that all this talk of war will come to nothing, for we are at war now.= -We suffer raids from orcs, and other evil things, yet we do nothing! We must act, and act with force!= -Life here is far from normal. We wish for peace, yet the only way we can get peace is through war...= -DIE!!!, Urrrrrrrrrrrrrghhhhhhhhhhhhhhhhhhh!!= -Arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr!, KILL! KILL! KILL!= - -### trader_goods.lua ### -#dwarf -Azaghâl= -Balbrin= -Borin= -Farin= -Flói= -Frerin= -Grór= -Lóni= -Náli= -Narvi= -Telchar= -Thion= - -#elf -Annael= -Anairë= -Curufin= -Erestor= -Gwindor= -Irimë= -Oropher= -Maglor= -Quennar= -Rúmil= -Orgof= -Voronwë= - -#hobbit -Adalgrim= -Bodo= -Cotman= -Doderic= -Falco= -Gormadoc= -Hobson= -Ilberic= -Largo= -Madoc= -Orgulas= -Rorimac= - -#human -Aratan= -Arvegil= -Belegorn= -Celepharn= -Dúnhere= -Elatan= -Gilraen= -Írimon= -Minardil= -Oromendil= -Tarcil= -Vorondil= diff --git a/mods/lord/Entities/lottmobs/mod.conf b/mods/lord/Entities/lottmobs/mod.conf index 9b5c9ca1c..83864d782 100644 --- a/mods/lord/Entities/lottmobs/mod.conf +++ b/mods/lord/Entities/lottmobs/mod.conf @@ -1,3 +1,3 @@ name = lottmobs description = LOTT Game mod: lottmobs - Adds various mobs -depends = default, mobs, fire, bones, lottores, lord_money, lordlib, throwing, lottthrowing, arrows +depends = default, mobs, fire, bones, lottores, lord_money, throwing, lottthrowing, arrows