/* called by: entrance ctrl of the object 'track'
% T# i4 M- K6 S4 y; l*/
8 l7 H; f- c7 E( x5 |4 Iis
- T2 B/ R# A( u( ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ G9 R {. n# O+ y4 Y3 S& y) V5 K
do; c+ f, x9 n. f# J) E( P" @" y
Lan := rootfolder.Internal.Tools.AOLlanguage;8 ~4 ~. W' P3 M. t# t) h
if current = @.Destination -- else return
( M5 A) I$ F+ o! _. @. x then
$ \0 I+ J {& w$ b7 [" t @.Destination := void;
( [4 {* m3 O6 M A: ]" t if @.occupied then- w+ E7 ?4 B q& c
part := @.cont;; r8 X; J5 d. H, K( f' s
@.transpOrder := void;$ {& x! a" X. o. _2 Z( l7 o$ i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 D3 a* N$ D; y; X( o( E5 [ @,root.eventcontroller.simTime);; I# f% I, b8 _% @1 s. Z
@.HasOrder := false;
3 v$ q. Q1 M+ Q! L- ?% v @.DrivingHome := true;
/ ` n7 T- C* M% I; H3 ~1 ^ rgManager.tryToStartTransOrder;
2 G6 n# q: v \ if @.Destination = void
7 k5 {2 `# i9 k O) m- X, _ then -- no transport order for vehicle @
) t9 [8 z. O: ~8 ~3 U3 ~: E7 l @.Destination :=" ]+ {9 @$ |. Y1 f: g
rgManager.nearestFreeStation(@,track.~);' I. G% F/ o- q) B- u
newDirection(@); 1 t" o$ A0 K9 [5 a$ e+ E5 X0 a
if @.Destination /= void then) b) m/ ^6 |. z! R
@.Destination.NumReservation :=
( G7 I7 [0 x; o: g6 i& e @.Destination.NumReservation + 1;* N0 ]0 D; u( T" ^/ x. ]/ P/ k
end;
" s5 Z% ^. i! E& C& ~. n @.CurrIcon := "drivingHome";
. p0 m" j4 C6 E) ?: q9 j+ z# S, J @.DrivingHome := true;% S. G# {( }& T; p7 M$ i. p4 e
end;
+ c7 r5 |" v; V6 |7 h( v; p5 h( _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: _+ H; l, d4 z part := @.transpOrder;
9 u3 F( T( H0 {) z; a) V7 E" B l$ j6 B1 } part.move(@);-- load part$ {* P0 L4 x* \8 B( }+ m: I! E
@.CurrIcon := "load";
! L! w6 `7 X# ]0 r b$ e( n- v GlobalDistObj := part.globDestination;
! a- N( j4 }0 G assignLObj := rgmanager.rgAssignL;
: H% z. z0 L) I) b! O( K row := assignLObj.getRowNo(GlobalDistObj);
, p2 k% [3 y) E3 ?2 F if Row = -1 then -- since 70) T/ ^% \3 m# P; b* l7 D
if lan=1 then0 `7 i0 `+ n$ X+ U# _) u; h, M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& e& i* e- O! a7 }3 N, f
to_str("in der Andockstation: \"",?.~.name,"\""));7 d* \- j9 ^' L: f+ ]" R
else
' f! M7 d: W& d G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; d; h+ j/ Q0 K4 V to_str("in docking station: \"",?.~.name,"\"")); * b4 M5 R ^2 M2 ?% X. t0 ]6 S
end;( N- J& {1 _) C: j+ Y0 k- K- J0 w! [
else
& p3 P# L$ Q* e$ r @.Destination := assignLObj[1,row];
* n$ c+ X ^ @* F# I" D# V end;
7 h6 J) F; z9 H newDirection(@);
$ e/ Q" ^# r7 g7 }- v7 u @.HasOrder := true;3 |1 p( L( A \2 V
end;" G" s3 J6 m0 k/ ^4 [' @
end;
% p/ R/ p2 h3 p2 ]2 q& X+ ?end; -- of the method4 M! }! c5 ~2 W0 A2 r/ a& `
|