/* called by: entrance ctrl of the object 'track'2 r; ^( a7 Y0 e d/ G/ V
*/2 u' Y/ y9 u0 z3 e
is% C1 i1 S9 T k# h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) ?* k& F: M- |
do/ e; T8 a# o$ B/ Q# n, c Y# l: l. c
Lan := rootfolder.Internal.Tools.AOLlanguage;4 F( N' S5 B% ]+ w: ^& ^8 E+ ^
if current = @.Destination -- else return
: F# H5 t" Y; R3 a& D" o) [ then
& Z+ F7 T, a; l+ y# D @.Destination := void;: v; E; `( F- c- h0 e' r
if @.occupied then# x7 l) a7 M. F6 {
part := @.cont;
0 q0 x3 a3 _ H7 W" E3 L7 M4 y" x @.transpOrder := void;
N4 ^4 t, U: A" G' Y4 g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. E- k5 v5 z$ Y9 v @,root.eventcontroller.simTime);
( i6 b8 _ Z' O8 }+ E. x @.HasOrder := false;
5 E9 J5 s/ M" r; C @.DrivingHome := true;+ {/ V; }. J* K2 W# U
rgManager.tryToStartTransOrder;
: h% F: k1 Q8 ^6 q if @.Destination = void
9 \1 m5 s: s' [+ Y2 Q7 O+ Q! \ then -- no transport order for vehicle @
- N3 T$ v3 Q2 Q! \" E @.Destination :=( Q5 M" i; T$ I& i) X2 V
rgManager.nearestFreeStation(@,track.~);
# R: q' s& r4 {' l2 M# A newDirection(@); ' ?1 P5 `7 y. u, k
if @.Destination /= void then
; u; ]3 U5 k x @.Destination.NumReservation :=
# h1 b9 N. e( h4 l) Y) Z" U! W @.Destination.NumReservation + 1;
^6 {3 H6 o U end;
( d0 U M$ _+ X, p7 O @.CurrIcon := "drivingHome";
# X; K \. l X @.DrivingHome := true;
4 d2 }0 U/ x' z N end;/ \5 z! k+ m l$ H3 S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 S2 L+ r3 @7 m& ]0 j/ _/ u
part := @.transpOrder;
+ f, o6 Q4 T: ~; v! [4 B' S part.move(@);-- load part
7 A7 I# d# Q. X3 C2 m4 Y* ^ @.CurrIcon := "load";
7 q! |1 ~7 _$ `8 K4 m" ]* E# J- {7 g GlobalDistObj := part.globDestination;6 v, i$ V3 c/ Z$ p
assignLObj := rgmanager.rgAssignL;
R# c) Z% o% L0 W5 h. d8 I6 ?3 ] row := assignLObj.getRowNo(GlobalDistObj);# f, V7 @; o: b& W* D7 N2 _
if Row = -1 then -- since 70
5 o) r5 T1 I7 ~. z5 d/ S. } if lan=1 then
4 @$ |. B5 [' L" k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( k& X1 y" J4 i2 `( |' g3 {4 r
to_str("in der Andockstation: \"",?.~.name,"\""));
3 |( c1 C" E' Z" [. L. K else
0 U( X5 x; q: a3 v" N$ t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ` d' t- O; B to_str("in docking station: \"",?.~.name,"\""));
% e$ K+ m/ _ ?+ w; [! h* i+ J end;
" t3 m5 Z- r7 K/ X' d else
% V& Z; h3 f) ]" ?( ~9 W @.Destination := assignLObj[1,row];
0 l% N$ f s" m6 p- f; e end; 3 T0 o2 K5 b# S0 }5 j/ t! ^' ?2 n8 l8 F- x$ s
newDirection(@);
5 X, V3 H6 X, e8 m/ Y3 E# i @.HasOrder := true;
: L$ v/ \5 p7 ^2 l0 ~ end;/ K. }/ I# ], A3 P
end;
* B: {$ i2 D" E1 yend; -- of the method4 q. d% l8 N: L9 O
|