/* called by: entrance ctrl of the object 'track'
% O1 R+ l7 h; b! G& X: v& K! G% ]! q*/
5 K) P6 k9 {4 yis6 S2 u' a0 T$ w/ m. ~/ f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ v& f6 d; y8 W5 K, m" V+ [* F; Ldo
: D% k& L9 H9 L0 D* r3 g Lan := rootfolder.Internal.Tools.AOLlanguage;2 ~3 D! W3 d) I" M3 i
if current = @.Destination -- else return
5 n. {7 Z) J3 `$ C0 x' o then
2 q9 R. H* F) M5 v( L8 ?& c. e @.Destination := void;
1 Y# o1 p* h3 X' |& |+ B if @.occupied then, [7 z$ z3 L$ U! p' Q9 \! Y; |
part := @.cont;
/ Q" z- P# H1 }$ ? @.transpOrder := void;# |, g. |7 n$ m$ |3 ~$ n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: ]0 P" B& b1 P0 f/ s @,root.eventcontroller.simTime);
) \ G8 o7 L6 b5 u @.HasOrder := false;0 a( P$ s+ A2 p- A& v3 x
@.DrivingHome := true;
: M- }, o" d1 a" Y: b rgManager.tryToStartTransOrder;- Z6 M. p4 H4 b# P2 {4 X' f# S
if @.Destination = void
% V: O0 y3 Z! c7 b/ b then -- no transport order for vehicle @& I |8 j' \2 q/ p7 X
@.Destination :=
% H' F& l) a: B4 m3 I. Z rgManager.nearestFreeStation(@,track.~);
& l/ Q& h; d* e, C% |9 p; S newDirection(@); % r/ Z0 D8 u. k2 K8 r0 A
if @.Destination /= void then
- T" A- ~3 @( I& I0 H2 q @.Destination.NumReservation :=
0 y& _% F; l7 Z/ C* T @.Destination.NumReservation + 1;6 L0 x3 y, e; ^2 N
end;) \6 N+ ]; ?4 ~& ] N
@.CurrIcon := "drivingHome";
# w) i' @: F( w: S) t5 x @.DrivingHome := true;1 F$ w! M9 F$ D, r$ f
end;
# b% D6 u( H* _( i% o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ ?* T* u) ?6 N: J part := @.transpOrder;4 m# G+ X! `$ @2 L
part.move(@);-- load part
8 L% B2 d5 P# N" w' o, w @.CurrIcon := "load";4 q% _, u; Z G) G/ s0 V* t9 {4 @+ \
GlobalDistObj := part.globDestination;$ d" T& \; ^1 \- Z
assignLObj := rgmanager.rgAssignL;% f+ F# C D( P# m1 V
row := assignLObj.getRowNo(GlobalDistObj);5 r1 ?( f7 h, B
if Row = -1 then -- since 70" y# k. n% u* R( O; |4 {; }+ p
if lan=1 then, O. z( W4 U: Y! ?! ?* E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 m6 a a9 G0 w+ Y4 d
to_str("in der Andockstation: \"",?.~.name,"\""));1 L* J- }. L1 Z7 q9 f% K
else1 L4 @+ ^5 t7 s. c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 A4 I6 h+ O3 y; {
to_str("in docking station: \"",?.~.name,"\"")); 6 a+ z+ Q4 D ~( c
end;
; H* D/ `0 f! ] @2 ]/ } else
6 ^$ m) L9 a2 H7 c& f) Z! ?( | @.Destination := assignLObj[1,row];
& t/ B* V. p* o3 M/ O t end; 8 A8 j1 x* _3 t' u$ O; r, W: s
newDirection(@);
* [) ~7 i2 i& z) F' H @.HasOrder := true;) F' l5 X2 t) R0 z
end;
9 U& _2 k5 K9 h. Z+ X9 ? end;1 K8 ^5 k& B( r9 ]$ `# R: T
end; -- of the method
: ~ W% U) U7 ^' G) E9 b( x% I0 Z |