/* called by: entrance ctrl of the object 'track'
7 c9 u0 \% I+ X*/1 b+ b S6 B" Z6 a7 U' T! Q
is$ v" K9 b& W; c6 ?9 v; J4 U- {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# f2 [# [" J3 l3 U
do6 d0 d$ I F6 h) C6 U
Lan := rootfolder.Internal.Tools.AOLlanguage;. o( [5 J# R& V& [* @; {' U7 D; j
if current = @.Destination -- else return; }/ R" k+ z% [" j1 \
then# L4 n5 X' r& g( N( W. x" `' @
@.Destination := void;' U7 f* {8 @; z, e
if @.occupied then
, g% `6 U& p: R- v: g5 d part := @.cont;- O2 `$ u i* w
@.transpOrder := void;
( d/ L# [/ l3 L. G& p; O: y+ L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' G+ A7 S$ ]9 N @,root.eventcontroller.simTime);! B2 n" f) ~& v" {; ^5 Z1 o
@.HasOrder := false;; \+ ?9 U$ C J4 N
@.DrivingHome := true;# D! ?1 A7 g/ V
rgManager.tryToStartTransOrder;8 H" I# l- `. Y( g5 @
if @.Destination = void( ?1 H; W, {2 F( t" } U
then -- no transport order for vehicle @4 C0 o3 y: r' |. {+ Q
@.Destination := k" ^; s2 S9 `& v3 k
rgManager.nearestFreeStation(@,track.~);
$ X4 {; @$ n5 k3 w$ c, x K newDirection(@); 2 u' F ]% l3 p" A& _( l4 y
if @.Destination /= void then
! N: a! X4 `! b/ V& A1 |/ E @.Destination.NumReservation :=
5 }6 j, u8 z" \9 q2 _ @.Destination.NumReservation + 1;
, ]" @0 w" S4 ~ end;
* \+ J2 H: b- ~# l/ s2 o4 L @.CurrIcon := "drivingHome";( Z0 D& G& ~$ B8 _, S8 {- X& |- B2 b
@.DrivingHome := true;' @- y- r: u5 s1 Y4 Z- }- n7 y
end;
$ @( E' N7 @' \) ]3 {' E) V1 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 e/ i4 Y& k! }+ _ part := @.transpOrder;
+ p( N4 {) K* n \% d9 K6 J part.move(@);-- load part* d/ p4 q. ?, [
@.CurrIcon := "load";) ?1 o( Z; R1 r, l. b. z4 U# R
GlobalDistObj := part.globDestination;/ V" x: M" x8 t. H3 S
assignLObj := rgmanager.rgAssignL;! L3 Y( b5 ^4 B' ~7 m' M
row := assignLObj.getRowNo(GlobalDistObj);& {$ o! i% [/ C U* ]
if Row = -1 then -- since 709 F2 ^7 L( C8 c+ g
if lan=1 then
% t- r, l2 l6 F* n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( ?' v, G0 t3 ^* R to_str("in der Andockstation: \"",?.~.name,"\""));
# i( j5 h9 l2 X else
- c+ z: z! `( l8 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 T+ i. z1 O8 ?" P, A) z$ K6 n. `9 ^ to_str("in docking station: \"",?.~.name,"\""));
: J: p9 Q. @. f- ~8 q8 o& Y end;
; t" ]2 }4 r7 a, D5 } else$ N5 c" @" E+ G2 p, k( ~ f4 t2 E
@.Destination := assignLObj[1,row];
9 c5 i* F+ w) c, b$ N- a% r2 G end; ( z& a/ f7 r% N/ i
newDirection(@);' v( U6 w$ f/ X/ S: q
@.HasOrder := true;& U& W* x4 E' J
end;$ c6 [2 P( h q# f) b6 A5 ^6 q; s
end;
- E# h. P7 ~: Cend; -- of the method
; s& V/ x2 T/ r5 h3 L |