/* called by: entrance ctrl of the object 'track'
! X+ i8 ~0 B; p3 T*/ P/ k( V3 b1 L( q
is; W B' Y. U" D4 s. ^' y8 ~* `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# [- E& a5 d& D) o
do
0 v! V8 g8 V0 q% `% ? Lan := rootfolder.Internal.Tools.AOLlanguage;8 p$ Q' ] W& D# J! m% P
if current = @.Destination -- else return' b+ {4 F$ O- d* C) z3 z& o+ i" F
then
, Q8 H/ I) G3 g" i+ c! u @.Destination := void;
# Y8 \" y! F C% A2 `% f if @.occupied then
7 B) Z" y5 V8 n c) V) o& e part := @.cont;
/ V2 \: B1 [; j: V/ a3 v @.transpOrder := void;7 Q( R2 G, h+ d3 ]* R; z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% G0 u) {) ]2 {2 J6 {, M, a
@,root.eventcontroller.simTime);
% c& w: P1 i" k, F @.HasOrder := false;
1 X4 j! S/ [: w3 A" c( N5 ^0 _( _ @.DrivingHome := true;
0 A& d, Y& {1 S! E! U& ~9 ] rgManager.tryToStartTransOrder;/ b3 g8 s" T" e. B( u
if @.Destination = void
: A% i4 |+ D: C# S8 ] then -- no transport order for vehicle @
6 j- G! B) j7 L/ M/ J; ` @.Destination :=
O; N- y s+ ?# o9 @/ R rgManager.nearestFreeStation(@,track.~);& Q* `$ Q% A2 o/ }0 i% I& `
newDirection(@);
# H0 j6 E$ L7 p+ ~/ ?) D if @.Destination /= void then8 h4 t! y/ i5 @# `! G" t
@.Destination.NumReservation :=9 {+ ^0 z8 p/ i- T" N
@.Destination.NumReservation + 1;
7 a' x$ S6 H% V9 F end;& W1 W: n) k5 |5 O; G" X6 |) J
@.CurrIcon := "drivingHome";
7 x6 S3 J* U: D! Y' [4 S @.DrivingHome := true;- t* L( L% Y8 F2 I2 B
end;/ m2 V# g: [& r4 t. t+ o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; b% f* L8 }# m4 ]' t; l/ f0 j& { part := @.transpOrder;9 {; m, w" X# P+ s' m. ]" @" G
part.move(@);-- load part
/ t$ J, \5 n8 D. _7 e7 [ @.CurrIcon := "load";& R) r- U+ ^ W, b2 E
GlobalDistObj := part.globDestination; ^0 y& y% d2 v" b; ]0 @
assignLObj := rgmanager.rgAssignL;7 ~7 J J# k, w
row := assignLObj.getRowNo(GlobalDistObj);, K8 H5 b% |& S. |' j E6 O
if Row = -1 then -- since 70
: U8 v. f' O& U1 k6 n; k# h$ \. u if lan=1 then' x' p3 a" i8 U2 X3 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 E! u0 Z6 x: c) b$ { N to_str("in der Andockstation: \"",?.~.name,"\""));
# C& V) h) C4 c g- J& a8 l" w else
3 i4 K3 g/ `3 t W. J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 C. K9 h& J0 L6 ^. E' b' _& @% G; q to_str("in docking station: \"",?.~.name,"\"")); 5 i Q4 z$ @( V: u
end;
& A/ J# @ T4 ~+ ]$ B3 j; z- X else A, [4 R9 \9 E9 c8 D
@.Destination := assignLObj[1,row];
- S# W4 F7 n& M1 C end;
& [4 l/ N$ K6 |) f6 i) w newDirection(@);" l* y* |# Z' {9 q6 E% V
@.HasOrder := true;% | |8 C! ~) Q/ S7 s7 N
end;
- }- J; ], Q; \4 k; } end;; c& z) F e; c( w4 V
end; -- of the method2 ~1 u0 M: P# K, r
|