/* called by: entrance ctrl of the object 'track'6 w; w' Z% \$ P5 L: P" @
*/
, R! K" c1 d; w% \is% y z8 n& ]; q/ |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, h$ ^! `' G' \1 ?/ e8 g8 I7 w; Cdo3 q% ]3 P7 b/ z5 \9 z% d
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 w9 z+ t; c8 G, o if current = @.Destination -- else return3 e0 O: J0 q+ T5 l j$ m i
then* \" N4 Q; S& p7 Y1 V/ N1 X: J$ x9 I# D- c
@.Destination := void;3 j; Y% n) S7 R7 f9 W! S
if @.occupied then+ w5 |9 R% m- p2 W
part := @.cont;, C3 |, |. a7 L6 C9 }2 m
@.transpOrder := void;, i0 H, H( h F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' _ Y+ c+ ~! v6 n& k. \ @,root.eventcontroller.simTime);: D' O/ m4 x0 O: s
@.HasOrder := false;6 S6 z9 \/ F- w3 g5 Y# T' i
@.DrivingHome := true;
5 M+ o% z- }% B. \ rgManager.tryToStartTransOrder;# `+ J, X; } `9 P* r. y
if @.Destination = void
, A2 ]7 n# X. U then -- no transport order for vehicle @) o& A. ^5 W& w9 z
@.Destination :=
+ x1 Y9 p" Z) K: V2 D rgManager.nearestFreeStation(@,track.~); f" z3 @! C+ \! W2 C
newDirection(@); ; s( ~; v; f' w3 m( G: G
if @.Destination /= void then
2 E4 a) \; [. [; X @.Destination.NumReservation :=
% p+ z0 \% m0 e) D+ d @.Destination.NumReservation + 1;1 h7 n! R& \3 n& [7 j/ k$ s+ @
end;- H _7 F* y) t* _" z! w
@.CurrIcon := "drivingHome";
6 O* D4 P2 o* @ @.DrivingHome := true;
4 F2 R, J( p. ~ end;
+ C) p, G, n0 ~8 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 ~+ u- {/ o, ?- r% k3 q% ` part := @.transpOrder;
' H: h) n* I g1 x% J) H part.move(@);-- load part) d% s1 {; L3 Z
@.CurrIcon := "load";
# F- ?4 T. w4 e3 m/ y z GlobalDistObj := part.globDestination;
0 w2 k$ w% T- p assignLObj := rgmanager.rgAssignL;
+ m* Z3 Q3 e$ d% ] row := assignLObj.getRowNo(GlobalDistObj);
6 o4 g. G/ Y0 i if Row = -1 then -- since 70! k! W- v3 S- x% b" K& z& L! U
if lan=1 then( H5 F5 U8 m4 e6 f8 U% k1 r" ^. r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ~. H, Y. m6 C1 w( L
to_str("in der Andockstation: \"",?.~.name,"\""));
+ B0 E% J- L* [ else: H, \: }2 d: Z) Y$ |9 l1 N# W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 v* t6 w9 s6 l# [- {* q: v
to_str("in docking station: \"",?.~.name,"\""));
6 o" H+ q+ I% I! T$ i$ r end;& w, W9 n3 z) }' C# Z
else
1 q7 k# a, i5 \- ~ @.Destination := assignLObj[1,row];
( N) K! i4 G, j t% _3 h, q. H end;
4 v) g! o4 z% D newDirection(@);
, G) }1 B+ p3 d+ M/ [8 U @.HasOrder := true;0 D/ ]/ W M: y) X/ O; {
end;
2 ]# F1 M- |. }( X: X' R end;
" E1 T* w; A8 V8 ?end; -- of the method7 l% p8 F% N$ B: c
|