/* called by: entrance ctrl of the object 'track'
! B" v6 a3 U( ]5 s7 T*/
5 w: ]' u( u' D5 K) a5 Ais) s z1 n/ B/ g8 D, B2 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ b$ A0 M/ H5 ]9 X. l- `" h
do
9 ~$ O W( O) p. Y* s Lan := rootfolder.Internal.Tools.AOLlanguage;
+ I h8 w: u9 I8 z/ b( E if current = @.Destination -- else return
5 C! ^: g# c4 W) x4 z then
! M$ G1 C+ O+ A O \# N/ H8 N: F+ h# R @.Destination := void;' |( Q. L/ d$ n3 K S' `8 {" G" b
if @.occupied then7 w! A( }# `! U. M) o& I+ c; i9 Y
part := @.cont;/ \- @: d9 g. P* }5 ]- B
@.transpOrder := void;8 t, {- c) b' s' p( B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ ~6 B7 f' y, d$ O3 K$ S5 ]
@,root.eventcontroller.simTime);
^0 k4 N! f0 E. n @.HasOrder := false;
' F% c1 ~; |- q, \0 m @.DrivingHome := true;
2 b) J* q3 \8 z L rgManager.tryToStartTransOrder;* D& L6 F, S1 W/ W" G
if @.Destination = void& M" P* Q8 c7 F- f
then -- no transport order for vehicle @
5 a1 @ L& x* L$ ` @.Destination :=
* t$ J: b }$ j5 C; g+ y rgManager.nearestFreeStation(@,track.~);0 p$ c9 ?1 L/ |% C$ I6 V
newDirection(@); ' c5 ~9 g/ c% x+ p- s, ]
if @.Destination /= void then! J, B' H% J% R* x3 d" F
@.Destination.NumReservation :=4 a9 X: r5 _2 N& l+ H. Z0 o t: S
@.Destination.NumReservation + 1;5 q O8 Q- T1 x# I
end;6 }+ {# i% l6 t6 [
@.CurrIcon := "drivingHome";
+ }+ G+ ^( Y* n- p. k, i @.DrivingHome := true;" L* K- y7 V0 J( e+ m
end;
2 e/ i0 b+ G& G, a5 W+ L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. y' I: a0 T3 ]0 c9 c$ t! g: ? part := @.transpOrder;
8 u2 f; [1 I! m0 M# l part.move(@);-- load part
! q$ N% V, l7 I4 y& ]+ @8 h2 N2 l @.CurrIcon := "load";
# R; D2 J7 [& T8 s& p( z GlobalDistObj := part.globDestination;- C, N) H( r: o
assignLObj := rgmanager.rgAssignL;
0 S/ V( M$ }4 D1 [" z row := assignLObj.getRowNo(GlobalDistObj);
5 P# b1 ?7 A/ v) _! x; P8 } if Row = -1 then -- since 70
" o: h: {; B s+ b9 {* L if lan=1 then
m+ @) K/ i2 q# _* j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 @' X1 e" u& O1 u to_str("in der Andockstation: \"",?.~.name,"\""));* c) o( L9 J$ o: U; D! e1 W: E9 W
else2 }! K, o" ]: w* u) W. p: x4 m' |% C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* u1 _0 r3 j& D to_str("in docking station: \"",?.~.name,"\"")); 3 t# P# h4 [' c6 O# _
end;
+ N% G( G+ S" Z4 A5 g% G else
" @( G" m: ?$ Y& M" W9 E3 W @.Destination := assignLObj[1,row];
; Z6 X6 F" D/ v7 K& \5 W% t! j end; * ~& ], X; s9 F
newDirection(@);2 y" G5 E- V; v/ y% w* S; `
@.HasOrder := true;7 M6 [$ s2 p5 N6 h; d$ d7 b: R' j; D
end;
) z8 g* B3 M7 Z1 { end;
8 J. g* Y* [8 b4 `2 e- q: F. d: {end; -- of the method y+ K: _- i: v' I1 N
|