/* called by: entrance ctrl of the object 'track' a+ @1 } c. P/ P" l5 N' t6 B4 c
*/
5 k$ j0 H' x/ C+ V8 G; t7 _& Tis
3 s& ]& T/ |* o+ p4 r, Y/ C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% \) d+ a( n. N* [* H% Edo' V: m5 c5 C1 s7 Y/ N
Lan := rootfolder.Internal.Tools.AOLlanguage;
: b5 s2 a3 @. y1 V+ R) [0 |5 b( U( ? if current = @.Destination -- else return3 x: P; M% v9 L( O+ s, ]# q
then
2 n' r1 R6 F! d1 `0 C. ` @.Destination := void;2 B/ U7 G3 e' z
if @.occupied then
( N$ F& F" a% H' a+ h0 X part := @.cont; k1 W8 z5 D& X! |6 h t) X. X
@.transpOrder := void;
9 e6 P6 N) K( f, L! n/ H9 D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ |& X: S( _" F0 E3 R3 j @,root.eventcontroller.simTime);
# p& e( ~1 g9 G. P0 k m! _+ z @.HasOrder := false;( p2 O3 y- W1 B
@.DrivingHome := true;
: m* g b. \3 { rgManager.tryToStartTransOrder;
3 K* |1 h6 B7 s9 K3 ?3 k if @.Destination = void
, J' P3 r: p* q2 Z; m! i! Q3 @ then -- no transport order for vehicle @
, U" l1 e: C1 m4 U8 `# n @.Destination :=9 T g) X! W/ n) r0 t3 n
rgManager.nearestFreeStation(@,track.~);5 p$ b+ d; x: ?+ `. ]: S2 ~
newDirection(@); * z3 q3 t5 u6 I
if @.Destination /= void then
* L" g; u5 B# p+ g G( y5 K8 T @.Destination.NumReservation :=
$ [5 }$ f. O+ r8 P% a @.Destination.NumReservation + 1; S3 |: P5 |1 p( k4 a9 }/ n
end;
1 a, i/ k: B6 ~6 a0 N0 b: r" R: D @.CurrIcon := "drivingHome";; q4 i& N- e f# b* D& U7 C
@.DrivingHome := true;! C( @" t- d4 Z# T* T+ b
end;2 X3 b+ G: ?& J7 w9 N* m& i# R6 C1 @* k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. x- e! ~8 i; Q& v: s part := @.transpOrder;
& b! v2 `2 j( s3 ^, M$ W# H1 F( t part.move(@);-- load part/ o7 X; }5 ? o$ K1 j1 [* ~
@.CurrIcon := "load";
: h& J2 L) a+ w# `1 V T. a& q, q" Q GlobalDistObj := part.globDestination;
) s+ y, J. n5 M9 Q* F q0 E4 l assignLObj := rgmanager.rgAssignL;) B: C: O+ d6 ^' f
row := assignLObj.getRowNo(GlobalDistObj);
0 {6 i2 O3 n3 o( m. [! W if Row = -1 then -- since 709 a# J8 o. d5 y( h0 p* H, q
if lan=1 then8 ?1 f7 v0 P% g" ]0 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; |7 {1 I2 |- ~' @7 P5 ?
to_str("in der Andockstation: \"",?.~.name,"\""));
* q% C) X6 |+ w. ] else# u& \5 @& Y W9 j$ Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) f% ^( s( } N Y2 E. c. T' S to_str("in docking station: \"",?.~.name,"\""));
6 j% i- m( @0 f, p end;$ h. h3 V5 \5 [8 W% {( t- P
else
2 i9 M7 c" c- L& Y1 v @.Destination := assignLObj[1,row];/ m }2 ]7 M b3 Y% a4 n; W# {* J) B
end;
% E- n* r1 x: U! z8 L newDirection(@);9 F# @# y3 X; a+ x! w. \/ ~6 @
@.HasOrder := true;
# u: O+ v6 a0 _6 v5 x end;' }. B& a- Y9 e8 d
end;
& ~$ R1 t: O) f o hend; -- of the method" o7 z6 [3 G8 Z; u% }& l* _2 u' Y
|