/* called by: entrance ctrl of the object 'track'6 e3 H' W9 i3 l$ M, z: x
*/
, s. g+ b! V$ a2 A1 ~0 Cis
. u* L0 o! a& f5 ^% i( k; [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;; Y3 _3 q; t& M' h5 m
do
2 v& H! ]& c1 |1 k/ p$ M* O9 U Lan := rootfolder.Internal.Tools.AOLlanguage;
' b: Q: w8 O" \# |: G if current = @.Destination -- else return
) h0 R: U1 ?" v then; d1 o# x, v1 _8 f3 G4 m
@.Destination := void;
9 d; {8 ^5 {8 J if @.occupied then
( ]! g6 m4 l! M0 t' X/ H part := @.cont;
# o3 _, E2 [0 p) [6 U" g7 L @.transpOrder := void;5 M4 O6 r- n, ^6 w$ N/ _' ~+ U; K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% L+ I2 C5 g- O f0 P! O3 O @,root.eventcontroller.simTime);
# w9 U, y6 M6 K6 d @.HasOrder := false;
7 U" A8 S' o- d @.DrivingHome := true;) ~: V3 h7 K# l5 p, |- m6 x1 R
rgManager.tryToStartTransOrder;; O: o w+ ~. ?2 V; C
if @.Destination = void: u: p/ {; ]: I9 B3 K0 |! v
then -- no transport order for vehicle @
) C) W, u8 z0 D6 Z @.Destination :=6 g0 B }' a. b- U- ]! ]8 a
rgManager.nearestFreeStation(@,track.~);' H- O* q& `2 `3 R8 ~8 n
newDirection(@);
9 B- ^1 F! w V if @.Destination /= void then# u/ N0 d( h3 i$ q- C" F4 h
@.Destination.NumReservation :=* P( Q" g# J5 s' l8 p. k& }
@.Destination.NumReservation + 1;
/ }1 a5 p' l$ i' @' a end;/ o/ Q% M( s) f: J+ G5 a
@.CurrIcon := "drivingHome";
5 T n1 B9 g3 ]; d @.DrivingHome := true;7 W% K( E+ r8 M% t6 b5 [/ R. t
end;- ^& l- K" s, v- d* Y7 \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' w" N5 e1 m& X+ `
part := @.transpOrder;, `, p& Y' U6 D
part.move(@);-- load part3 S: N) F b5 ^; a* U6 X. R
@.CurrIcon := "load";5 O* @$ J8 R S. e9 x
GlobalDistObj := part.globDestination;
. D8 z# _3 S: k, B; u4 p* } assignLObj := rgmanager.rgAssignL;% D# b7 e' L- P
row := assignLObj.getRowNo(GlobalDistObj);/ r" L' J: k. j' E- W
if Row = -1 then -- since 70
( @. [3 _4 P3 C( V1 L# g if lan=1 then' y8 m, \" b) H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 |4 y+ K$ S# {) ~
to_str("in der Andockstation: \"",?.~.name,"\""));% W, u& @. W7 ?* i
else
# ]+ |" I* @' g+ I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 }$ @$ o6 e+ e7 {0 t5 C; g% p. Z
to_str("in docking station: \"",?.~.name,"\""));
/ X4 S# [& o$ `* \ end;
5 O% ~. I4 S) y7 h+ K2 l) ]! {* P: J1 a else! H- J% l( H1 @ F) s; |" G
@.Destination := assignLObj[1,row];# k' A+ ]8 p- D1 N9 [3 y- w( c
end; * V" R: _ f$ P: c9 ~6 c+ @
newDirection(@);
$ }8 M9 S" w1 O8 N @.HasOrder := true;. s3 m& Y; S J8 R8 V
end;
9 B4 R: \1 M1 B' K d* D end;( H+ _: `+ Q8 G3 G: H) L
end; -- of the method5 U; \3 |( i9 ^; _! o
|