/* called by: entrance ctrl of the object 'track'$ E, s e- o: c3 ~$ o! a4 L% ?
*/
, }8 m* N/ p+ X. Z) n- N: A% p! g1 p1 o! cis! F% L6 s$ o8 a" o6 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 U7 m! }; R( J% Y# t; l( i# zdo
3 w1 {4 k: N. ^( M. D) y c Lan := rootfolder.Internal.Tools.AOLlanguage;5 @, z7 C/ ^8 ?& r4 z
if current = @.Destination -- else return
8 W, b j6 [6 H( z$ L- N' o then( w/ d3 s- ~) l2 e* \/ r1 f: f
@.Destination := void;7 \- _! P$ G W# I2 n
if @.occupied then
9 S' ^+ k9 c/ z part := @.cont;2 {% o0 u" }( ]
@.transpOrder := void;5 O5 l# v5 x) y5 D7 Y: m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ W+ ] T& T1 F' L
@,root.eventcontroller.simTime);6 b [4 c, q- `1 Z
@.HasOrder := false;2 n/ e/ `. y; F
@.DrivingHome := true;
, T) u8 D% E% p# T5 j4 h/ w5 A' @ rgManager.tryToStartTransOrder;
; D9 B) z. d# x4 l. z* a if @.Destination = void) J8 v/ Q/ v. L/ x' U. H3 O3 Y5 M
then -- no transport order for vehicle @, `0 v+ G# K3 m; W7 r5 _
@.Destination :=$ i: a$ q" p3 w% e$ q' B6 m7 ~/ ? T
rgManager.nearestFreeStation(@,track.~);/ C" p: L$ k1 z$ d ]( ?
newDirection(@); ; v4 P# j! ?& B; O: u3 g
if @.Destination /= void then
% |0 a2 C! z5 |- l, ` @.Destination.NumReservation :=
+ j! c) |0 P- S$ n* ^4 [6 r @.Destination.NumReservation + 1;
2 M0 ~$ f0 o9 H; q8 o* S) ]* D end;
( ~# J$ M- `8 y% _6 T @.CurrIcon := "drivingHome";
& h$ W' c1 V7 i& d2 T8 r$ S. I( ] @.DrivingHome := true;, x7 @: A* q+ z; i
end;
1 C# R( U+ {: l2 U# J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ P! s; @4 j- U9 m0 x part := @.transpOrder;
! S7 ` M! x* G, Y part.move(@);-- load part
# N! `6 a* ?# V% n) {( x @.CurrIcon := "load";4 n' K+ l2 d6 x9 I' L' `
GlobalDistObj := part.globDestination;9 ]- y- y: h* V A; [1 m9 g
assignLObj := rgmanager.rgAssignL;
- {* G0 Q$ {7 ?- S. a! z row := assignLObj.getRowNo(GlobalDistObj);
8 {! Q) ]3 ?3 X' E+ o" S( i, k( h if Row = -1 then -- since 70
, x7 l. I+ M! L+ q if lan=1 then( U% V/ S0 @2 h! s- p- \% t& N. `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 _+ p! z/ Z: U/ `; Q( Y- D6 b
to_str("in der Andockstation: \"",?.~.name,"\""));: t$ f$ _# w' t# G) T0 n
else) D8 s h( m, ]2 i! x. ]. _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, a; X/ q! B7 x g* R! ]% C to_str("in docking station: \"",?.~.name,"\""));
. F7 x0 s7 Z& u& U) d5 I end;
* K" E# g8 F# X x else
7 X! G' R2 D6 E+ u @.Destination := assignLObj[1,row];: k& ?& D1 R1 c) U8 g8 h" f# W
end; 9 _% A; E3 X; n% z9 t
newDirection(@);
" I$ N& d7 t( [, c J" V @.HasOrder := true;
0 v( u; l! R4 R% H( C% N end;
8 q) B" G: D. O6 \ end;* Q$ H3 E* \9 k) K# W7 u$ {' B4 @8 |
end; -- of the method$ g! a7 J: H1 t
|