/* called by: entrance ctrl of the object 'track'4 V# x, L1 n2 M }$ p# v3 E8 N
*/
; u* Q- c8 q7 x" ]+ `6 y+ tis
( k2 f) w7 w5 p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' r+ K( v( n. Q! n9 ~do
# x1 I Y0 \8 B& a% q# d Lan := rootfolder.Internal.Tools.AOLlanguage;
4 [, `( Q9 v1 ^% t- P- R if current = @.Destination -- else return) P9 [$ ]3 Z# j% K8 b5 ~6 }- A
then
" L2 @4 @" `" c# ^2 u3 [% g: v: `( R' i @.Destination := void;7 J% |- J. l* k- l0 E
if @.occupied then
: J6 [# V+ [7 a' |- T5 D part := @.cont;2 |" A) W& `- g' c+ `
@.transpOrder := void;
' a! l+ w: z" f- b9 Q5 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, t& c* k0 C" m/ f- n+ `9 U" K
@,root.eventcontroller.simTime);
" r1 L! R4 `, m+ I; V5 f @.HasOrder := false;
9 y/ W+ e' y4 H! j" ~/ m @.DrivingHome := true;! [! J8 I; F0 [
rgManager.tryToStartTransOrder;" }0 h; T8 I g/ A" ?+ i, j+ v4 v
if @.Destination = void; f0 l* l6 c" n0 [: ?
then -- no transport order for vehicle @
: k* a4 F- B" _; q& I& ~; J @.Destination :=
/ d' v; v7 M4 N6 N% ^2 n! @, g rgManager.nearestFreeStation(@,track.~); X, P* `( L, D9 m; p9 v
newDirection(@);
B. b& M% K3 e: e6 e8 H8 Z4 ~ if @.Destination /= void then6 V; @+ P4 k! T+ u# J
@.Destination.NumReservation :=, ?' A1 H+ P2 k3 b4 e6 `5 n4 Z ^
@.Destination.NumReservation + 1;
, u* O# V3 S2 e6 d2 \ e) ] end;7 T: [5 S. b! d: z5 r
@.CurrIcon := "drivingHome";
% x! r; Q+ o) D* s+ I( z% d @.DrivingHome := true;
8 x. b% D3 g7 L& n7 ~$ D2 d5 A end;
* Q A9 \3 x y3 k' N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ B) ~; ]$ ]' } x7 d2 e0 x; x' o% ^ part := @.transpOrder;( o5 t7 s/ J! z2 Y f" ?) ~
part.move(@);-- load part
% _: H2 Q" g2 w7 z$ D1 s @.CurrIcon := "load";
: C! }3 E ?2 \9 Q+ a GlobalDistObj := part.globDestination;( ^, M% |- q$ ^/ O
assignLObj := rgmanager.rgAssignL;4 U. |6 m% E7 i* `& ?6 Q; K8 u
row := assignLObj.getRowNo(GlobalDistObj);
' \1 N) _& }6 V9 H/ H if Row = -1 then -- since 70! j6 `" E4 s6 [8 Y
if lan=1 then4 W9 h6 w6 X: C8 ~' d7 B1 z; a* J" m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. a( B- h: {0 j1 Y2 `" K
to_str("in der Andockstation: \"",?.~.name,"\""));
$ V0 Z# D* u- a. W( F. \2 H else+ {& x t# ]. g! N) o2 K7 |. h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, d% f# t1 x4 q% d+ @5 i% T8 P
to_str("in docking station: \"",?.~.name,"\"")); " M4 S9 g* S5 V
end;( j* P3 l* ]2 |- G3 x& i6 }5 ?
else
& B5 `6 @! N7 @6 o- X @.Destination := assignLObj[1,row];+ i: u4 _' B I
end; - ^0 B5 L5 v0 r O: n
newDirection(@);0 Q9 R( q$ M6 ?
@.HasOrder := true;
" k5 A0 p: T3 \) Q {: x7 ^ end;
+ A7 k3 ~1 m9 D$ z- p. n end;
# D, i/ P' z6 b4 N9 Fend; -- of the method5 l! z: y9 z* y
|