/* called by: entrance ctrl of the object 'track'
* u% ]7 g% O2 z6 G*/" a Y9 C; n5 `( b
is
# z; I0 A# X; Q* }* | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. t F* V' M9 g2 ~$ q5 N+ _/ {7 g% ?do7 ?0 O* h$ a0 R% m' ^
Lan := rootfolder.Internal.Tools.AOLlanguage;7 @, R! {) M2 J4 w7 w" J
if current = @.Destination -- else return
* @: m9 R) R, L! g8 U" _& U then' z7 r5 P9 ?6 W! i3 f
@.Destination := void;6 x9 I2 e# o- l; ^ o0 G: `2 a3 T/ p
if @.occupied then
! W0 ]; F2 z* |) w% F. H- Q6 P# o part := @.cont;
2 c8 e" L( \, A+ P& V/ {3 q @.transpOrder := void;
* {6 r* {. G+ j5 w$ @+ X& k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ E9 a, Q5 C, z/ I @,root.eventcontroller.simTime);) A7 Q }" v/ A: g0 ?
@.HasOrder := false;
/ [; C& A- b5 v- W0 Z% b @.DrivingHome := true;
# q! a; ^( j; O) S7 C% x- \% m8 } rgManager.tryToStartTransOrder;
! l; U, K5 x7 ~3 p if @.Destination = void. x/ r" |! M# f- v8 \$ ~1 x
then -- no transport order for vehicle @
g7 O; L4 k$ N @.Destination :=1 n0 Q/ _' C/ M3 U( V7 @
rgManager.nearestFreeStation(@,track.~);
; }4 z; N+ Z+ d newDirection(@); % {; E' x5 S0 U3 }5 T# D
if @.Destination /= void then
5 d: d# E) p" A; v/ g @.Destination.NumReservation :=* u" {4 e" }3 y+ L; V
@.Destination.NumReservation + 1;
N) A7 D3 ~- {' o) u: G* U end;" D/ Y0 \ K3 N
@.CurrIcon := "drivingHome";
( W% k2 n" L% n3 ^! d) K @.DrivingHome := true;
- O& i7 N6 Z$ {+ k end;
7 n$ v3 Z, o2 }1 b9 b8 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 i- o- |! J$ J9 v
part := @.transpOrder;/ ?0 O. j# ~# v# n0 |# k% q
part.move(@);-- load part2 e7 K$ Q! L. U
@.CurrIcon := "load";
2 D* d6 W* K4 Y9 @' @ GlobalDistObj := part.globDestination;
7 w4 v7 c& ?" `4 j assignLObj := rgmanager.rgAssignL;; n/ } q) P" v) z$ u- j
row := assignLObj.getRowNo(GlobalDistObj);
$ Z; ?& i3 E$ ~& p if Row = -1 then -- since 70
0 R& x% @* ~. ]5 K* j) ^2 n9 z if lan=1 then
$ }0 s/ I& [4 [9 ]7 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. ?; z7 f9 N9 z' q" a
to_str("in der Andockstation: \"",?.~.name,"\""));
* ?7 j( U- L' s3 Z2 x3 T$ [0 `* x else
+ Z! _5 f& H8 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' ^! {% p* C' O, V9 D* Z }: p to_str("in docking station: \"",?.~.name,"\"")); 8 ~, ]5 C0 k: x
end;$ T8 d5 a* ]3 c# v
else2 i- G: a2 s6 I; ~8 F
@.Destination := assignLObj[1,row];- S5 g3 Q+ O2 ^. g
end;
g* w' w6 R5 Z0 X& Q newDirection(@);, Z7 x, |& E4 o o* z& c
@.HasOrder := true;
' J% ^. S' K& ~2 n+ h8 | end;
]& p F C, z end;
. K+ r! q8 m1 v4 R* Vend; -- of the method
. E$ S& @+ u" Q: D* W# P; a/ c |