19 lines
681 B
Python
19 lines
681 B
Python
|
from Main import TractorLoad
|
||
|
|
||
|
|
||
|
def action(field, tractor):
|
||
|
if tractor.header and tractor.hitch == "Crop Trailer":
|
||
|
return "toPlow"
|
||
|
|
||
|
elif tractor.hitch == "Tillage Unit" and TractorLoad.TillageUnitLoad == "Fertilizer" and field.state == "toFertilize":
|
||
|
return "toSeed"
|
||
|
|
||
|
elif tractor.hitch == "Tillage Unit" and TractorLoad.TillageUnitLoad == "Seeds" and field.state == "toSeed":
|
||
|
return "toWater"
|
||
|
|
||
|
elif tractor.hitch == "Tillage Unit" and TractorLoad.TillageUnitLoad == "Water" and field.state == "toWater":
|
||
|
return "toCut"
|
||
|
|
||
|
elif tractor.hitch == "Tillage Unit" and TractorLoad.TillageUnitLoad == "None":
|
||
|
return "toFertilize"
|