/* called by: entrance ctrl of the object 'track'
3 A8 @+ j( d+ P2 ]*/
3 {$ {) e$ ?& w( c8 R4 q. Fis3 W, t" Y$ _! H) f/ R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& H' Q+ t! A$ a# Jdo# N% s" F6 P& `& M
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 d5 R5 \: [* r: J$ I. L if current = @.Destination -- else return" D' d; M7 Z. Q" y+ }! O
then
/ ^$ c* h6 r; B* w4 q+ G @.Destination := void;. U3 {8 Y. o ]" N' d
if @.occupied then( G' r" z% s$ Y- ?, _+ p
part := @.cont;
V; [# h/ S% X3 r @.transpOrder := void;
! \# F; Y; v4 D+ O- ?" w' J% ^7 n+ ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 u' B% B' Z* E8 |0 U2 [- X" E5 Z
@,root.eventcontroller.simTime);: ?$ U+ s* {8 g
@.HasOrder := false;! l0 I/ r) f2 [
@.DrivingHome := true;$ p2 s5 Z3 z9 O1 }
rgManager.tryToStartTransOrder;6 _4 n# i% P! x e" v; o- U
if @.Destination = void
* E( S% h+ c* P5 L4 q. Z: h4 | then -- no transport order for vehicle @3 x4 f2 c! y0 w0 F1 A2 n) l5 |
@.Destination :=
0 ^* I5 U0 o. ^* x rgManager.nearestFreeStation(@,track.~);
8 m9 }9 y; Q. V# a5 c5 y$ J newDirection(@); $ O' ]4 m9 [1 i0 u' t; H4 ]
if @.Destination /= void then7 ?0 ]! x; Z5 o$ w! V* u% m% S
@.Destination.NumReservation :=
% L+ q; c$ [# a9 F+ O& p/ } @.Destination.NumReservation + 1;
, u3 `1 k% R7 s% E9 u9 U end; D4 [' c) }: J% L2 C1 J* U( O, V
@.CurrIcon := "drivingHome";
: ?. W8 E' T& r7 G+ c @.DrivingHome := true;
5 L* P+ W9 \$ P# L end;- C. }" Q2 x$ _1 j7 G4 j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 c; _% z5 q3 i1 @& r
part := @.transpOrder;
; ^) W) J2 h! {# b8 W) s part.move(@);-- load part7 v4 d2 r4 A/ C5 f8 G$ ^
@.CurrIcon := "load";* N! g. y- V( m9 k5 c1 `; `. Q
GlobalDistObj := part.globDestination;+ b0 w) B3 D3 I+ u/ ~8 X$ d
assignLObj := rgmanager.rgAssignL; c9 f5 o) g3 _# b7 n; C
row := assignLObj.getRowNo(GlobalDistObj);6 t7 c' i4 s; Q9 k" V5 l- p! B: t
if Row = -1 then -- since 70& y/ {$ j1 b7 m( K# ?+ a1 C
if lan=1 then3 A; h& P" r& ]0 B: |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% ~0 Z9 g/ j' z2 V H" X, v to_str("in der Andockstation: \"",?.~.name,"\""));& ^6 t( V# Y" A
else Y2 o0 h4 U5 ?) ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, ]3 D5 T& X% X' o
to_str("in docking station: \"",?.~.name,"\""));
8 ]- k& T6 p; i8 h end;
* o6 j6 q5 x! o! L# g3 W else# f3 t _ X7 J) }/ v
@.Destination := assignLObj[1,row];
% e& w2 R( r/ D {* s# j end; " e0 ~' q/ o, w# }4 u- C1 _
newDirection(@);2 d9 Y x: E1 B+ v. v4 M; M0 k
@.HasOrder := true;
' m% e1 i& z) @ end;
1 N# F* Q1 {; F. t! c end;
8 {, f( L0 Y7 R5 ]) ~end; -- of the method2 \' `/ b8 X. ? V: d
|