/* called by: entrance ctrl of the object 'track'
. P( s0 _$ V/ L* N+ \*/; F. J& T4 A0 ~3 U7 s
is
- D- a/ i2 _, V3 M9 v# u$ \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 [; S! ?$ M& |6 q3 n9 J9 V. bdo8 n2 |8 }# z6 r9 f# Z3 |2 I( W# H( m
Lan := rootfolder.Internal.Tools.AOLlanguage;9 g5 B. z0 ~8 E2 N' y/ l9 m' S" v
if current = @.Destination -- else return
+ w- e" p: ?/ [# U4 ]5 |& h1 s then
+ e7 _2 y9 M% H3 x! E @.Destination := void;
6 n5 X- t4 R0 c4 u9 I/ u& s6 {; L if @.occupied then4 _# J! D0 Y" k8 o- U0 ]1 r* u
part := @.cont; R0 P& N+ q, M7 P5 y
@.transpOrder := void;
$ k; Y" a/ ?* N6 q0 l4 O2 x( k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' t* N. \9 T7 P! {, E! R9 v @,root.eventcontroller.simTime);+ C8 H7 o A" a. u
@.HasOrder := false;3 L1 o7 X _. L9 y q, J% v
@.DrivingHome := true;
& |- l& L6 o, R7 N rgManager.tryToStartTransOrder;) E0 ]0 D" g5 S- q5 U
if @.Destination = void
# `. c) }! G$ }+ ]& O then -- no transport order for vehicle @+ k+ g8 K3 B# ~8 a
@.Destination :=
7 n2 Q/ X. a* }, n: t: m6 B rgManager.nearestFreeStation(@,track.~);
0 U n( _5 ^" X$ O! W7 X newDirection(@);
: u% ^. G- M: L4 p3 I# R+ A if @.Destination /= void then
2 W2 a, z0 T) G+ e" A @.Destination.NumReservation :=
" H2 i: y9 @9 i' T* F @.Destination.NumReservation + 1;1 {7 s% i- T. v3 P: A. ]# Y9 o$ @
end;
3 A* |! C% H9 _; d- L. S* z4 d# d @.CurrIcon := "drivingHome";$ l9 @6 t8 ~6 E0 R5 a! F
@.DrivingHome := true;
% r1 Z0 S+ ?: z1 n( @; ^5 l3 ~" A end;
/ E; u$ R4 m u5 h7 S0 Q. n else -- the vehicle @ is empty, both vehicle and part are in the same dock station; G3 a/ D; K/ t# P& p
part := @.transpOrder;
) K, O/ M+ F: }6 j$ O2 Y! k$ | part.move(@);-- load part
$ f" Y/ J) a5 e4 [5 k/ b @.CurrIcon := "load";
% R; K( B3 l1 O+ ] GlobalDistObj := part.globDestination;) n) O& i) s+ m+ ]2 z; |
assignLObj := rgmanager.rgAssignL;
0 i7 U# A! S6 u6 I, o row := assignLObj.getRowNo(GlobalDistObj);
& R' V, l9 E- h if Row = -1 then -- since 70
( g9 B5 D+ k. B7 ` if lan=1 then
8 s" f. @6 P% f5 N4 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ b5 m8 `! \$ p, h
to_str("in der Andockstation: \"",?.~.name,"\""));) `6 P% R* n9 w5 L$ t' a
else
' |9 K6 t0 V. j) t+ j; {. `( k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 } B; h- }8 Y% r to_str("in docking station: \"",?.~.name,"\"")); & }# c- X# s5 K! U: m; A( X
end;$ B& `% x' e7 {, H( _- A7 ~
else9 v6 }5 E! g, V: i6 G; O
@.Destination := assignLObj[1,row]; {1 L9 F4 ^* ~$ u& N! r: l% j
end; 9 S2 U* ]' L; ]8 A/ z& B
newDirection(@);
6 M( T' ~, [ d @.HasOrder := true;
# O! H: V6 I5 |! ^* i end;
/ [ e9 ?/ e- r% k# n6 ?4 D6 u end;
6 i1 u' H: h* J3 b9 x1 Tend; -- of the method
7 h) ?* H, K* U& I- D |