/* called by: entrance ctrl of the object 'track'! R% f5 L4 {8 P J+ Z. Z
*/5 f2 O3 m$ ^! q. l
is
# [) b1 Y' x8 q ]$ y6 X1 n: D part, GlobalDistObj, assignLObj:object;row,Lan:integer;% J, y1 K! n2 r9 Y
do9 F, \& b( p5 g' `( o5 b
Lan := rootfolder.Internal.Tools.AOLlanguage;$ C) ^( E2 y; ^+ X6 ? T3 f
if current = @.Destination -- else return; [/ R+ B9 r: Q" C/ a: [4 m
then
Y4 i8 s+ u$ H6 R* `+ w9 i @.Destination := void;
. U- w' P- Y; n* y5 `4 J$ n) | if @.occupied then# [. m: a7 [3 j4 w$ n0 r4 C
part := @.cont;
; I, R! x( A! V% \ @.transpOrder := void;& _3 m: t' x1 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 M0 |4 y" S. U1 Y8 D, r; z8 r/ j
@,root.eventcontroller.simTime);
8 ?3 e* v; l/ I2 g9 l0 ^$ j$ H' I @.HasOrder := false;
{/ {7 B% T+ R6 t) u& P% h& ] @.DrivingHome := true;9 u; {, g+ m/ A0 p/ Q
rgManager.tryToStartTransOrder;. `3 k& U+ o1 I! J- n
if @.Destination = void
" J) c& \" o8 i then -- no transport order for vehicle @2 y2 P. X1 z/ g U+ x, k
@.Destination :=) e# @1 E- S) A; e$ E* A
rgManager.nearestFreeStation(@,track.~); Z& K! v0 y$ ?; u/ ]
newDirection(@);
3 \! R# U) ^3 N2 t# c if @.Destination /= void then
3 Y/ R3 \. w* l% C @.Destination.NumReservation :=
6 y8 W4 h9 k n( m8 o% a% N @.Destination.NumReservation + 1;4 {$ y, k, v4 k7 J, E+ x c% C
end;6 \: D) Z) _4 M7 a6 I, i
@.CurrIcon := "drivingHome";
b8 k0 Z9 S8 \# V; u @.DrivingHome := true;2 v3 d: l; ?- H! [
end;9 N3 m" _) V, s/ o: c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ ?% \: N# O1 u' B& b
part := @.transpOrder; f: w& G2 g+ }0 {$ F
part.move(@);-- load part) [" N6 z( i- m' Y k
@.CurrIcon := "load";
5 S) X5 S. ~5 s5 m7 u3 q' l5 _ GlobalDistObj := part.globDestination;
1 s& _6 z( U% [ assignLObj := rgmanager.rgAssignL;
8 g2 x& |2 C$ ^ q: P3 E row := assignLObj.getRowNo(GlobalDistObj);/ u- H2 `* V0 r) a
if Row = -1 then -- since 70
6 t6 V; ~$ n1 c5 \5 Z* A2 Q8 q if lan=1 then
$ R. \6 b' Z$ d* U; s8 v# x3 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, [1 q/ i% f% u. X' O' L
to_str("in der Andockstation: \"",?.~.name,"\""));; R& B7 q- N' r0 T* @/ W
else4 K& c% Z( R1 B8 Y9 [/ A( z4 m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 P% y% c( \! D! W' I y) K to_str("in docking station: \"",?.~.name,"\"")); 1 W5 w: S# e4 N4 u
end;4 t: @7 ^2 i/ G6 s* B" ^3 V# i
else
8 W/ L$ B# U! U @.Destination := assignLObj[1,row];
) L! O. L3 k- M% k* M1 a end;
p, H8 `& o5 C: l5 k newDirection(@);
3 g& M6 J6 g2 C! `5 \ @.HasOrder := true;- C/ k* |7 a) i, l1 e+ ^$ w# M8 }
end;
3 h. s7 Q$ X# s7 O9 g( M* C! X end;
- s2 S$ d) \# s2 y: n1 F5 mend; -- of the method2 Q+ S$ {: F8 ]/ [6 F5 O
|