/* called by: entrance ctrl of the object 'track'
, X) L6 X/ Z0 r- J% K. Z*/' g2 M8 l6 ~9 L4 b- a7 R7 L
is
6 p- C7 w" O4 ^9 [" f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, ^; k R$ ^0 Rdo! p; h3 K( s+ ?0 E
Lan := rootfolder.Internal.Tools.AOLlanguage;4 ^+ U. I/ t0 C. Q% [0 ]! j
if current = @.Destination -- else return
4 A7 d% M. T: m& W4 a7 A9 X then/ a3 U7 F0 x1 M ~) z O# u
@.Destination := void;3 H! j5 H- M( b r5 x8 z: n0 v
if @.occupied then# s. m' A8 q' t- A7 _5 q
part := @.cont;+ k& G4 Q: G( y; P. L9 O
@.transpOrder := void;
( A" p5 q' f/ b# w: X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ P: z/ A) M S, f7 b. ?9 g
@,root.eventcontroller.simTime);$ Z1 j W( X* Z D m% f
@.HasOrder := false;/ ]$ Q# H& \3 C: L1 E+ @' y
@.DrivingHome := true;. n- U7 _% Y) P# P
rgManager.tryToStartTransOrder;
4 s/ s6 n- H( q8 _0 V y if @.Destination = void
2 X+ y7 D7 G6 C% m ?. b+ u& t then -- no transport order for vehicle @/ w$ I1 s# w; p9 c- P
@.Destination :=
t% a. o, y+ H7 V rgManager.nearestFreeStation(@,track.~);
( `% [, d) O& Z# y: K( P( T newDirection(@); , p# d4 B8 U% L; l+ k7 O
if @.Destination /= void then
( O! T& Y2 p5 K6 r/ B2 d @.Destination.NumReservation :=& q3 R! S2 T8 ~ W# ~
@.Destination.NumReservation + 1;
1 j; T( c! A, \8 b) i; S end;& p2 G a! j1 E9 F7 G" W* V
@.CurrIcon := "drivingHome";
- B5 @/ I/ I8 P- l3 S$ {- Y @.DrivingHome := true;
! f9 H- |7 S6 ^' t) r end;/ s! l K, Y! E, |3 b0 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 R5 v) i8 C- S% P- g# Z( c part := @.transpOrder;
- u3 r1 Z# }* @! J y T part.move(@);-- load part1 |! K* {' N/ J: j+ T3 T K
@.CurrIcon := "load";5 u2 q7 m1 i6 n
GlobalDistObj := part.globDestination;
! g9 q5 Y" x" K2 w assignLObj := rgmanager.rgAssignL;
7 g, R' E, R# T5 i+ n( W$ ^$ M row := assignLObj.getRowNo(GlobalDistObj);
% u' R4 E4 C8 w6 V6 d c* z8 ` if Row = -1 then -- since 70 O* l3 p7 ~( \( g; a, W8 O
if lan=1 then; A& r8 h0 z8 A( _( U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 s. R0 y0 L2 x& ?( r to_str("in der Andockstation: \"",?.~.name,"\""));
3 }% J' s9 z$ L5 c o else6 u, g# B: d+ I# O. f- f6 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; y! Y; h5 j: I# G to_str("in docking station: \"",?.~.name,"\""));
# e3 l7 L! v1 c2 G end;, T( ]- s: A& [2 t- i7 N' `
else
! p$ I$ U& ~$ c2 H7 k) w4 ?6 m @.Destination := assignLObj[1,row];
( @: T; H9 \6 [/ V6 Z9 Q end;
8 F5 U, Q5 w s) b) L9 n n newDirection(@);* N/ I# @+ t9 J( k7 X
@.HasOrder := true;
8 v' O" C; y+ B8 k0 Y end;
8 ?2 F2 r" X) A end;
, Y; H/ G! w6 m4 K+ N- n5 _% ]end; -- of the method1 y5 L! k4 J2 |
|