Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
ExtendedMower
DescriptionSpecialization to toggle minimap zoom while on fieldFunctions
onRegisterActionEvents
DescriptionDefinitiononRegisterActionEvents()Code
47 | function ExtendedMower:onRegisterActionEvents(isActiveForInput, isActiveForInputIgnoreSelection) |
48 | if self.isClient then |
49 | if isActiveForInputIgnoreSelection then |
50 | ExtendedMower.updateMinimapActiveState(self) |
51 | else |
52 | ExtendedMower.updateMinimapActiveState(self, false) |
53 | end |
54 | end |
55 | end |
onUpdateTick
DescriptionDefinitiononUpdateTick()Code
37 | function ExtendedMower:onUpdateTick(dt, isActiveForInput, isActiveForInputIgnoreSelection, isSelected) |
38 | if self.isClient then |
39 | if self:getIsActiveForInput(true, true) then |
40 | ExtendedMower.updateMinimapActiveState(self) |
41 | end |
42 | end |
43 | end |
prerequisitesPresent
DescriptionChecks if all prerequisite specializations are loadedDefinition
prerequisitesPresent(table specializations)Arguments
table | specializations | specializations |
boolean | hasPrerequisite | true if all prerequisite specializations are loaded |
18 | function ExtendedMower.prerequisitesPresent(specializations) |
19 | return SpecializationUtil.hasSpecialization(Mower, specializations) |
20 | and SpecializationUtil.hasSpecialization(PrecisionFarmingStatistic, specializations) |
21 | end |
processMowerArea
DescriptionDefinitionprocessMowerArea()Code
73 | function ExtendedMower:processMowerArea(superFunc, workArea, dt) |
74 | if g_precisionFarming ~= nil then |
75 | g_precisionFarming.harvestExtension:preProcessMowerArea(self, workArea, dt) |
76 | end |
77 | |
78 | local lastChangedArea, lastTotalArea = superFunc(self, workArea, dt) |
79 | |
80 | if g_precisionFarming ~= nil then |
81 | g_precisionFarming.harvestExtension:postProcessMowerArea(self, workArea, dt, lastChangedArea) |
82 | end |
83 | |
84 | return lastChangedArea, lastTotalArea |
85 | end |
updateMinimapActiveState
DescriptionDefinitionupdateMinimapActiveState()Code
59 | function ExtendedMower.updateMinimapActiveState(self, forcedState) |
60 | local yieldMap = self:getPFYieldMap() |
61 | |
62 | local isActive = forcedState |
63 | if isActive == nil then |
64 | local _, _, _, isOnField = self:getPFStatisticInfo() |
65 | isActive = isOnField |
66 | end |
67 | |
68 | yieldMap:setRequireMinimapDisplay(isActive, self, self:getIsSelected()) |
69 | end |