/* called by: entrance ctrl of the object 'track'
) h9 ]. w8 T; C*/
! |" M1 d/ k) }3 Z6 i9 u+ Q* ^. t; Wis+ h2 X; s# r2 W* s& z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: I8 M* ^$ c( O9 M8 |
do$ o( t% L; H# z
Lan := rootfolder.Internal.Tools.AOLlanguage;! w; z6 J: Y9 f& `2 u2 ?6 J
if current = @.Destination -- else return
5 [% @$ C; r; Y then+ W4 `: D1 B0 ]& \; B+ k3 M! j L
@.Destination := void;5 V1 k: t6 j; h8 h, n9 ^
if @.occupied then" ` D2 O. |1 l5 v
part := @.cont;
2 Z; F& W7 x$ ^" R/ s @.transpOrder := void;
+ y) ?1 [' o- _0 k+ s0 ]* u9 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 @/ u) e) J1 J
@,root.eventcontroller.simTime);
0 \4 z- n0 y4 s& R4 X @.HasOrder := false;
- j# T$ i9 }. z% q/ a @.DrivingHome := true;+ T8 @" q( G* V0 i, M
rgManager.tryToStartTransOrder;
# G! o. }, U7 a/ g/ k5 } if @.Destination = void, }9 w: v" f2 ~, i
then -- no transport order for vehicle @/ k- j! j0 k/ a. }8 k- p- n* x% |
@.Destination :=; S o+ ~$ Q5 V, q* y6 f
rgManager.nearestFreeStation(@,track.~);0 S( g n. k" Y4 `$ A8 H
newDirection(@);
& o/ r. e) Y8 J9 s if @.Destination /= void then
: J) N7 |( c/ N/ L @.Destination.NumReservation :=
1 B! O6 {8 x; `1 }' ?, M4 k% Z: e @.Destination.NumReservation + 1;9 o4 F( Y: A4 Y
end;, M7 o2 W; d# b' B) `' H% E0 X. E
@.CurrIcon := "drivingHome";6 ?% K7 Q( i- B- i6 k, h) G
@.DrivingHome := true;
& x; |4 ~- L; L& [* U% H. D# d; Y end;
# z* C2 Y: `6 D3 [3 Z- M else -- the vehicle @ is empty, both vehicle and part are in the same dock station h4 _2 T: L* F8 E0 Q# k0 y
part := @.transpOrder;2 d w E' z; x* D2 A* N. L
part.move(@);-- load part
" H$ m% {0 t6 F$ U @.CurrIcon := "load";
0 Y/ N# u9 p- f* t GlobalDistObj := part.globDestination;
1 a" R/ ^6 u2 l6 B. C% Z2 K assignLObj := rgmanager.rgAssignL;5 a: L( a: f, u/ Z+ y, x" V; o
row := assignLObj.getRowNo(GlobalDistObj);
& T: |* Q. V% `0 c5 j* R) Z" ` if Row = -1 then -- since 70
, p. P) X% |' V, Z9 g" [! R if lan=1 then6 O" t3 O; i# |# e( ]1 _0 K7 L4 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 L5 a% g' e8 D* H3 v: n% j' P to_str("in der Andockstation: \"",?.~.name,"\""));; f; S9 r6 P1 s6 K& f
else
. R- r3 j. Y% u6 @, k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 G6 ?8 ?+ X- Y2 L
to_str("in docking station: \"",?.~.name,"\""));
& O0 J! p, L9 v9 n. C end;
# } n, z8 F4 G4 j6 _9 Z H else
: i \' Q. a7 `- R @.Destination := assignLObj[1,row];
5 p' [# p9 S' ^% J3 g; G7 @2 O6 w end; : p/ v( u$ Z6 a1 e
newDirection(@);
6 g, o" S) m; x' i" E @.HasOrder := true;
& f- C8 Q" c" q# N, f4 H end;
+ f' H0 G6 B( @ end;
9 t2 F! N7 {& t a" lend; -- of the method1 u$ }" p* z; c+ ?. _" [ G
|