/* called by: entrance ctrl of the object 'track'" M0 V- R2 o7 b; k/ ^( N0 ]) p
*/
- @7 _5 [& _6 H9 Y+ V2 Nis
3 ]& G# s/ K2 _: @' `/ P2 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 y$ G7 e3 p* _8 F& I! J
do6 d/ s$ w( c! S4 d: w8 Y1 L+ J' t5 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;5 ?. }1 f/ s. V& z% j
if current = @.Destination -- else return$ i# X4 |" y9 a9 I6 c3 u( S" v
then
9 l2 A |; L- G2 ?# z7 \! s @.Destination := void;
) X5 c6 n$ w E5 v2 ` if @.occupied then9 l( T7 d9 C1 l: C0 e; h2 m2 Y
part := @.cont;6 e; ]$ i# D. p- ^$ t; _4 h. a
@.transpOrder := void;
: |' x$ P! v& t* V+ h9 z7 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 S5 p7 Q$ T7 f
@,root.eventcontroller.simTime);
& L: u5 ^5 \7 \/ j" s: k7 ^ @.HasOrder := false;
9 h: ?* p* c- a c @.DrivingHome := true;
7 C- z& ^) c0 e. M rgManager.tryToStartTransOrder;
D( \( v/ B4 u! `. Q/ Y/ h if @.Destination = void
7 }5 D& A- I* w: C2 F4 { then -- no transport order for vehicle @3 u+ L2 t" Q7 C2 Y
@.Destination :=
( L/ s+ n4 o* `9 M7 H rgManager.nearestFreeStation(@,track.~);' X$ o" v% v0 w x
newDirection(@); 1 [" \1 z+ I c* B
if @.Destination /= void then
: z7 U% A& y" O7 \# A7 k @.Destination.NumReservation :=' e$ G& \" X! _7 [: R
@.Destination.NumReservation + 1;
h( v5 p9 h' B+ {7 o8 P end;
( p$ a5 b9 d' t% ] @.CurrIcon := "drivingHome";1 p0 c, L; \" C5 s0 T+ c
@.DrivingHome := true;; Z* E( @$ b/ E) b, d: p( I
end;
3 G; q1 n4 p6 s/ i; e else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 f& E$ ]3 J7 A a- L* f6 l% c' m
part := @.transpOrder;
! b9 r$ f0 w$ m8 [" X3 c: S part.move(@);-- load part
9 S" r1 N# G( I( h, V, T5 J @.CurrIcon := "load";
- P# p/ ^# {) F" r. v! r2 n- W; V GlobalDistObj := part.globDestination;
0 q @6 p; s; x) G4 Y assignLObj := rgmanager.rgAssignL;* o/ |0 t" Y8 U) v5 \# _' J
row := assignLObj.getRowNo(GlobalDistObj);1 f+ e6 T, ^$ A, B+ J
if Row = -1 then -- since 70
! b2 c, n, d `; L* y i if lan=1 then
6 v* ^, J' W A. D8 K, h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- z/ B2 j. R, c( _- K to_str("in der Andockstation: \"",?.~.name,"\""));
% l9 b% V) m8 a ^ else
) {' f: P! V! t! G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), q: u8 T1 O$ r6 y# f+ W
to_str("in docking station: \"",?.~.name,"\"")); 4 v0 @0 k& K, ?+ x
end;: {7 ~6 d: b0 X4 c' O
else& B4 q. I* W0 t' [! @
@.Destination := assignLObj[1,row];0 P% L9 f5 j& y% o {7 H" {3 S1 X! w
end; : U$ F7 X+ q( |2 }; M
newDirection(@);- H/ Q* A6 K- C1 R& {5 I. W
@.HasOrder := true;
4 `$ s) g/ J8 Q% j end;
/ F9 y* S4 \' R1 m$ H end;
; A0 U* K) N+ n& F. |* F; o/ Uend; -- of the method
5 a2 ^4 X# e9 E/ n5 y: a |