/* called by: entrance ctrl of the object 'track'* G( t3 \6 ~4 ?4 I$ o# @5 o
*/; y$ e2 P$ }0 b
is% q$ o9 e: E1 n0 e- k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% }9 |7 E6 W$ G
do' z" `* ^1 K5 m2 w/ D/ J5 q$ L' J
Lan := rootfolder.Internal.Tools.AOLlanguage;
! F3 T0 M: l+ A V if current = @.Destination -- else return6 p2 v& |- O/ ?. ~8 [) i( e3 q! y
then
- I6 i' o. r8 _# D6 z# ^ @.Destination := void;' V: m5 \2 V. ^
if @.occupied then
$ X {' b. ]9 ~3 [3 B2 | part := @.cont;
* d2 j9 q6 m* \ @.transpOrder := void;0 L, Q; B/ t% F( h/ O) T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( E5 y+ I5 ~1 M2 m$ |
@,root.eventcontroller.simTime);
+ G! h- L2 ~6 K, Q, N7 u, @: z! b @.HasOrder := false;
) O' [6 Z/ `5 Q( y @.DrivingHome := true; K4 i* `: ]- S& \6 Q! B( ?" I
rgManager.tryToStartTransOrder;( H5 U( d& y/ w, `8 F( a: p
if @.Destination = void, P; b2 S. r+ `. a2 c' q% v
then -- no transport order for vehicle @
& G1 E) Y( t7 S( k: r @.Destination :=
: P3 Z/ Y$ B% C' a7 X0 ~8 o rgManager.nearestFreeStation(@,track.~);" \ Y6 S3 D$ \, z2 ~/ u
newDirection(@);
N$ K' `5 L. ]; v' l4 ~# M if @.Destination /= void then
! w9 u6 q, ^6 E" T+ Q: _! Q @.Destination.NumReservation :=
: D) M1 v8 j+ N% D @.Destination.NumReservation + 1;1 O. a6 J7 _. b
end;+ g) {& r3 h+ I
@.CurrIcon := "drivingHome";) Q7 _) `) B' Y0 n" ?. u; l
@.DrivingHome := true;% F9 D% I6 c/ B0 J7 Q% s
end;/ l0 d" X/ ]( _! ]' n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 X y$ n& P5 B; v- f part := @.transpOrder;
( u" P& k3 h, i+ {+ U$ f part.move(@);-- load part
- j3 Q$ t p5 @/ K @.CurrIcon := "load";2 r$ h" d& o& p" V
GlobalDistObj := part.globDestination;1 ]8 J5 f# n" A3 H% W6 S6 h
assignLObj := rgmanager.rgAssignL;% \$ u( x$ X# s" E3 b; m
row := assignLObj.getRowNo(GlobalDistObj);
! b) @1 h6 y$ Y0 `, ^/ ?. ? if Row = -1 then -- since 705 d5 ^( S; D/ v0 v5 |+ ?
if lan=1 then
" X6 e9 }: x8 N. M- j1 h3 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- Q0 R7 R+ V+ K5 a! b
to_str("in der Andockstation: \"",?.~.name,"\""));
, |; ^' U; {( g7 S7 g, v else/ X2 ]# ?' ~7 l4 y0 m) T5 a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 v+ V0 b z8 ^' Z8 w. b8 H; S/ W to_str("in docking station: \"",?.~.name,"\"")); 7 B! `2 n+ T/ m2 S6 V( w
end;, g |6 ]7 X/ f8 C- D" ]
else9 c; h% t8 G" D W* c
@.Destination := assignLObj[1,row];. h( S$ H3 P9 i0 z( X) H" y
end; 9 D' W) N0 V& E8 ~2 t: f6 a. f
newDirection(@);8 \8 i7 L; p# v; |
@.HasOrder := true;0 I1 }/ ^, G9 I$ {* E3 c
end;* K) f. i5 H4 f4 f( ~+ Y
end;+ w1 _6 M6 C% ]3 r3 h$ l% M7 @5 ?% k
end; -- of the method* e" q2 q2 m* B$ D4 F
|