/* called by: entrance ctrl of the object 'track'% K9 c @1 c9 S/ n+ e' T
*/. }2 v8 m! |. k5 o% _
is7 M7 G- ~, s Z6 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( `5 V& M: {+ s" r6 y9 pdo
" a7 B! S% I3 b. i$ D7 V2 t Lan := rootfolder.Internal.Tools.AOLlanguage;1 k8 O8 p( R* ^( v
if current = @.Destination -- else return
8 {3 c) P6 J1 ~9 D then: Y4 d! c3 O% _* V
@.Destination := void;
. ~, M7 E( D+ ?& C/ A if @.occupied then9 ?8 S: b4 `5 U7 o& r0 F
part := @.cont;
8 x" w* \! ^5 M# `' U @.transpOrder := void;4 \: ^7 E3 A" K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 B1 S4 n, |! @4 H) }/ [
@,root.eventcontroller.simTime);
4 {+ L$ f0 { H) f! l0 I @.HasOrder := false;3 y; P S% v6 ~$ \7 I
@.DrivingHome := true;
' n3 P* @, k* q8 G1 r/ U/ g' | rgManager.tryToStartTransOrder;
0 g- }4 b7 `- i4 m if @.Destination = void
/ U0 Q! F4 t |+ s! W then -- no transport order for vehicle @* ]% F0 j" P( n& M! d4 P
@.Destination :=
& W- O4 O( d0 t, s& g( ^6 N rgManager.nearestFreeStation(@,track.~);: L' ~) R4 k* U) }7 Q1 E, ~
newDirection(@); # a9 K+ [7 e# ?* q, D
if @.Destination /= void then9 F1 n( R& [7 q+ |# H1 L) H5 a
@.Destination.NumReservation :=# m7 e& T$ N G* {! D5 N% D3 v1 D
@.Destination.NumReservation + 1;! D' \' B9 Z9 C4 P. }0 ?
end;
- j$ Q# v" }7 e @.CurrIcon := "drivingHome"; d/ y8 c# K/ {7 h3 z6 ^4 ?
@.DrivingHome := true;
" O* B, t4 c$ E8 h, c( s. h# x7 I3 e end;
* t- z% n* B. n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; ~& ]6 |* J. h/ b: M$ Y: U+ u4 f part := @.transpOrder;( w* [9 L/ `: M1 @, F9 z7 L" Y) a
part.move(@);-- load part
+ x7 w' N! H1 \) j3 F- t% V1 M @.CurrIcon := "load";
* T; ~) S S# q' i; i! N# { GlobalDistObj := part.globDestination;
; _* ~# _/ {' e4 ^, T7 o. s9 s assignLObj := rgmanager.rgAssignL;
2 e7 o; v( d0 w9 p( Z, J, l3 p row := assignLObj.getRowNo(GlobalDistObj);% c* {2 C: s y# A d1 E6 e
if Row = -1 then -- since 70
, z* y! Z* t$ d( j if lan=1 then
# @/ C% j3 g p i$ W2 S6 W2 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' D4 K6 p, I8 v
to_str("in der Andockstation: \"",?.~.name,"\""));
+ D$ d# s4 O. H' W7 ? else
8 T: U5 S3 m/ d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) X: G) B/ W' G+ i! f
to_str("in docking station: \"",?.~.name,"\""));
8 X. O! v1 x4 l. w) K3 |9 @ end;4 m9 C: ^: T$ d, x+ i* u( O; w
else
Q5 b, i7 P% k' s( X/ o" _ k3 N3 m! ? @.Destination := assignLObj[1,row];
0 c) r) g3 q" _ end;
1 E" J! | W: \) F3 V newDirection(@);
& a/ G- x4 N2 ^% _; p! m+ K @.HasOrder := true;) l( B2 t$ \- q# v t
end;. J8 ~& k7 I6 S& U v
end;% c; ?. \/ t' C6 c- w
end; -- of the method
6 ^7 A2 c! ^, t* x |