/* called by: entrance ctrl of the object 'track'
4 [+ H0 |# k7 L, v. k* |& z" ^, {; U*/# J/ l- ^ W5 a) {
is
I% \7 S: P, {6 E6 T& O/ { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! [. ]! ~: D; O) X `. Udo
4 V/ e8 y2 \2 ^/ a$ Q7 C Lan := rootfolder.Internal.Tools.AOLlanguage;
1 V. v( p4 ?) f if current = @.Destination -- else return$ c2 u4 {$ F& H. F% O
then) H1 ~* k6 w- n* k* m' t1 g) N
@.Destination := void;0 d% G- A" F1 I& U' J4 D; ^ J' U0 c
if @.occupied then6 Y0 N ?# c1 u# r3 ~" }0 u- v
part := @.cont;
5 S4 Y1 m; M2 L/ g @.transpOrder := void;4 X7 o( O9 K5 h$ J* X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 n. N- z( L5 Y3 ^
@,root.eventcontroller.simTime);
1 u( T3 ?: j$ a" g @.HasOrder := false;3 s; ?( q- ~* t7 e( F! _
@.DrivingHome := true;" Q9 V9 _8 @( A3 I' r
rgManager.tryToStartTransOrder;" `( J, x. E$ L1 M' H7 K
if @.Destination = void8 Q, E, n8 m5 {9 U% x: d
then -- no transport order for vehicle @3 F, e( k7 b+ g; t/ I6 r
@.Destination :=4 r" \ a" T6 Q" s
rgManager.nearestFreeStation(@,track.~); V$ R. c8 N* E/ m9 H. b8 N
newDirection(@);
; U6 G$ b# u& m! N7 o% @/ P& b7 P9 t if @.Destination /= void then
# I1 v- t$ O C* V; ]; Y @.Destination.NumReservation :=4 A. |3 `6 i! j3 Z
@.Destination.NumReservation + 1;8 K' |- H* u1 I2 P
end;$ b- U9 [8 J s# S) c$ Q1 |0 `
@.CurrIcon := "drivingHome";! K5 t( S8 V* E8 T! P5 v! o
@.DrivingHome := true;
$ V9 v5 n5 M9 @3 l _2 v% n9 | end;4 C, `3 H( R0 u+ Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ W& d- o2 u* ?3 S# z. F part := @.transpOrder;& N' `: [! e8 H1 W, ^
part.move(@);-- load part8 r- c1 s& {! W/ A! ]6 z$ P6 t
@.CurrIcon := "load";9 Z- e2 U1 {0 o
GlobalDistObj := part.globDestination;+ o" G* b: m7 N7 ]' V( Q
assignLObj := rgmanager.rgAssignL;
3 m# N9 _( d' ] row := assignLObj.getRowNo(GlobalDistObj);
4 E) V5 b3 R/ C( Q- ]# i if Row = -1 then -- since 70
; r$ b( }" w- K if lan=1 then& I3 u" V5 m7 i0 w3 T: Q, d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 `2 ~" y7 `) n/ y9 M4 R to_str("in der Andockstation: \"",?.~.name,"\""));
2 r. d% A# j! H, ] else
8 Z7 W$ ?( Q- b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 b8 ]+ X4 e3 v X; ]- K. J to_str("in docking station: \"",?.~.name,"\""));
0 g! Z5 L9 U% g) G D: y. N! X end;6 S {$ E' Y/ U( q. x8 v3 E& Z
else" s+ Q- h" z4 e1 X3 r7 ?3 X/ g
@.Destination := assignLObj[1,row];
3 I+ d* w6 q" z$ e% T end;
* G" q$ t7 Q& K) [ M2 i" ^ newDirection(@);
% F6 r9 F1 z' ?. I7 a* @- ]) m @.HasOrder := true;% Z: T( p3 d+ M% b( G) m9 z) y' k9 W
end;
: x4 U' C. ^) z end;
: D/ ^& @+ k+ vend; -- of the method
. i% @: r6 y( S$ D4 [7 S. u |