/* called by: entrance ctrl of the object 'track'
6 c& P7 i S; ^( I7 M*/# ^, o0 g/ W" {0 @9 a i; V
is2 ^- |8 h4 p& r1 [8 v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 U* N7 y0 Y! m8 F5 l# ]do
, Y* E# s" o. F Lan := rootfolder.Internal.Tools.AOLlanguage;
' f* ~8 r, V7 q. r1 G if current = @.Destination -- else return/ u2 h" k; j! f
then
. n) ?/ f/ y1 w5 R1 T( }, O @.Destination := void;
9 M% r0 J5 L% Q8 L2 D6 w3 q if @.occupied then
: F- m' Q) g5 B/ U' n& D part := @.cont;
% O& d7 d$ c \# G @.transpOrder := void;
2 o% @6 u9 K+ q# p5 ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 ~2 ?) h8 |6 O6 Q# J @,root.eventcontroller.simTime);: m: K0 B3 s# j. K; z2 j" ~% i
@.HasOrder := false;
' ]& y4 Y+ ]: {; F+ k) z3 a* j2 w @.DrivingHome := true;
3 U) Z' n& u3 D. m6 G; A rgManager.tryToStartTransOrder;8 E6 L. Q! X9 h
if @.Destination = void
" A% j$ G- T' I4 B6 g- `4 ] then -- no transport order for vehicle @
, V" e5 s/ @% z) { D N& \0 s# K @.Destination :=3 f- h9 w! e" r0 D% v% m* |9 L4 E
rgManager.nearestFreeStation(@,track.~);
; s5 s( }2 x. l+ g newDirection(@); ( y) F* x: _7 c# }1 F% \9 L
if @.Destination /= void then( b8 {* P0 W: Q( X1 G9 G6 T
@.Destination.NumReservation :=! B3 A9 h/ t r1 ]' s" Q2 C
@.Destination.NumReservation + 1;
# E" U3 G4 h2 t8 Z end;. Q. D( b2 Z/ W9 b4 i
@.CurrIcon := "drivingHome";
# U7 O- Q3 p" u @.DrivingHome := true;# n9 ` x5 F! L n: e" j& m
end;3 o. q* u! ^( v5 d2 w) ?" @( A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 _+ `/ ]& Z) V part := @.transpOrder;7 d$ A; b4 X2 h4 r2 e1 u n' c
part.move(@);-- load part0 k- Q5 p4 `9 o# D" X6 l0 G
@.CurrIcon := "load";! l4 a) K K g9 ]" k8 C
GlobalDistObj := part.globDestination;
2 @) D1 N9 {$ ], p/ i2 p6 \ assignLObj := rgmanager.rgAssignL;- f4 u& {. e* V
row := assignLObj.getRowNo(GlobalDistObj);) H( i# V/ O2 i E4 T8 D
if Row = -1 then -- since 70; x5 y* o7 O' b* V' y9 }9 i0 V. n
if lan=1 then7 f0 T/ E% n4 I: b) f% z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, ^$ p6 x# k; `4 T# Z5 I
to_str("in der Andockstation: \"",?.~.name,"\""));
; b+ B2 k; E! s+ I5 o' {7 c4 o else
" [: O0 B% \* y( \ I& A' z0 ~7 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. {7 \1 x- Z$ e: S5 ?
to_str("in docking station: \"",?.~.name,"\""));
3 d1 G2 [9 @5 m! o. z7 @ end;/ T) E9 P Q0 `, W
else
, _1 a- _/ n0 Q+ e& X @.Destination := assignLObj[1,row];
8 o+ m- o( G7 \& b% o) z end; 9 x; q) c: e" F
newDirection(@);& |& [/ E$ x& e ?0 E% U) L
@.HasOrder := true; z1 B( _, G/ c R! {1 R4 D! ?! D
end;& Z: d9 n: S, V; q' D1 e
end;* H3 q7 Z6 `* H4 P* }0 ?
end; -- of the method1 E4 q+ Q: D: ^9 B% S# F( k! @
|