/* called by: entrance ctrl of the object 'track'! D# N' P0 n& p0 @0 \- [9 s
*/
: |- l/ N) S3 {2 D1 t' wis
' N+ V/ D8 u; D3 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ V. v! w, c* V& j( }: \/ ^7 k
do7 W! E& P( ]6 B& H8 W
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 _( {% b; I0 ?7 z0 N o if current = @.Destination -- else return I `; h O+ m5 }
then
4 B( z/ w8 y- j3 n @.Destination := void;2 y/ ?% l( K$ r9 D+ y
if @.occupied then( C. E2 }1 a' z: L& j1 R6 }; h
part := @.cont;: `: e0 T' }3 {4 _8 n7 P, K
@.transpOrder := void;+ Z" D& O% h5 b6 l" a1 {5 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 Y/ m: H7 o& ~3 z! x: U. z9 M' P
@,root.eventcontroller.simTime);
* b+ a: U9 w, W- w6 M @.HasOrder := false;
; N4 v5 V8 w0 `0 S @.DrivingHome := true;
2 { _; y" o" z: K$ c7 } rgManager.tryToStartTransOrder;
! J' v, r9 D- M1 K if @.Destination = void
! `- g- ]- M. x! `& ? then -- no transport order for vehicle @
" a/ {! m# l- \/ e1 }% A6 s @.Destination :=4 |! V0 ?3 }- v4 ]$ O* |% q
rgManager.nearestFreeStation(@,track.~);
: }" M2 A3 G' N5 ]' I newDirection(@); + Z% J. J, Q1 O1 L/ O, G3 K3 L
if @.Destination /= void then, ~4 k* ] r- }2 a: k2 ~) F& \
@.Destination.NumReservation :=1 x r6 k: F. V+ \6 r
@.Destination.NumReservation + 1;
% w4 y" G. S& m3 e end;; N5 N/ T8 R& B" E6 [
@.CurrIcon := "drivingHome";
7 O* d/ `; s9 M8 x9 `2 T" C @.DrivingHome := true;
/ A# e$ \# W% T) ? _+ H- }* n end;# n/ d1 p; p: y6 d7 N" h. w* t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. v% h% E% ?. _% g4 B! V$ \. }) c part := @.transpOrder;
' C) z h. u J part.move(@);-- load part- |8 ?1 \8 O! ]; ~
@.CurrIcon := "load";8 l2 B% z* w s4 _ X! Z/ N: ?, c
GlobalDistObj := part.globDestination;
8 G, A4 B- h9 `# `, U x assignLObj := rgmanager.rgAssignL;7 D% Q2 J# j. S7 T7 r6 S0 T
row := assignLObj.getRowNo(GlobalDistObj);2 @ v7 q5 p& u6 }; K* F% `: {
if Row = -1 then -- since 701 c1 X) a% a+ P' P# W& v" m
if lan=1 then
& G- W8 E# ^4 ]- J2 a; r2 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
F+ [9 [3 q& K) I: D5 o1 ~ to_str("in der Andockstation: \"",?.~.name,"\""));
5 s6 P- B+ W/ [ else
# T ]9 C+ B P }6 I9 x1 R. J" i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 y' q- E0 |6 z, u to_str("in docking station: \"",?.~.name,"\""));
8 }4 f$ Y* Y# L% y3 l' I3 \ end;6 O7 p* c, u2 S* ~
else. r1 N K( W7 z C( S
@.Destination := assignLObj[1,row];
- x" h6 D7 u4 t! ~/ T* ?! X7 E/ _ end;
- F8 @* A* t4 j; Q ]7 u newDirection(@);
* v" ~8 k5 Q- q, L0 T @.HasOrder := true;! ^3 ~3 P5 \. R) f/ ?" k% i* v
end;
6 B7 W3 z7 [5 C end;& c( }5 S4 h, h
end; -- of the method
, h' {. |2 n% g0 T |