/* called by: entrance ctrl of the object 'track'
2 b+ x* a S- p; o*/
7 d( [' H" ^% N" E& dis
4 A3 T0 ~( T! t' } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Z0 A6 }1 c% D+ H0 n$ A) Bdo
# e: A0 j9 F" z: F/ X Lan := rootfolder.Internal.Tools.AOLlanguage;& B8 I; W3 t1 X: n( L* F
if current = @.Destination -- else return
) F, \/ a! ~) c6 D, P+ P then
' U$ A: A9 D' N2 ` @.Destination := void;
; }/ u( n6 R* f! S2 l( t. i7 k if @.occupied then
1 C1 V y5 |! D( X! k0 r part := @.cont;' c* P6 x* A2 Q0 T4 q2 U
@.transpOrder := void;: G5 u% s9 l! g) A! Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 Q6 y9 x+ M6 W2 q: a @,root.eventcontroller.simTime);1 |9 K3 B' q8 o8 _3 b) e" f. y
@.HasOrder := false;
% p6 o1 o7 E) J( Q: `5 c# `* ~ @.DrivingHome := true;1 x& N$ v5 \# M& M
rgManager.tryToStartTransOrder;
+ T5 f- [7 E. W5 @4 J# L if @.Destination = void
0 l1 n( X, e2 J$ s4 i' L; m then -- no transport order for vehicle @( [1 D: a! i5 }: h
@.Destination :=" z5 l8 M) r- G; v0 O
rgManager.nearestFreeStation(@,track.~);
1 @ t* p5 X# j6 m- C newDirection(@);
; Y2 @3 j. q2 S& C6 S! G if @.Destination /= void then* B4 j: s, x$ Q5 i& i* K
@.Destination.NumReservation :=" C5 R/ O0 q$ K, {% X* M ~+ g
@.Destination.NumReservation + 1;
$ ^; C }& ^3 a$ c5 d2 P8 b end;
: _2 e9 f! X" O+ X, ` @.CurrIcon := "drivingHome";" F6 x% f9 A |: _
@.DrivingHome := true;# H: U# ]4 d. N
end;
5 ~) U' {; S4 m. R% O else -- the vehicle @ is empty, both vehicle and part are in the same dock station, o, {. j; y/ N! T2 F4 D
part := @.transpOrder;- ~% {2 {$ w- j0 L' ?1 h. E5 B
part.move(@);-- load part: A8 ~1 G6 a0 ], e% N
@.CurrIcon := "load";
- V, E2 J- j/ |6 s. ~+ e3 t8 i1 N0 ^ GlobalDistObj := part.globDestination;. ] ], b) p0 }- h) a
assignLObj := rgmanager.rgAssignL;" K r% @& I7 {% R" e1 v- d+ L/ n
row := assignLObj.getRowNo(GlobalDistObj);4 Y( r) O6 ?" \
if Row = -1 then -- since 70
1 C; H0 T, w; ?2 y. r% I9 ^+ z if lan=1 then( G1 E' L2 Q$ }8 `/ |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 b+ G) D h- Q; A to_str("in der Andockstation: \"",?.~.name,"\""));, n+ R0 F: Q( o1 Z
else
* p- m. x' n% n, v" @6 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 P W/ ]$ b$ V$ [1 f! C to_str("in docking station: \"",?.~.name,"\""));
# @5 R* C6 T o5 n D6 A' o end;+ o% n0 r1 W. ^. l. v0 _ Z
else
W% H7 e* u# X$ M0 y @.Destination := assignLObj[1,row];0 X+ D* P& S L0 n& t& X) {# f" c
end;
O; L2 L) t! Y, G/ ~ newDirection(@);
0 J; I( b9 n; ^ @.HasOrder := true;
6 q$ y( b, B& ] end;- w2 P! c! J" ?* x8 e' d. k
end;
. @0 ^6 ?$ x; p9 }3 D' tend; -- of the method3 g% E- K4 t. g9 O
|