/* called by: entrance ctrl of the object 'track'0 v2 @/ j c* f9 |, V2 m
*/" [4 |, ^3 y0 G5 w) n
is$ u- J: l5 ~! g/ O9 B# y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: K( ?/ H G9 ^3 v! i! F
do
, I4 Z+ t5 ?4 \* U# d( a Lan := rootfolder.Internal.Tools.AOLlanguage;
1 M4 W' G6 n- f8 a! d4 W if current = @.Destination -- else return
; J4 D+ F' q4 H then
c/ o% Q: h& Z8 |( d0 k @.Destination := void;
/ R9 i% g! C! \ if @.occupied then' [9 ]" U0 X! z9 a0 P: t
part := @.cont;
# K& t: S3 n3 b C5 h n @.transpOrder := void;8 ^2 W, l, W$ J/ ^, f8 O& E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- l9 C) x5 w3 \8 O @,root.eventcontroller.simTime);. x9 F. j- s# p; C+ I& p6 {
@.HasOrder := false;- Z2 o- g4 Q) j; L( I
@.DrivingHome := true;
% q# n. s4 O" l5 q* n9 a rgManager.tryToStartTransOrder;
+ o4 x# y; y% D4 R4 c if @.Destination = void" ?& R1 m m% o2 ~$ f
then -- no transport order for vehicle @$ F6 u: V' ^5 C: i- n5 a+ x1 p. Z
@.Destination :=
2 ~% A$ n* w% _ U( c rgManager.nearestFreeStation(@,track.~);% z* F4 x4 { a. H( F3 o% y& f
newDirection(@); ) {* A- k9 t: p
if @.Destination /= void then, `5 m0 R+ I/ |( Y. O
@.Destination.NumReservation :=
2 W+ I7 _. N# }# o @.Destination.NumReservation + 1;
3 e9 k/ r6 r8 ]1 b6 i end;
0 p4 }4 t/ ?% j, _ @.CurrIcon := "drivingHome";4 B% k) `2 E) T, z& W
@.DrivingHome := true;
( K& a# U. `: B( q; Z end; x# C- U+ N. m4 K( ^% r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- D5 D( |# t6 X" s9 E1 O4 H part := @.transpOrder;
' R! W, F3 }4 m& \: V. P0 ]6 l1 ~ part.move(@);-- load part
3 k: [/ Y, a- V1 j% `7 z9 c @.CurrIcon := "load"; X" x# ?( N' Q' A
GlobalDistObj := part.globDestination;
9 ?! V" q7 C+ p+ r) X; u( E* D9 q assignLObj := rgmanager.rgAssignL;; A2 I+ l) d" f* v, m. T9 l
row := assignLObj.getRowNo(GlobalDistObj);' f; o# z% N6 V1 Z7 Q; a' Z
if Row = -1 then -- since 70' w5 }: i8 M- h8 E, P
if lan=1 then, Z! z" k0 Q: ?5 K- ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- V Y9 H; u g) N8 t
to_str("in der Andockstation: \"",?.~.name,"\""));# R% N7 S; R' F8 }$ E) B
else
* w. n0 s) q+ `% Q# Q, Q! t( x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 |! X7 e& N4 M
to_str("in docking station: \"",?.~.name,"\""));
: a) L% Y4 o# {+ N) I5 f end;
5 m! K0 d8 ~* S/ X else
& h% c$ h8 {. n: w7 ~ @.Destination := assignLObj[1,row];
, k4 K. U( u2 z. { end;
s( r1 G/ M5 ^9 o, N9 K5 [% h* { newDirection(@);
4 t' g0 a8 U/ {. y$ | @.HasOrder := true;# O- t5 i% x t) Y# O+ `
end;
9 r: f6 \8 } M& n, ]2 V3 K end;/ m0 _2 B5 ]) J2 @" W w3 U
end; -- of the method3 I2 ^# W E! L7 x
|