/* called by: entrance ctrl of the object 'track') R8 ?0 m+ a, B* l0 c# E
*/9 A: d! V. N% x5 I, X
is3 H& ?0 b" t" n* ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 D% t. r, m! w+ v
do5 `( e+ M5 a. b: D: k! {4 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
; t. Z+ _" k: }9 p' ^+ Q) V4 y) Q if current = @.Destination -- else return
/ [7 N* r- ~/ h* l8 b then1 X8 {) V4 v" `. B; L. j$ d! v
@.Destination := void;
, Z U, d+ |. _9 i if @.occupied then
/ M2 Y: C4 }( Y7 u$ `+ c part := @.cont;/ i$ T# p$ F/ y- `" [/ ?7 M* |
@.transpOrder := void;! x9 t3 ~* {& f1 j2 T- I$ c n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 f6 C9 G: T9 B6 K. x
@,root.eventcontroller.simTime);% C- I9 U& I( C4 H7 R
@.HasOrder := false;
+ ?% k7 Q, \% V# | @.DrivingHome := true;6 j6 ?+ X9 Y% t5 [
rgManager.tryToStartTransOrder;- N7 q/ g2 \+ q# @, m% Y+ X
if @.Destination = void- U8 u4 r9 k) b/ W
then -- no transport order for vehicle @; w7 [ H9 c; I& e
@.Destination :=/ c: p; g. Q% ^
rgManager.nearestFreeStation(@,track.~);
2 V/ l& m7 N( }0 j newDirection(@); ; i7 F4 o) c& X
if @.Destination /= void then! `# `9 @% r+ b7 N
@.Destination.NumReservation :=" R. D$ P+ ? x- Y$ f0 C( v7 S0 m, A+ Z
@.Destination.NumReservation + 1;
) N+ d* U$ c+ k: ~! G end;. h0 L! d9 r }3 S2 F3 j
@.CurrIcon := "drivingHome";- a( \ k6 ~& F4 i" [
@.DrivingHome := true;# P" q* I$ o4 R8 W" P
end;' R5 H3 _5 ]% G' O/ B% [) n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' `+ f& `" y# H! h& [2 c9 x
part := @.transpOrder;
2 S: \/ W* G% |" s0 e% b8 p) x part.move(@);-- load part
$ b0 ?5 X5 w8 t) l5 N. ~5 ] k1 k @.CurrIcon := "load";5 F) a* W8 S4 V
GlobalDistObj := part.globDestination;
G D: L& d0 N; P( f assignLObj := rgmanager.rgAssignL;/ q! Z+ L/ n- B' \' n. X
row := assignLObj.getRowNo(GlobalDistObj);
. W$ ]* e2 @5 }$ K) w5 B% z& k8 A if Row = -1 then -- since 70, @/ k0 F5 H9 c! X2 s
if lan=1 then
0 t, D- o- X0 h. Y$ U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 @ D% {6 x6 } U$ E; g. J! P to_str("in der Andockstation: \"",?.~.name,"\""));. ~: \% C" c$ }' h# p
else
1 b- X$ L4 |- z( t& l6 X# r% ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, ^6 W7 a; w8 _1 Q& W2 c. `
to_str("in docking station: \"",?.~.name,"\""));
) L+ O* B. J/ L# s end; m2 {" n5 N4 @0 k" o: X) b8 r
else+ T `9 A( P$ K, [
@.Destination := assignLObj[1,row];6 k( H5 v: B k+ ], w. }3 {% m
end;
2 B- ^5 N8 [. {% z- c' ?5 F newDirection(@);
6 X5 @- V$ z+ U! z" e _: ] @.HasOrder := true;
0 v. R5 G2 f- Q, h+ u! A end;
5 s+ I' O1 P i. f# \- q; G end;: ]5 H9 U8 q' Q; S
end; -- of the method7 o( i% F1 P' @: Q' y. @3 m* p( z2 R! g$ u
|