Hallo Com,
wie schon in der Überschrift zu lesen ist hab ich ein problem mit dem Manure-Mod aus 11er zeiten.
Ich hab die LUA bereits so umgeschrieben und alles verbaut, das ich die Gülle beim ausbringen am Boden liegen seh.
Soweit so gut...
Jetzt hab ich versucht (wie aus LS11 bekannt) das Zeug unterzupflügen, sobald ich den Pflug aber im Boden vesenk und losfahr entwickelt der Traktor ein eigenleben und reagiert nur noch ruckartig auf die Lenkung.
Erst wenn ich den Pflug wieder anheb, ist wieder alles ganz normal.
Hab mit LUA's nicht so viel ahnung und lern das ganze halt durch rumprobieren, aber daran beis ich mir irgendwie die Zähne aus.
Ich weiß nicht mehr weiter. Hab auch schon etliches ausprobiert, aber nichts will so richtig funktionieren.
Ich häng mal meine LUA und die LOG an, vielleicht erkennt ja jemand was, oder hat ne Idee was ich versuchen kann
Vielen Dank schonmal
Die LUA
[expander][lua]FruitUtil.registerFruitType("manureSolid", false, false, true, 1, 100, 2, 1, 1, nil)
FruitUtil.registerFruitType("manureLiquid", false, false, true, 1, 100, 2, 1, 1, nil)
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_MANURESOLID,
"manureSolid_windrow", g_i18n:getText("mist"), 0, 3, false,
"liquidmanureHud.dds");
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_MANURELIQUID,
"manureLiquid_windrow", g_i18n:getText("guelle"), 0, 3, false,
"manureHud.dds");
local sprayerUpdateTickBackup = Sprayer.updateTick
local sprayerLoadBackup = Sprayer.load
Sprayer.load = function(self, xmlFile)
sprayerLoadBackup(self, xmlFile)
if self.fillTypes[Fillable.FILLTYPE_MANURE] then
self.manureMod_active = true
else
self.manureMod_active = false
end;
if self.fillTypes[Fillable.FILLTYPE_LIQUIDMANURE] then
self.manureMod1_active = true
else
self.manureMod1_active = false
end;
end;
Sprayer.updateTick = function(self, dt)
sprayerUpdateTickBackup(self, dt)
if self.isTurnedOn then
if self.fillLevel > 0 and self.manureMod_active and self.currentFillType == Fillable.FILLTYPE_MANURE then
for i = 1, table.getn(self.cuttingAreas) do
local x, y, z = getWorldTranslation(self.cuttingAreas[i].start)
local x1, y1, z1 = getWorldTranslation(self.cuttingAreas[i].width)
local x2, y2, z2 = getWorldTranslation(self.cuttingAreas[i].height)
local old, total = Utils.getFruitWindrowArea(FruitUtil.FRUITTYPE_MANURESOLID, x, z, x1, z1, x2, z2);
local value = 1+math.floor(old / total + 0.7);
value = math.min(value, g_currentMission.maxWindrowValue);
Utils.updateFruitWindrowArea(FruitUtil.FRUITTYPE_MANURESOLID, x, z, x1, z1, x2, z2, value, true, false)
end;
end;
if self.fillLevel > 0 and self.manureMod1_active and self.currentFillType == Fillable.FILLTYPE_LIQUIDMANURE then
for i = 1, table.getn(self.cuttingAreas) do
local x, y, z = getWorldTranslation(self.cuttingAreas[i].start)
local x1, y1, z1 = getWorldTranslation(self.cuttingAreas[i].width)
local x2, y2, z2 = getWorldTranslation(self.cuttingAreas[i].height)
local old, total = Utils.getFruitWindrowArea(FruitUtil.FRUITTYPE_MANURELIQUID, x, z, x1, z1, x2, z2);
local value = 1+math.floor(old / total + 0.7);
value = math.min(value, g_currentMission.maxWindrowValue);
Utils.updateFruitWindrowArea(FruitUtil.FRUITTYPE_MANURELIQUID, x, z, x1, z1, x2, z2, value, true, false)
end;
end;
end;
end;
local utilsCultivatorBackup = Utils.updateCultivatorArea
local utilsPloughBackup = Utils.updatePloughArea
Utils.updateCultivatorArea = function(startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, limitToField)
utilsCultivatorBackup(startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, limitToField)
Utils.updateFruitWindrowArea(FruitUtil.FRUITTYPE_MANURESOLID, startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, 0, true, false)
Utils.updateFruitWindrowArea(FruitUtil.FRUITTYPE_MANURELIQUID, startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, 0, true, false)
end;
Utils.updatePloughArea = function(startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, limitToField)
utilsPloughBackup(startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, limitToField)
Utils.updateFruitWindrowArea(FruitUtil.FRUITTYPE_MANURESOLID, startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, 0, true, false)
Utils.updateFruitWindrowArea(FruitUtil.FRUITTYPE_MANURELIQUID, startWorldX, startWorldZ, widthWorldX, widthWorldZ, heightWorldX, heightWorldZ, 0, true, false)
end;[/lua][/expander]