/* called by: entrance ctrl of the object 'track'
8 I0 M% q3 t$ l9 O$ h: p$ ?8 ?' N*/
: z8 C6 V- K' e; dis8 f' H+ m/ [8 D! v! p* |& n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
K+ R+ r7 ^# n9 Y. O. fdo
+ j7 e; L( o2 m8 ?) E* _1 a Lan := rootfolder.Internal.Tools.AOLlanguage;$ D! j2 B# {8 P' s+ u# \
if current = @.Destination -- else return
6 ~ p8 U/ D! e then6 ^6 f$ j3 n% i* l) T$ u5 E0 {/ [
@.Destination := void;4 t" x s+ p8 o9 ]) k. H) O
if @.occupied then; l8 I- A, ]9 F$ Y3 Q
part := @.cont;
7 p3 p8 d8 R' g* _ @.transpOrder := void;0 l+ t5 j% d6 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% N$ Y9 w s- p- R1 P/ ~- b/ n) }& k @,root.eventcontroller.simTime);
. g. q' w0 e7 o+ k" n1 u0 F0 H @.HasOrder := false;
$ L2 S( u5 v6 h @.DrivingHome := true;
- C8 l8 ]; Z6 j8 e rgManager.tryToStartTransOrder;
0 i9 L5 v2 d+ s- e! J; g1 \, B4 X3 K if @.Destination = void$ d- n9 a' q: r2 x
then -- no transport order for vehicle @& F& i1 A* P( ?# T. a5 c+ R
@.Destination :=$ V g# q+ V) L" x% S
rgManager.nearestFreeStation(@,track.~);
6 I$ {# {# m9 R: v newDirection(@); : l' N! c% G: T
if @.Destination /= void then
1 j( ?# n/ {' j& Y% W @.Destination.NumReservation :=
3 R4 h3 H4 B) @9 A& H @.Destination.NumReservation + 1;& l2 K+ b) t3 e; X, Q
end;
, y6 g" w$ O6 M3 s1 x7 G9 m @.CurrIcon := "drivingHome";2 b, X. d7 d$ T+ c
@.DrivingHome := true;6 R4 _6 ~# a; @) j" Y
end;
* u% G: F+ G( b5 ~6 w1 n3 P# n: G3 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ W/ L, z2 \, u
part := @.transpOrder;8 h7 r, a1 E3 A2 v6 P
part.move(@);-- load part
1 v8 d b3 l k( x% V @.CurrIcon := "load";
' Q! w; R/ v) z2 I, ^ GlobalDistObj := part.globDestination;* X3 N7 ~6 o! u$ P
assignLObj := rgmanager.rgAssignL;
+ R1 _6 O( X* x) o3 Z3 |7 b row := assignLObj.getRowNo(GlobalDistObj);
$ x( |. e c. n8 E# D+ u0 W if Row = -1 then -- since 70# x+ k, V9 _$ p4 B* ?! x* k
if lan=1 then9 e/ n7 A- _4 w3 C0 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; c w( W2 d- e1 D# d0 t to_str("in der Andockstation: \"",?.~.name,"\""));! `2 s' u3 \( j# ]5 e. G3 s* a
else
y& Y$ M3 {$ `5 g: F1 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 a3 [0 |0 I9 X% ^7 X# { to_str("in docking station: \"",?.~.name,"\"")); : G* A- j' G# M" s6 Q* o
end;
, v4 N; H4 U( c" s+ I6 j3 I3 O else2 A. l' G/ J4 S7 K$ \" S# c5 z
@.Destination := assignLObj[1,row];
* G+ S$ _/ E, `2 f end;
) c/ J* _: _: s6 i* m newDirection(@);
# p5 |- t: a" \! A, \9 E @.HasOrder := true;
+ y' h3 i1 W+ J9 [5 u7 w* a end;
# C! w: m% F% h3 d; G2 G6 b/ P; i end;# O @3 z& q; }2 L8 F+ n5 m- c- v
end; -- of the method
- r% |( {! I$ j+ t6 @ |