Code: Select all
-- 01 Dinkel
print("register fruit type: Dinkel");
local dinkelhudFile = Utils.getFilename("mods/AmericanMap_T22/map/scripts/dinkelHud.dds", getUserProfileAppPath());
FruitUtil.registerFruitType("dinkel", g_i18n:getText("dinkel"), true, true, false, 0, 4, 6, 8, false, 0.29, 1.2, 0.1, true, dinkelhudFile, {0.1, 0.1, 0.9, 1});
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_DINKEL, "dinkel_windrow", g_i18n:getText("straw"), 0.04, 3, false, "dataS2/missions/hud_fill_straw.png");
local origSowingMachineLoad = SowingMachine.load;
local origTrailerLoad = Trailer.load;
SowingMachine.load = function (self, xmlFile)
if origSowingMachineLoad ~= nil then
origSowingMachineLoad(self, xmlFile);
end;
for k,v in pairs(self.seeds) do
fruitTypeDesc = FruitUtil.fruitTypes["wheat"];
if v == fruitTypeDesc.index then
table.insert(self.seeds, FruitUtil.fruitTypes["dinkel"].index);
end;
end
end;
-- 02 Grünweizen
print("register fruit type: greenwheat");
local greenwheathudFile = Utils.getFilename("mods/AmericanMap_T22/map/scripts/greenwheatHud.dds", getUserProfileAppPath());
FruitUtil.registerFruitType("greenwheat", g_i18n:getText("greenwheat"), true, true, false, 0, 4, 6, 8, false, 0.29, 1.2, 0.1, true, greenwheathudFile, {0.2, 0.0, 0.1, 1});
local origSowingMachineLoad = SowingMachine.load;
local orig TrailerLoad = Trailer.load;
SowingMachine.load = function (self, xmlFile)
if origSowingMachineLoad ~= nil then
origSowingMachineLoad(self, xmlFile);
end;
for k,v in pairs(self.seeds) do
fruitTypeDesc = FruitUtil.fruitTypes["wheat"]; -- selectedSeedFruitType = "wheat" etc..
if v == fruitTypeDesc.index then
table.insert(self.seeds, FruitUtil.fruitTypes["greenwheat"].index);
end;
end
end;
-- 11 Hafer
print("register fruit type: Hafer");
local oathudFile = Utils.getFilename("mods/AmericanMap_T22/map/scripts/oatHud.dds", getUserProfileAppPath());
FruitUtil.registerFruitType("oat", g_i18n:getText("oat"), true, true, false, 0, 4, 6, 8, false, 0.29, 1.2, 0.1, true, oathudFile, {0.1, 0.9, 0.1, 1});
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_OAT, "oat_windrow", g_i18n:getText("straw"), 0.04, 3, false, "dataS2/missions/hud_fill_straw.png");
local origSowingMachineLoad = SowingMachine.load;
local orig TrailerLoad = Trailer.load;
SowingMachine.load = function (self, xmlFile)
if origSowingMachineLoad ~= nil then
origSowingMachineLoad(self, xmlFile);
end;
for k,v in pairs(self.seeds) do
fruitTypeDesc = FruitUtil.fruitTypes["wheat"];
if v == fruitTypeDesc.index then
table.insert(self.seeds, FruitUtil.fruitTypes["oat"].index);
end;
end
end;
-- 15 Roggen
print("register fruit type: Roggen");
local ryehudFile = Utils.getFilename("mods/AmericanMap_T22/map/scripts/ryeHud.dds", getUserProfileAppPath());
FruitUtil.registerFruitType("rye", g_i18n:getText("rye"), true, true, false, 0, 4, 6, 8, false, 0.29, 1.2, 0.1, true, ryehudFile, {0.1, 0.8, 0.9, 1});
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_RYE, "rye_windrow", g_i18n:getText("straw"), 0.04, 3, false, "dataS2/missions/hud_fill_straw.png");
local origSowingMachineLoad = SowingMachine.load;
local orig TrailerLoad = Trailer.load;
SowingMachine.load = function (self, xmlFile)
if origSowingMachineLoad ~= nil then
origSowingMachineLoad(self, xmlFile);
end;
for k,v in pairs(self.seeds) do
fruitTypeDesc = FruitUtil.fruitTypes["wheat"];
if v == fruitTypeDesc.index then
table.insert(self.seeds, FruitUtil.fruitTypes["rye"].index);
end;
end
end;
local origLoadStatsFromXML = loadStatsFromXML;