/* called by: entrance ctrl of the object 'track'
$ ?6 M- w" R, ^' f*/
- I4 S$ s& g# ]2 P' R, Q0 zis% \: g; k: G# y7 f* N7 j8 i5 n- Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; c& t$ M6 V% G* x% D
do( G3 Q( c& J# d7 I: D
Lan := rootfolder.Internal.Tools.AOLlanguage;+ W _! S2 T0 J0 g: E' L
if current = @.Destination -- else return
; V/ z7 T9 G) {! v then
8 Z% _5 o: h- n @.Destination := void;
8 s3 K6 u: f' O4 e! j. o* S if @.occupied then
. J$ v9 S# H; S6 w) a/ d5 k part := @.cont;- S0 I: A5 r: c& u a. I7 `
@.transpOrder := void;
! F* M) L# L, t1 F% k( S. f3 C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 n o3 L. v; W8 k0 B @,root.eventcontroller.simTime);
4 Y7 z9 L* i7 I! @8 v( Z) R m3 k: W @.HasOrder := false;7 U4 u; D9 W$ j0 p* d- z$ q7 f
@.DrivingHome := true;) e+ I5 I- q+ ?8 {- d/ t5 j
rgManager.tryToStartTransOrder;
$ h- e7 L( S) b! I) f if @.Destination = void! [* K+ |; ?; k5 x$ h+ x# }! D
then -- no transport order for vehicle @
; b% U# Y$ F. f @.Destination :=7 o2 P8 Z2 J( R+ U9 h: p+ _1 z
rgManager.nearestFreeStation(@,track.~);
" l: ~9 G( f2 @1 ?2 ]* K O9 ^ newDirection(@);
* K3 _" w( S9 ]9 r1 T; l8 Q if @.Destination /= void then
& w9 W! r" Y, y$ x2 x. u @.Destination.NumReservation :=
$ U$ y4 U- ?& h @.Destination.NumReservation + 1;
1 ^" I+ Q- `6 ?) T' p/ K end;, q$ [# ?% l% z8 F
@.CurrIcon := "drivingHome";
* n: o* j: U. J/ o @.DrivingHome := true;
# C! S# f* i" T end;+ X2 E# l( }! K5 h7 ?, ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. u" U% v" Y5 v8 P. r y" n$ Z
part := @.transpOrder;; a0 A s: P( Z! z% o/ z0 I# y3 k
part.move(@);-- load part: q" _. U _* ]$ Y* B) @2 ~+ a
@.CurrIcon := "load";9 {6 F% J8 e I5 C8 ^
GlobalDistObj := part.globDestination;& T" F6 y5 o" d9 R5 l
assignLObj := rgmanager.rgAssignL;
; e) H* S) A9 Y/ Q* }% t, G4 d8 F row := assignLObj.getRowNo(GlobalDistObj);! P1 g. O0 c- p/ H, o# M5 A# N9 E0 k
if Row = -1 then -- since 70 U( Q x$ M9 E6 g# @: H) M6 G
if lan=1 then
0 I7 o8 V0 V7 ^7 K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& Y% w8 o m7 F4 ~ K: ?: \ to_str("in der Andockstation: \"",?.~.name,"\""));. B, Y/ M$ ]5 H" n
else3 I/ g# ^8 h& v! ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( Y+ v9 {2 B2 v$ @8 Q# C to_str("in docking station: \"",?.~.name,"\""));
2 o) J8 m6 J# v" F end;
" f7 c$ m6 W5 P else9 A: S2 W% `7 N* W
@.Destination := assignLObj[1,row];3 f0 G' a) R7 v# Q- h- m- p; E" _7 P2 r
end;
# j+ j1 q$ M9 |! n. v newDirection(@);
% k: T9 i+ K3 \3 c* b) R- X @.HasOrder := true;
) \- e! j8 P9 ]2 l. q7 y end;
" N8 N! p1 q9 e5 Q$ N* u end;$ @- g" `2 \; ^ f
end; -- of the method2 f+ [4 J' | K
|