Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on May 23, 2023. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 510
Expand file tree
/
Copy pathspecialTools.lua
More file actions
Latest commit
42 lines (37 loc) · 2.06 KB
/
Copy pathspecialTools.lua
File metadata and controls
42 lines (37 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
functioncourseplay:setNameVariable(workTool)
ifworkTool.cp==nilthen
workTool.cp= {};
end;
courseplay:updateFillLevelsAndCapacities(workTool)
-- TODO: is this even needed? Why not use the workTool.spec_* directly? Do we really need our own table?
-- Only default specs!
fori,specinpairs(workTool.specializations) do
ifspec==CombinethenworkTool.cp.hasSpecializationCombine=true;
elseifspec==CutterthenworkTool.cp.hasSpecializationCutter=true;
elseifspec==DrivablethenworkTool.cp.hasSpecializationDrivable=true;
elseifspec==FillUnitthenworkTool.cp.hasSpecializationFillUnit=true;
elseifspec==FillVolumethenworkTool.cp.hasSpecializationFillVolume=true;
elseifspec==MixerWagonthenworkTool.cp.hasSpecializationMixerWagon=true;
elseifspec==ShovelthenworkTool.cp.hasSpecializationShovel=true;
elseifspec==LevelerthenworkTool.cp.hasSpecializationLeveler=true;
elseifspec==OverloadingthenworkTool.cp.hasSpecializationOverloader=true;
elseifspec==TrailerthenworkTool.cp.hasSpecializationTrailer=true;
elseifspec==BunkerSiloCompacterthenworkTool.cp.hasSpecializationBunkerSiloCompacter=true;
end;
end;
ifworkTool.cp.hasSpecializationFillUnitandworkTool.cp.hasSpecializationFillVolumethen
workTool.cp.hasSpecializationFillable=true;
end;
--------------------------------------------------------------
-- ###########################################################
--------------------------------------------------------------
-- SPECIALIZATIONS BASED
-- [1] AUGER WAGONS
ifworkTool.typeName=='augerWagon' then
workTool.cp.isAugerWagon=true;
elseifworkTool.cp.hasSpecializationOverloaderandnotworkTool.cp.hasSpecializationCutterthen
workTool.cp.isAugerWagon=true;
elseifworkTool.animationParts~=nilandworkTool.animationParts[2] ~=nilandworkTool.toggleUnloadingState~=nilandworkTool.setUnloadingState~=nilthen
workTool.cp.isAugerWagon=true;
end;
end;