/* called by: entrance ctrl of the object 'track'0 Y6 k/ S( _/ t) K2 ]/ \
*/
4 D! w$ K; ?$ K# m2 Wis
j$ m2 O" }! E2 ]$ `0 h6 }* ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 C& N+ s# b+ S8 @' ^do) H! c% ]( R+ ]& s
Lan := rootfolder.Internal.Tools.AOLlanguage;7 }9 f! R+ s0 y0 r6 u- N- o3 o
if current = @.Destination -- else return
9 P6 G/ t L: x then
' d ?0 V7 \' m" o' h) ?5 x! k/ j1 x: ] @.Destination := void;: D! ]) D' I/ e
if @.occupied then( \$ r$ L- U* z
part := @.cont; {, x: k- L7 G: e
@.transpOrder := void;
9 l) [2 A0 w9 W3 w- O& v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 F7 \7 w9 A4 Z8 Q! Q( o, _ @,root.eventcontroller.simTime);* C- ^' v8 Q4 L3 Z3 z
@.HasOrder := false;
9 v$ M7 L2 h( v8 M8 b @.DrivingHome := true;
9 g S; L% h7 W- o rgManager.tryToStartTransOrder;
; l7 U/ n# B5 a5 O: @( Z! _! n if @.Destination = void
8 p Y9 S. d7 e k1 s then -- no transport order for vehicle @- T9 L4 {% _4 v' R$ P- _% \
@.Destination :=5 _* T" _/ Z& F
rgManager.nearestFreeStation(@,track.~);
) ?: Q. U+ @" C: H newDirection(@);
. e4 @ }* ~$ { if @.Destination /= void then
' M2 M; ~* i! E6 ^# l1 C @.Destination.NumReservation :=& U) R; F T# A" B7 F( z) M. L
@.Destination.NumReservation + 1;
( U3 \5 l! k! @! \/ o% ] end;' ]8 R7 U4 t# v. E3 c5 k
@.CurrIcon := "drivingHome";! A0 [# h* J! L
@.DrivingHome := true;- a1 y7 Y! Q4 C! q+ H
end;
6 K2 @' r" D- c' Z* @- x else -- the vehicle @ is empty, both vehicle and part are in the same dock station% [, ^- D6 y! I5 L& {& G8 O7 `
part := @.transpOrder;; N' `7 i: y4 i- p4 }$ s
part.move(@);-- load part! x t. W- K8 l7 z; S3 e
@.CurrIcon := "load";: ?( U% o+ ]5 C2 X9 P
GlobalDistObj := part.globDestination;- U" X1 p1 m$ D7 \) u
assignLObj := rgmanager.rgAssignL;2 i2 M, J, g8 E3 u6 r. J" A9 e
row := assignLObj.getRowNo(GlobalDistObj);
: o0 n; o) w& k7 k if Row = -1 then -- since 70
7 ?3 ~4 p! k4 p4 A) v# i( m' R( l: a if lan=1 then/ M7 O8 G+ m; G0 ~- U3 s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ q9 g/ e9 ^+ p x- x to_str("in der Andockstation: \"",?.~.name,"\""));6 ^) a9 H: r. w9 E
else5 J8 j! a! F% N; f {5 C" U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 ?" N2 A+ z* Q+ L5 l6 \3 X( F, p5 ` to_str("in docking station: \"",?.~.name,"\""));
2 g1 c! y9 Q, r: R6 a$ O end;9 D+ `8 R" l6 }- h* P: L' N( _4 o D
else4 [* c! q" ?0 r$ S" I5 e: d0 L
@.Destination := assignLObj[1,row];; Z$ e0 T/ r' G7 d' i! G
end; + q6 w, J& C0 e8 h
newDirection(@);
) r0 I" x Y1 p+ I4 d9 U @.HasOrder := true;
5 S9 s( q5 G8 V) |* m end;
9 O$ F0 m. e& {$ e$ G8 F end;
( K" i8 E8 [- S6 ^6 d2 N' bend; -- of the method
m2 @7 _; s. {0 \; c Q |