/* called by: entrance ctrl of the object 'track'- t- s( _8 `3 v6 _" O3 N
*/
+ t3 N0 I: z. t+ H: ~7 C( ]is
R" l5 w+ J. V9 @+ w9 ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 t' a0 W r; K& v) m/ R4 f" N
do3 T8 q& ?8 r# A. u: x: V% B" A
Lan := rootfolder.Internal.Tools.AOLlanguage;7 J- o, Z! P5 e7 X2 m+ \% L
if current = @.Destination -- else return
+ y& ?; G% {. r/ { then
! ]& s( P" @8 S9 x- ~) n: N$ M @.Destination := void;% T& Q/ g: x H0 ?
if @.occupied then9 b" p; |- ]4 B8 T1 Y4 S' n+ ]
part := @.cont;9 _) s( J& I0 \* \% M- t
@.transpOrder := void;" `) D0 i& j3 r! h }4 m1 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 E' i& p* k! ]7 a1 q# G5 R. V6 |
@,root.eventcontroller.simTime);
) Q% L5 q1 ]& O9 n @.HasOrder := false;
1 \. _6 f) Q8 F& H' { @.DrivingHome := true;
, E8 w8 d- _6 D& B rgManager.tryToStartTransOrder;7 c& `% c6 {" ~
if @.Destination = void
! u( l8 j/ R5 S& s' ]- E then -- no transport order for vehicle @
# }( _7 A8 y" S: D/ [: w @.Destination :=' T3 V9 A8 S$ X* o% n+ u
rgManager.nearestFreeStation(@,track.~);
5 Y3 S3 g- e4 h9 a0 Z, T6 | newDirection(@); + q4 [) @% y8 W/ c) Q/ E8 m; Q
if @.Destination /= void then
* S" E( C# k2 X3 \* D4 W" S @.Destination.NumReservation :=/ p; f7 X; ^4 l, B" p- x. _
@.Destination.NumReservation + 1;
" A6 A- w* M! W" V0 `- M9 W6 V end;
0 j' E6 ?2 H% S( C @.CurrIcon := "drivingHome";6 `/ y6 z. Q0 l- p5 U% a, o: l: k
@.DrivingHome := true;
5 u2 d9 I* D+ I4 z end;; R* ?0 e p) K! J _7 o: f& _: K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 {# [5 V( P8 U2 _( Z6 M
part := @.transpOrder;( e/ ^/ w, i) M8 \: U/ R
part.move(@);-- load part
; P/ h+ g& {2 ? Y+ s B4 ] @.CurrIcon := "load";1 J/ m L- g6 c4 g4 V
GlobalDistObj := part.globDestination;3 k! B \! l3 F- w- U; t
assignLObj := rgmanager.rgAssignL;- n5 d4 K& a, v
row := assignLObj.getRowNo(GlobalDistObj);
$ Y2 s4 X" L+ I a# T9 ] if Row = -1 then -- since 70- r. O; F* s# w6 q- O- |* X$ x
if lan=1 then
8 s' q1 x i. T& o d: v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 u2 ~" Y3 N4 `. E3 _1 ] to_str("in der Andockstation: \"",?.~.name,"\""));
- p; n+ V& b( t else2 z% s: t+ {6 H' q. k7 H& Y% i9 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, l% K" X- }8 _& [3 ]# l% O
to_str("in docking station: \"",?.~.name,"\"")); , F1 H7 `4 l$ z: `% _
end;9 U h+ c8 x+ m# j$ O' w( n
else5 z5 j5 q4 T3 ?7 t( ~- f5 S
@.Destination := assignLObj[1,row];/ [& B! P+ R' l3 x: \ }& q
end;
4 |; g/ z. T0 w6 f2 Z0 ^ newDirection(@);
% `8 m( Z, l. {) M+ u! E2 r @.HasOrder := true;4 F; e x" \1 L& U5 f; o
end;8 o9 v3 E: }; ?. }, k' \# e- I
end;4 H0 v9 v$ C) G$ i z0 g# X) S
end; -- of the method7 h$ l/ x; g0 A+ X
|