/* called by: entrance ctrl of the object 'track'
- K1 y! J5 C9 v7 e% v' C*/
: s% `& u2 v* y0 w# qis4 `0 b- m5 T% e9 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ x; i* N- S. f% I8 X& x G8 |do. f' N; d# Y2 {/ a# H- q) C$ F
Lan := rootfolder.Internal.Tools.AOLlanguage;) d! X0 i- p6 R4 j# v" N' v
if current = @.Destination -- else return4 U( i9 D8 K( q& v1 m
then& B: A3 S3 q* @
@.Destination := void;
! v. d5 v+ p, L! p" _ if @.occupied then1 W5 L! w9 ~& u& w& V) v8 `/ Q9 }
part := @.cont;; Z- X& q: s, X8 a& \, h3 e
@.transpOrder := void;
% S! E$ \$ D; ~9 m2 g- P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' }" ?& i `: ~& |5 j1 x @,root.eventcontroller.simTime);! K8 T Y( @, p3 g9 k7 e$ f/ C
@.HasOrder := false;
: S4 E% S' R1 S, @% I) V4 V @.DrivingHome := true;
4 k( h: \/ n4 X5 }7 {$ q$ B2 A rgManager.tryToStartTransOrder;! P& D6 Q3 d% ?7 }4 A1 C/ \- y! Z
if @.Destination = void5 r1 ?$ s: [& a5 D
then -- no transport order for vehicle @. Y9 } {8 v$ _' f
@.Destination :=( W6 Y q) N( |4 X( F: t1 V
rgManager.nearestFreeStation(@,track.~);$ y% H( t1 ]8 E1 a$ W7 Y- I
newDirection(@);
, K" W6 f- G: \& S if @.Destination /= void then
* B2 E* J; }8 r0 a @.Destination.NumReservation :=
: b" q0 K- b- m7 V5 l+ b" L! a @.Destination.NumReservation + 1;! h9 X3 G5 P0 b% R
end;
) R: X* J" a+ \; N @.CurrIcon := "drivingHome";. u0 Y5 ]5 ^/ Q8 M0 @$ a
@.DrivingHome := true;
$ [- D4 h3 d/ g8 ` end;' h9 c* w! b2 p3 u5 D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* j9 I# @1 B3 H1 N part := @.transpOrder;
5 H$ q! ~ A/ U- X3 }( Q+ y part.move(@);-- load part M( W- u$ W" g+ m' s& S4 Q
@.CurrIcon := "load";9 V$ ]* {, T' i' h/ p
GlobalDistObj := part.globDestination;- b' U% }9 x6 K) j4 F( C0 g
assignLObj := rgmanager.rgAssignL;
6 {5 A7 T7 A2 B% u6 `8 B row := assignLObj.getRowNo(GlobalDistObj);7 `) S+ ^* `8 ~
if Row = -1 then -- since 70
( K# s2 d. k+ |( t4 ^8 N if lan=1 then
! N3 U5 o# ~( W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 K; \2 z$ a# r @: Y& q to_str("in der Andockstation: \"",?.~.name,"\""));; R7 q. g2 i1 _4 p- R8 N3 j: X
else L! L+ b8 X3 T( p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* w7 M4 I! }+ n8 V4 t
to_str("in docking station: \"",?.~.name,"\"")); 4 ]: K& @4 i! j' l2 _% z
end; z f k J9 G$ b1 f2 K
else, E. ^+ H, P0 @& l v! ^% h
@.Destination := assignLObj[1,row];
7 f4 @8 Z6 W3 ?* d3 t# \ end; 4 D; S$ s6 U5 U1 D6 z' \
newDirection(@);
6 C1 [/ Q! g0 \ @.HasOrder := true;0 B$ d9 t0 k9 M+ F- l0 ]5 Q
end;
, U- \$ O, A( F+ z/ l# G end;$ t8 ^1 p& ^0 D( Z+ V* O) s
end; -- of the method5 E$ A5 H4 W, ]3 f8 Z
|