[lua]
print("register fruit type: Klee_clover");
local kleehudFile = Utils.getFilename("kleeHud.dds", g_currentModDirectory);
-- (string name, bool needsSeeding, bool allowsSeeding, bool useSeedingWidth, float directionSnapAngle, int minHarvestingGrowthState, int maxHarvestingGrowthState, int cutState, bool allowsPartialGrowthState, float pricePerLiter, float literPerSqm, float seedUsagePerSqm, bool partOfEconomy, string hudOverlayFilename, float4 fruitMapColor)
FruitUtil.registerFruitType("klee", g_i18n:getText("klee"), true, true, false, 0, 6, 6, 8, false, 0.6, 12, 0.002, true, kleehudFile, {1, 0, 1, 1});
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_KLEE, "klee_windrow", g_i18n:getText("klee_windrow"), 0.04, 5, true, kleehudFile);
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["grass"];
if v == fruitTypeDesc.index then
table.insert(self.seeds, FruitUtil.fruitTypes["klee"].index);
end;
end;
end;
print("register fruit type: Luzerne_alfalfa");
local luzernehudFile = Utils.getFilename("luzerneHud.dds", g_currentModDirectory);
-- (string name, bool needsSeeding, bool allowsSeeding, bool useSeedingWidth, float directionSnapAngle, int minHarvestingGrowthState, int maxHarvestingGrowthState, int cutState, bool allowsPartialGrowthState, float pricePerLiter, float literPerSqm, float seedUsagePerSqm, bool partOfEconomy, string hudOverlayFilename, float4 fruitMapColor)
FruitUtil.registerFruitType("luzerne", g_i18n:getText("luzerne"), true, true, false, 0, 4, 6, 8, false, 0.75, 13, 0.002, true, luzernehudFile, {2, 0, 1, 1});
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_LUZERNE, "luzerne_windrow", g_i18n:getText("luzerne_windrow"), 0.04, 5, true, luzernehudFile);
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["grass"];
if v == fruitTypeDesc.index then
table.insert(self.seeds, FruitUtil.fruitTypes["luzerne"].index);
end;
end;
end;
print("register fruit type: Hafer");
local oatHudFile = Utils.getFilename("oatHud.dds", g_currentModDirectory);
FruitUtil.registerFruitType("oat", g_i18n:getText("oat"), true, true, false, 0, 4, 6, 8, true, 0.25, 1.2, 0.05, true, oatHudFile, {0.5, 0.5, 0, 1});
-- Stroh Anfang
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_OAT, "barley_windrow", g_i18n:getText("straw"), 0.04, 3, false, Utils.getFilename("mods/Breitheim_NBK_ohneVerfaulen/hud_fill_straw.dds", getUserProfileAppPath()));
-- Stroh Ende
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;
[/lua]