/* called by: entrance ctrl of the object 'track' A2 Y8 S# M* J5 a3 b9 r
*/) ^, x) e0 d7 Y0 E" Q/ S
is% _$ e h, F, g5 M! n9 {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: |5 c3 v7 L K7 H9 kdo
, ^+ ]5 B" m# ?. E( O Lan := rootfolder.Internal.Tools.AOLlanguage; J$ i5 a2 v6 z* ^4 A
if current = @.Destination -- else return
/ {# o2 h* T+ E7 R then: Z- z3 y) n# U* e' a9 x3 p" o8 W+ R
@.Destination := void;
2 s6 ?+ @% n. n$ e) @ if @.occupied then/ u5 ~) V& ]! Y1 C
part := @.cont;
+ j2 H* E5 o5 T; r3 m @.transpOrder := void;
8 O2 \5 c5 { b# | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ x8 C9 w% S' A
@,root.eventcontroller.simTime);
# h* ^; K; ~. y5 y# i @.HasOrder := false;
8 s/ H* W$ R3 X3 B: R @.DrivingHome := true;2 s& [0 L' [( a7 B2 @
rgManager.tryToStartTransOrder;
9 j. t# ]; t* M, S3 P if @.Destination = void
* O- {, t7 d0 M2 v then -- no transport order for vehicle @
7 m6 R3 d: q9 V. ?7 o @.Destination :=1 j, u: ]5 V7 _2 o+ ^
rgManager.nearestFreeStation(@,track.~);
( v( V# w8 d- w9 A' Q newDirection(@); 9 F+ Y4 f; w+ d# |
if @.Destination /= void then2 ?) Q, m( s4 i7 c
@.Destination.NumReservation :=
; D1 O9 X* p y! x @.Destination.NumReservation + 1;
2 a, l0 e5 Y" S3 U( a end;
; O& L O" X# V @.CurrIcon := "drivingHome";8 I# j) p" ^+ A, c) I' n9 E% W0 G3 I
@.DrivingHome := true;
' O3 S4 P/ k" n8 Z) m end;: ^/ _3 c) r' Y3 D# g& H* ~8 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# e7 D: m0 g) H! O6 H# R
part := @.transpOrder;
9 J: U6 m3 b- ^ part.move(@);-- load part2 y; i2 c2 r& v$ M* a
@.CurrIcon := "load";/ Q4 ?, B* O) P- i1 n
GlobalDistObj := part.globDestination;
2 z- ]4 ^" T: _$ I' }( d assignLObj := rgmanager.rgAssignL;* f1 ~6 v7 Y% `- B6 x
row := assignLObj.getRowNo(GlobalDistObj);
' F+ E6 l l, S if Row = -1 then -- since 70. M. X) l/ `: M4 [
if lan=1 then
0 M9 g) g4 d% ]4 m2 Q( G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, ~+ G* T( M, X( M+ L to_str("in der Andockstation: \"",?.~.name,"\""));5 ~2 Y7 N8 _8 |5 f
else J0 m' i& h- [5 K& W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: R7 }/ j+ {# k' } J to_str("in docking station: \"",?.~.name,"\"")); 8 q+ z% M. L6 V$ s
end;
" U( d/ R- T3 S else
n( _8 z1 O# }: ~$ n( N7 f @.Destination := assignLObj[1,row];8 D2 _( t8 u3 n/ c% P
end;
& z6 J+ v, v/ S5 ? newDirection(@);) ]+ ]- u) Z5 v& D& L- \# r( I5 q
@.HasOrder := true;
& F/ N0 L% z+ G) \7 f% p. q end;/ j. C8 T* U3 E7 ~1 X8 ^
end;9 e& O' V% m* l6 t! q' i/ P7 V/ O
end; -- of the method, u) e2 p: k. ?8 i. `1 }8 {
|