/* called by: entrance ctrl of the object 'track'
$ ?. p- o% g% k8 y C*/, G7 M! ^5 O# {+ x4 I4 t
is! C8 _6 s1 t9 E) {; P1 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; r! ]6 s& V/ r4 f
do
% f! P9 L+ g3 r, T! ]" N' ] Lan := rootfolder.Internal.Tools.AOLlanguage;
2 q" [( y: o' u/ U4 G$ ^ U6 _ if current = @.Destination -- else return. l% E) I/ t6 N5 [% m
then
$ ?' e) w/ X; Z% v! v* N0 f/ \ @.Destination := void;
I6 i5 c" B" ^4 s if @.occupied then( p9 U( ?0 M- |7 X# r
part := @.cont;
" r" ^; R* t. ~& w5 d9 C @.transpOrder := void;
# ?! r0 Z6 b! X1 O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 b) x* k0 `7 @1 n: M, g$ T9 q
@,root.eventcontroller.simTime);7 {% B, P# z) F0 q
@.HasOrder := false;
+ ^8 }# C ^0 q0 M @.DrivingHome := true;( p, w0 T. Z+ p
rgManager.tryToStartTransOrder;
" Q2 r9 a3 y% D' Y) _" L0 b if @.Destination = void/ Z( U% ?+ X$ ] C: ^/ n- m) u
then -- no transport order for vehicle @4 ~# q% ^' ~- @9 {
@.Destination :=( \/ [6 z4 B6 u
rgManager.nearestFreeStation(@,track.~);1 y' h. _) s: _9 m# l" V5 T4 F
newDirection(@);
2 V8 A. p# F. i- q4 h if @.Destination /= void then2 g4 `/ a) L8 g6 t! @/ J/ y
@.Destination.NumReservation :=# Q# K: T' ?* B6 ?& e0 m% r, R
@.Destination.NumReservation + 1;( o9 Y* ]0 W& V4 R. u4 v P
end;# a+ s% G1 V- F) V U. s- B
@.CurrIcon := "drivingHome";% L0 I: E9 ` {6 h. z, d' y
@.DrivingHome := true;
' q4 j5 e( x, e4 q# {* N end;) i0 N8 j, S' G9 }" W! L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* e2 [/ E/ H$ S" \& |. O6 T4 { part := @.transpOrder;' W* R T7 |4 `3 J4 }+ a) J* A& i
part.move(@);-- load part9 T2 l2 ]/ d. K5 D" g$ z' E* K" t
@.CurrIcon := "load";, Q* K/ Y; V) C7 p( l
GlobalDistObj := part.globDestination;
7 g0 l3 Z$ p) g# |4 Z3 {# n4 Q, F/ G/ w assignLObj := rgmanager.rgAssignL;
' i* G& I4 A( `' V: J( ^2 } row := assignLObj.getRowNo(GlobalDistObj);/ i2 Q( ~! @! q* J2 G; w3 l
if Row = -1 then -- since 70
! c6 |5 p, Z, f$ R! K7 W if lan=1 then! ^: x+ n- o2 u$ @/ _) [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; u2 }. Q- v' v( R$ U1 S# U
to_str("in der Andockstation: \"",?.~.name,"\""));
/ ?. t" T; R: X4 @ else5 t$ n0 m; ^' b# i( X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; Z- n! l+ d) |4 Q' m* j to_str("in docking station: \"",?.~.name,"\""));
" {+ h1 {9 R4 j6 Z) D end;
- R, D1 c! ^6 y* s4 d else2 ~9 j1 Q0 q) B" S6 G% K7 G
@.Destination := assignLObj[1,row];
: t+ {- y( [0 U; a. r end;
% [3 |+ b$ n, l* d' s" U! N6 \& ]; Q' N newDirection(@);- V7 W( X5 G7 k' F
@.HasOrder := true;
r7 c8 @+ M6 t; E% z+ X3 g end;
4 L- a2 y7 o I3 o0 r end;
5 q( w d, A; x! i1 y/ q; `end; -- of the method4 s5 B0 }2 W K( _/ C
|