/* called by: entrance ctrl of the object 'track'
, T/ F+ b% s* O2 F8 r*/
- t& U) A) p8 I3 {. ~& Kis# ]; b: ~1 w5 t5 r, ^3 e6 q4 v% r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 k- e2 {6 |; ?- \% C* P: Xdo
" D; M+ ]; @! L Lan := rootfolder.Internal.Tools.AOLlanguage;
H1 h; B/ e, s- A) Q! c if current = @.Destination -- else return
2 s4 g! L5 z. I0 H! b' ^ then
2 H. Z n" H, F' _% O3 s# L @.Destination := void; d9 H R0 `) T W: J5 Q: @: t
if @.occupied then3 Q2 P4 n" V3 W9 h/ ?
part := @.cont;
- S9 a: k; c H @.transpOrder := void;
/ H3 j! @2 {( E/ g' D7 w) v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ j4 H$ F9 s: G. f- o8 w @,root.eventcontroller.simTime);
5 P1 |& G1 [! G" G5 y% y* Z @.HasOrder := false;2 F4 d; c1 ]6 K8 y0 M! n5 y
@.DrivingHome := true;
3 T2 c/ u8 o) E3 T rgManager.tryToStartTransOrder;
" |8 ]; |) @4 G2 }% p" K if @.Destination = void: Y+ _- @1 b& d* D* ^$ n
then -- no transport order for vehicle @1 E2 J3 b9 J: [, U+ |, `
@.Destination :=
. l) p( v; ^8 l6 D- O+ ^4 p) B8 k: @ rgManager.nearestFreeStation(@,track.~);* s2 v9 |! Y7 {4 k/ h/ a/ y! t
newDirection(@); & ?& I4 D. O2 j/ z
if @.Destination /= void then3 G Q+ |' ~3 G* Y9 ^- |( r% l
@.Destination.NumReservation :=
" {/ Z0 b8 p8 R- r( i. \8 r) h @.Destination.NumReservation + 1;
9 M8 m9 a! B' k7 @9 t l, [ end;
; P: Q- f% L- Z, L- O7 a4 ~; F @.CurrIcon := "drivingHome";. h! w& m! S- b$ Y1 }
@.DrivingHome := true;& C+ J+ V' ] w
end;( V3 F5 a5 V. h1 Q* ?' L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 j; n5 r* E5 \0 l b# T part := @.transpOrder;' j0 y. w% K$ `
part.move(@);-- load part
+ c2 x1 e8 f9 N% u$ c @.CurrIcon := "load";" Z5 [2 p5 S' ~) Q7 r
GlobalDistObj := part.globDestination;& t" e, H& N8 M) u2 k
assignLObj := rgmanager.rgAssignL;/ ^7 `* S1 h4 b4 B3 |$ w: m
row := assignLObj.getRowNo(GlobalDistObj);7 I3 C+ Z: ?6 B. r
if Row = -1 then -- since 70
2 u/ V& R. n0 {8 G if lan=1 then. G5 ]! w3 m& E* A' S( p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- @( W# Q N& A: b0 R8 }. t to_str("in der Andockstation: \"",?.~.name,"\""));$ g" H, B0 X9 z
else
) R# h& F2 y" p* B8 N( O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& Z' s% G4 L* K4 ] to_str("in docking station: \"",?.~.name,"\"")); 5 D) ]1 Q& S4 `( W+ w
end;
1 ~2 [" L" d) A else( l! K% d, Y2 y8 `8 s+ a
@.Destination := assignLObj[1,row];
4 }5 R; N# ?. M1 h1 m end; 2 c- b! I$ `1 b: B; d4 X: H
newDirection(@);
' z7 @5 _" n/ d @.HasOrder := true;
; S6 h' z x x8 Y+ x3 |1 N- q, ~ end;
0 w" a' A% V6 t: a6 n end;
6 B& x; `8 }# y( M/ rend; -- of the method
( v2 Z$ U' w/ |, |. H+ K2 Q# v1 K; T |