/* called by: entrance ctrl of the object 'track'
3 w5 {' M5 L5 o+ p# E9 ?% {/ y*/
5 s y! P- I" ris. q2 G" E# q3 m. Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- M% Z. ~' m1 |% i8 W
do. H% h2 Y' x X {" H
Lan := rootfolder.Internal.Tools.AOLlanguage;2 o) F& `) g) K% x$ X
if current = @.Destination -- else return# Q O, a7 _; b5 D# E
then9 J n( C! q& t: `
@.Destination := void;6 o( Q! x8 I) S# M; m
if @.occupied then
3 d5 W% ~3 o, `6 i5 C& i5 n' B6 z [ part := @.cont;
8 w3 ~! d4 F: W" e& Y+ _ @.transpOrder := void;
5 U: {& s+ a6 E* d0 _+ J2 w2 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 p% l6 k- q/ o. D. f @,root.eventcontroller.simTime);/ n# @8 `: Q: O9 W2 q" _/ I- @
@.HasOrder := false;
6 s0 ?! F& e4 d- B5 E @.DrivingHome := true;- t, Y, E! r& p* {* `+ N/ D5 z2 T n( ^
rgManager.tryToStartTransOrder;' C9 x8 g' I3 t# x( v
if @.Destination = void
, F2 B1 X$ q5 G/ Y. L then -- no transport order for vehicle @
. i4 h1 G% J9 p' b @.Destination :=' t) B6 G% h( i) ` V
rgManager.nearestFreeStation(@,track.~);
, D' u* R, _4 K$ _* Q% n newDirection(@);
/ t- o3 j0 g8 m* R+ x* m( J if @.Destination /= void then# X1 r. D2 _! t+ Q7 C/ }
@.Destination.NumReservation :=) R9 ~7 }+ O3 n" V4 a3 c! r( H; l% L
@.Destination.NumReservation + 1;
( \7 j4 s! e4 w+ R& Y7 c, I end;
4 }3 Z2 W% |2 V* |1 C7 j! h @.CurrIcon := "drivingHome"; U/ N* i! B! ]3 R% s! c. B: G
@.DrivingHome := true;
" L; |0 N, Y) `+ Q8 E& |8 K end;
; V" f- {: q8 V" B9 ]! L7 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* w$ @7 s7 T3 |6 M part := @.transpOrder;+ M4 E6 D, r% U4 v# W6 L3 P9 u+ w) O0 N
part.move(@);-- load part$ J% D4 ~) t$ b; Z8 [# G+ ^3 X
@.CurrIcon := "load";& I4 g5 `& `3 v" v5 v: f
GlobalDistObj := part.globDestination;7 D- c0 \# l( i( Y* k
assignLObj := rgmanager.rgAssignL;6 q, @% V: i6 U3 x; d' w, R8 ?' O
row := assignLObj.getRowNo(GlobalDistObj);" S( u4 h7 Q1 y4 E% E
if Row = -1 then -- since 70
2 h( |& u* S" ?8 q, [% S if lan=1 then
. q8 k/ P. U7 E j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& ^/ `' Z x5 c) X5 `* b to_str("in der Andockstation: \"",?.~.name,"\""));* h& a1 P* y' s& U0 L# G
else& M7 ^" l6 | c0 G4 o& X3 ?8 ?9 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," W( y) ?9 }& D
to_str("in docking station: \"",?.~.name,"\"")); 5 d; p0 u" z+ A, P2 w& X( ]: S
end;+ y' _3 s1 {& O# x
else) H7 H6 m( j L; f% [2 h- o N
@.Destination := assignLObj[1,row];6 X u+ f2 H3 t6 \( C
end; * i% v- |' O3 S# ?
newDirection(@);, @0 y& z; @9 _$ ^; s* p( M
@.HasOrder := true;
. j5 c _/ n! N6 U$ B( e; O f end;$ F# @! I S# B" ]- A7 g: _5 B
end;
" y" }7 i5 a( e+ J2 tend; -- of the method" J k* Q% k3 A2 Z0 S! Y
|