diff --git a/Contents/mods/DefsLTS/media/lua/server/Farming/HandlerForageItems.lua b/Contents/mods/DefsLTS/media/lua/server/Farming/HandlerForageItems.lua deleted file mode 100644 index 8751e5c..0000000 --- a/Contents/mods/DefsLTS/media/lua/server/Farming/HandlerForageItems.lua +++ /dev/null @@ -1,57 +0,0 @@ -require "Farming/ScavengeDefinition"; - -local BirchBark = {}; -BirchBark.type="DLTS.LTSBirchBark"; -BirchBark.minCount=1; -BirchBark.maxCount=1; -BirchBark.skill=1; -table.insert(scavenges.forestGoods, BirchBark); - -local HoneyComb = {}; -HoneyComb.type="DLTS.LTSHoneyComb"; -HoneyComb.minCount=1; -HoneyComb.maxCount=2; -HoneyComb.skill=5; -table.insert(scavenges.berries, HoneyComb); - -local PineCone = {}; -PineCone.type="DLTS.LTSPineCone"; -PineCone.minCount=1; -PineCone.maxCount=2; -PineCone.skill=0; -table.insert(scavenges.forestGoods, PineCone); - -local WildOnion = {}; -WildOnion.type="DLTS.LTSWildOnion"; -WildOnion.minCount=1; -WildOnion.maxCount=2; -WildOnion.skill=3; -table.insert(scavenges.mushrooms, WildOnion); - -local WildNuts = {}; -WildNuts.type="DLTS.LTSWildNuts"; -WildNuts.minCount=1; -WildNuts.maxCount=3; -WildNuts.skill=4; -table.insert(scavenges.berries, WildNuts); - -local Camomille = {}; -Camomille.type="DLTS.LTSCamomille"; -Camomille.minCount=1; -Camomille.maxCount=2; -Camomille.skill=2; -table.insert(scavenges.medicinalPlants, Camomille); - -local Dandelion = {}; -Dandelion.type="DLTS.LTSDandelion"; -Dandelion.minCount=1; -Dandelion.maxCount=2; -Dandelion.skill=2; -table.insert(scavenges.medicinalPlants, Dandelion); - -local Tobacco = {}; -Tobacco.type="DLTS.LTSTobacco"; -Tobacco.minCount=1; -Tobacco.maxCount=2; -Tobacco.skill=6; -table.insert(scavenges.medicinalPlants, Tobacco); diff --git a/Contents/mods/DefsLTS/media/lua/shared/Foraging/InjectForagingItems.lua b/Contents/mods/DefsLTS/media/lua/shared/Foraging/InjectForagingItems.lua new file mode 100644 index 0000000..9458f5f --- /dev/null +++ b/Contents/mods/DefsLTS/media/lua/shared/Foraging/InjectForagingItems.lua @@ -0,0 +1,114 @@ +require "Foraging/forageSystem" +require "Foraging/forageDefinitions" + +function injectForagingData () + + local fDefBark = { + type = "DLTS.LTSBirchBark", + categories = { "Firewood" }, + minCount = 1, + maxCount = 2, + skill = 1, + xp = 10, + zones = { Forest=3, DeepForest=6, Vegitation=1, FarmLand=1, Farm=1 }, + }; + forageSystem.addItemDef(fDefBark); + + local fDefComb = { + type = "DLTS.LTSHoneyComb", + categories = { "Fruits" }, + minCount = 1, + maxCount = 3, + skill = 5, + xp = 15, + zones = { Forest=4, DeepForest=6, Vegitation=1, FarmLand=1, Farm=1 }, + months = { 5, 6, 7, 8, 9, 10, 11 }, + bonusMonths = { 7, 8, 9 }, + malusMonths = { 5, 6 }, + }; + forageSystem.addItemDef(fDefComb); + + local fDefCone = { + type = "DLTS.LTSPineCone", + categories = { "Firewood" }, + minCount = 1, + maxCount = 6, + skill = 0, + xp = 6, + zones = { Forest=6, DeepForest=8, Vegitation=1, FarmLand=1, Farm=1 }, + }; + forageSystem.addItemDef(fDefCone); + + local fDefWildOnion = { + type = "DLTS.LTSWildOnion", + categories = { "Vegetables" }, + minCount = 1, + maxCount = 2, + skill = 3, + xp = 10, + zones = { Forest=4, DeepForest=6, Vegitation=2, FarmLand=1, Farm=1 }, + months = { 3, 4, 5, 6, 7, 8, 9, 10, 11 }, + bonusMonths = { 7, 8, 9 }, + malusMonths = { 3, 4 }, + }; + forageSystem.addItemDef(fDefWildOnion); + + local fDefNuts = { + type = "DLTS.LTSWildNuts", + categories = { "Fruits" }, + minCount = 1, + maxCount = 6, + skill = 4, + xp = 15, + zones = { Forest=8, DeepForest=6, Vegitation=3, FarmLand=2, Farm=1 }, + months = { 3, 4, 5, 6, 7, 8, 9, 10, 11 }, + bonusMonths = { 7, 8, 9 }, + malusMonths = { 3, 4 }, + }; + forageSystem.addItemDef(fDefNuts); + + local fDefCamomille = { + type = "DLTS.LTSCamomille", + categories = { "MedicinalPlants" }, + minCount = 1, + maxCount = 4, + skill = 2, + xp = 10, + zones = { Forest=4, DeepForest=2, Vegitation=8, FarmLand=3, Farm=2 }, + months = { 3, 4, 5, 6, 7, 8, 9, 10, 11 }, + bonusMonths = { 7, 8, 9 }, + malusMonths = { 3, 4 }, + }; + forageSystem.addItemDef(fDefCamomille); + + local fDefDandelion = { + type = "DLTS.LTSDandelion", + categories = { "MedicinalPlants" }, + minCount = 1, + maxCount = 4, + skill = 2, + xp = 10, + zones = { Forest=4, DeepForest=2, Vegitation=8, FarmLand=3, Farm=2 }, + months = { 3, 4, 5, 6, 7, 8, 9, 10, 11 }, + bonusMonths = { 7, 8, 9 }, + malusMonths = { 3, 4 }, + }; + forageSystem.addItemDef(fDefDandelion); + + local fDefTobacco = { + type = "DLTS.LTSTobacco", + categories = { "MedicinalPlants" }, + minCount = 1, + maxCount = 2, + skill = 6, + xp = 20, + zones = { Forest=2, DeepForest=1, Vegitation=3, FarmLand=3, Farm=2 }, + months = { 3, 4, 5, 6, 7, 8, 9, 10, 11 }, + bonusMonths = { 7, 8, 9 }, + malusMonths = { 3, 4 }, + }; + forageSystem.addItemDef(fDefTobacco); + +end + +Events.onAddForageDefs.Add(injectForagingData);