/* called by: entrance ctrl of the object 'track'
2 {, o3 N/ _- m- ~! K t5 W o*// J2 S. }5 c9 c% c4 v6 ^! v
is; t5 m8 r( L/ N) X6 V) x ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 i- c# G: {) _+ O' i7 f1 X
do9 c' n7 ~- x6 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;$ ^& h7 b8 Q1 g2 B' S
if current = @.Destination -- else return+ O7 }& e! k" P! ]6 W% R
then
8 B6 B. @; t( Z @.Destination := void;8 B* L5 @& I4 L. z# A0 A# A3 Q1 {6 Y
if @.occupied then6 `- O2 J. ], A! N
part := @.cont;4 F. K" h) |% ~
@.transpOrder := void;
( _6 X' ?9 L; R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 ?* a y/ s7 j. u( g9 `3 {3 R @,root.eventcontroller.simTime);+ Z/ K( y9 ?5 R8 F
@.HasOrder := false;
, K. k; L4 v/ m" M& Y6 N/ k0 f @.DrivingHome := true;
- Z9 s0 U! o% p1 _ rgManager.tryToStartTransOrder;& R" ^- |$ |2 W* r. I4 j7 T6 s
if @.Destination = void
$ U8 @) j9 f7 u% N/ j4 ? [% j7 y then -- no transport order for vehicle @3 K3 ^/ @/ k! R+ }9 ]% u
@.Destination :=1 j+ m& k6 a' U8 F
rgManager.nearestFreeStation(@,track.~);! ?; k8 _% h- r0 [
newDirection(@); - ^1 U9 J7 [& x5 v/ f1 t
if @.Destination /= void then5 q. [* S4 D4 {( |8 o9 V
@.Destination.NumReservation :=. q+ L) F$ G4 e: X. [$ O6 b( j
@.Destination.NumReservation + 1;! U5 G/ q% a+ H0 O! b/ d0 C% K
end;# ` E- ~+ N0 T( w. t7 W8 r% y0 R, b
@.CurrIcon := "drivingHome";. v; |" c& ~' r4 _ q. f
@.DrivingHome := true;- }0 x1 |& U, k' | U# ?
end;
( h3 P9 M5 d/ s$ u# I9 N: a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- @' j* f" f2 V part := @.transpOrder;
8 G: l/ t( f$ N" e. M part.move(@);-- load part
% x4 f/ d! ]9 e4 {3 c- w! H F$ F @.CurrIcon := "load";
9 T/ U7 H( _* N& y* f) O5 f GlobalDistObj := part.globDestination;
& n1 G9 e2 @3 P/ K- r% |# n: o assignLObj := rgmanager.rgAssignL;8 v# i \6 F/ \
row := assignLObj.getRowNo(GlobalDistObj);
9 |8 ]2 A! H& N3 D' E7 H if Row = -1 then -- since 70' Y: r6 `) R) [
if lan=1 then. j% C: i/ T4 L) j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% ~- b. {3 l$ V8 O to_str("in der Andockstation: \"",?.~.name,"\""));
( \; X- [6 S: I7 Z5 E. A& Y else
5 q6 `7 j/ S! b c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 u0 U$ M& n7 d to_str("in docking station: \"",?.~.name,"\""));
2 }8 y' O P. n# S end;; t1 Z N* k- T* ]
else5 ]! X; a9 K: r/ z" B
@.Destination := assignLObj[1,row];
: Z* n. z( Y- u* r2 m, g: \0 O7 L end; 6 j3 O9 b! W4 C/ s' U
newDirection(@);
6 b: H& O) Y4 E+ A% V. Y# i @.HasOrder := true;+ e7 i" [! ?$ V( I# A/ b
end;; a& W$ w3 d; @; d# }
end;
! z$ D9 B5 @2 x2 E a' J/ Gend; -- of the method
$ p* M' e- [8 M$ V/ m2 {$ B' K |