/* called by: entrance ctrl of the object 'track'* ]$ n% _4 H/ y: [* i3 Y
*/' Q- ~8 m) _4 j! U1 p
is0 U) V. G9 J6 z6 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- u6 N# Z) J& j7 \; c& c
do0 q' R# d( g. P0 `* i2 \3 ^! _& q
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ f0 c2 d- X2 U4 V5 b' u* X8 V if current = @.Destination -- else return
1 _! R& o' e2 M Y+ `. R then P1 M, T6 W7 e4 w
@.Destination := void;
3 W4 a+ b- Z5 Q, P1 x, A if @.occupied then
) g {* e0 h! Y* r! L part := @.cont;
' v0 X, H! e( E" @ @.transpOrder := void;
! L0 L% k9 K b# L) l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! V7 Z* R% b0 N( B; U
@,root.eventcontroller.simTime);1 r: e* p$ U1 C
@.HasOrder := false;
: h# ?& j9 T M n$ } @.DrivingHome := true;8 J" d( w/ p/ K' v! b9 X
rgManager.tryToStartTransOrder;
& ^. b# k3 z$ Z) m' o3 p if @.Destination = void
, j+ ]& ]: F2 ?. M! I then -- no transport order for vehicle @
' Z) G" v9 L, k6 T5 O8 A) r$ ? @.Destination :=' e4 O' @, y" a: |- W$ E8 R- j2 ^
rgManager.nearestFreeStation(@,track.~);% s. C7 t0 p T
newDirection(@);
# t" A8 _+ u8 H+ Y" a% G if @.Destination /= void then! q9 b) h7 y1 j7 z0 r
@.Destination.NumReservation :=
# F/ h6 _& y3 c2 o" U; k @.Destination.NumReservation + 1;
& |% B9 Q5 S3 i/ ~ end;# K; m$ h# s- T6 q
@.CurrIcon := "drivingHome";
6 c8 Q2 T1 i3 A; ?; b @.DrivingHome := true;: H+ L, _+ o N, f1 a, K" w1 B: Z
end;
; A/ a' _, k! d" s( k else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 x5 h! \$ U y F z8 U9 ^! f
part := @.transpOrder;, ^; f4 T2 J6 `+ k! }
part.move(@);-- load part4 u( r6 P+ `! |* A. ~& V
@.CurrIcon := "load";. @4 y8 c, x7 p+ K0 K( g4 i i+ `
GlobalDistObj := part.globDestination;
$ t2 n* {) S8 W! ?( ? assignLObj := rgmanager.rgAssignL;& }! r p+ Q! i5 {3 C: p
row := assignLObj.getRowNo(GlobalDistObj);
( u) `! G4 A0 z; Y) w% d) C7 O$ \ if Row = -1 then -- since 70+ Y" O# q# v2 y
if lan=1 then
6 p& J5 i- w4 i/ u; ^! N4 n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ G+ [2 W3 c; h" H( | to_str("in der Andockstation: \"",?.~.name,"\""));+ z M/ a7 Q- n l
else
1 k5 ?2 k4 _: S, V/ q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 z" o: {$ s& s: t, S
to_str("in docking station: \"",?.~.name,"\"")); % ~* J( @1 o: g1 r' z9 D( Q8 W6 I
end;
) j3 E3 D0 G- B$ g# S else. N( _# u. t9 E/ ^- N
@.Destination := assignLObj[1,row];1 V- x# q, i4 w) v; g7 C3 F
end;
* s! X# w$ U- P* p- e$ b2 p newDirection(@);
% K% J( X; S3 f3 v2 @) L @.HasOrder := true;: ^4 {' F% {8 A1 |3 `8 B
end;
r: O C. a9 Q# D) S4 p, e end;
% [4 a7 f2 J. l( z# a9 {6 j @0 ?end; -- of the method! f- \, C @. X
|