/* called by: entrance ctrl of the object 'track'- y3 |0 ~, f+ h) M- B4 e" D
*/
$ E) N/ g. v! y8 T: K! H( \is# Q \ w9 F r2 i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: \6 r4 ?/ N0 M
do4 ~ k1 I4 u$ G
Lan := rootfolder.Internal.Tools.AOLlanguage;, K+ e! W- b; a& K0 g, X
if current = @.Destination -- else return7 ]$ B; G/ k/ P' t4 U( F3 T% l6 H
then. ]) R& H$ w* i7 l2 L0 c
@.Destination := void;; o! w: V2 f# S
if @.occupied then5 N) ^7 w2 c/ @8 L, y) |
part := @.cont;) L- m- |3 @+ i
@.transpOrder := void;* M3 l& ^" ]* Z" a/ m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 K% u" U& [& V" E2 X, f8 y2 a$ ` @,root.eventcontroller.simTime);5 Y l' l) { x- Q4 G. X$ V; S
@.HasOrder := false;
; m, D5 P4 ^+ S" c @.DrivingHome := true;
* M% m2 R0 w9 ] ~& Q rgManager.tryToStartTransOrder;1 x) v+ F7 P) p7 Z; a A
if @.Destination = void
& r* m! Q- ^4 H# K* [. A+ B* P then -- no transport order for vehicle @# z+ s- K# C" |" r% [- S1 A
@.Destination :=
, m! w5 P N3 B! J# T rgManager.nearestFreeStation(@,track.~);6 T! I2 g/ ~" ^' H' ]
newDirection(@);
* o6 s+ V5 k( x5 U if @.Destination /= void then- _2 w7 i4 ~2 O; Z- w2 Z% X
@.Destination.NumReservation :=
" K/ n- [& r9 [9 o8 d# u @.Destination.NumReservation + 1;$ h9 |, M% B$ R1 F
end;5 E! h3 a0 ?" [3 p& \# K/ o
@.CurrIcon := "drivingHome";7 \5 {1 f4 r3 U9 N2 `
@.DrivingHome := true;6 W" t3 B( L1 z l
end;6 m9 X0 P# g* M, T. s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 w9 \5 m3 N( G5 p part := @.transpOrder;8 c' S9 x! N* U) T: ?( z
part.move(@);-- load part
1 |; F8 r4 u1 n3 i! n# Y( a, f @.CurrIcon := "load";
2 D6 W- |* ]! ~. ?' @, Q GlobalDistObj := part.globDestination;. u+ o' z+ T% g% ]8 S& X z
assignLObj := rgmanager.rgAssignL;, q! g" \) U& f+ \- r* d
row := assignLObj.getRowNo(GlobalDistObj);
* Q9 H+ @/ P- V; ^+ I if Row = -1 then -- since 70
8 g3 l. a! N8 Q. f- z, } if lan=1 then
f' n) P+ _% n. V, s/ I: _# p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# K1 W4 w/ L- g7 l6 ~
to_str("in der Andockstation: \"",?.~.name,"\""));) h# |( G9 w9 m. q. A, n( n
else/ U8 w) q- v! f5 ]! o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* U `) j+ a. t% X7 D/ u
to_str("in docking station: \"",?.~.name,"\"")); - P g4 ]# [# c/ Y R% Q
end;
( p% s4 E4 O! c- Q+ w8 X" G7 F else
* D) x: g* w5 \3 C- s( a; P) n, [) ? @.Destination := assignLObj[1,row];
( ^) a% o" q( a& ]2 g, b end; ' D! n3 k& z4 l
newDirection(@);
0 D9 ?9 b: j8 [ @.HasOrder := true;
6 U- M) Z1 W8 S! I" k7 e: y end;% J8 j% B& F2 I) @4 Y6 W
end;
9 m3 ]. N8 ?( }end; -- of the method1 [- @( {* x( u# c6 j0 n
|