/* called by: entrance ctrl of the object 'track' F& M7 R+ k0 n v# n
*/
* O! b7 |# |. I# Z: Q3 d$ t1 Cis) m' Q5 L9 v5 o. h: O2 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ F$ n1 Y- f0 v2 s# U' ddo: C# p% e0 i' m# _
Lan := rootfolder.Internal.Tools.AOLlanguage;; h8 x! a/ u: r Z1 L8 o+ d
if current = @.Destination -- else return% D0 K( I8 f5 N& ]
then0 p* j3 Z, f' Z- Y7 X- H- y
@.Destination := void;
9 P! y5 w) Q: l {8 b6 D3 T if @.occupied then
7 t1 r5 N3 V& P) l0 B _& X) \ part := @.cont;9 ` a6 M1 D% R
@.transpOrder := void;
U5 r" ]! B2 Q4 ]5 u; m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( i- H. Y4 [4 u
@,root.eventcontroller.simTime);
+ T9 w O4 Z! i9 b' M1 d @.HasOrder := false;
) v" {. b; Q& V9 g! C% e @.DrivingHome := true;
* t4 D* U, |6 c% r3 h rgManager.tryToStartTransOrder;' D9 W7 e. T: a( p
if @.Destination = void
& o* }. r( M& S( V' ]( \+ W then -- no transport order for vehicle @
) V2 g, ]) t, _' I6 a2 `$ H @.Destination :=2 m9 @/ S: U+ P% f0 s6 i: g K
rgManager.nearestFreeStation(@,track.~);
K: x7 g$ |/ J) a# b newDirection(@);
7 ?- {! d' g( I2 s. _" } if @.Destination /= void then
- N3 h! d+ ]; s* U+ d2 ? @.Destination.NumReservation :=
9 l" s. j* V8 k/ T* w0 ^; [1 A @.Destination.NumReservation + 1;4 i" t( D8 z/ q; j3 K) E c
end;: y. Z! e4 |. R' M3 K
@.CurrIcon := "drivingHome";
+ M" N# F% i0 @% t3 y @.DrivingHome := true;2 b6 Y4 p( I; g$ o$ {8 T# [
end;, w, q4 h+ x, }% [8 n. G# _7 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 {6 A' C$ [* {$ H }% e' U$ h6 k
part := @.transpOrder;
+ Q9 ]1 f0 B/ E3 L9 j* d part.move(@);-- load part$ z' O8 M4 ~/ ~9 ?6 j8 Z
@.CurrIcon := "load";7 J/ d* f+ Y" J4 G
GlobalDistObj := part.globDestination;1 Y3 b9 ]& o/ n5 N% W) T/ J7 t
assignLObj := rgmanager.rgAssignL;
, G) j. Z9 h- ?/ ` row := assignLObj.getRowNo(GlobalDistObj);$ G4 e# g! j* @" e
if Row = -1 then -- since 70
6 W V; r' R( M; @: J if lan=1 then
* G, Y/ i0 |( `' a% I9 e0 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; {# k6 h: P6 q- K, j2 m) h. n! X
to_str("in der Andockstation: \"",?.~.name,"\""));7 l4 o, u* n4 [* u3 H4 o7 E. _1 E
else
- J R, M i5 @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ ?% M( d$ {1 C5 ]5 F, P3 u
to_str("in docking station: \"",?.~.name,"\"")); 9 \0 b( N5 K i7 j. l
end;
4 m1 s2 l- L# {/ {& D' w5 f+ j else
5 [( \& J" L k @.Destination := assignLObj[1,row];
% U5 q: G9 z% C$ ^; T end; 1 d+ J$ B: [& q' K1 V4 }8 \
newDirection(@);
6 G2 A3 l. H! x1 H @.HasOrder := true;1 M' d5 [& U3 W0 O" o& D! a$ C7 s
end;
3 u# l% u( \% X/ L3 E6 q) y end;
0 \/ y$ j1 C; r. g( F9 ?( Z+ pend; -- of the method0 W2 C y' Y5 @. P$ U# M
|