/* called by: entrance ctrl of the object 'track'
+ a& Y7 s: g5 _1 D*/
0 h: O$ e- g! T/ g6 j! e5 U6 S* Dis9 F4 |5 Y% G5 k- h9 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- _: c. u7 e# c4 |( T. w7 I* _
do
9 `1 G. h$ B) {( v5 k8 q& ? Lan := rootfolder.Internal.Tools.AOLlanguage;
, M* q; d/ f3 C3 ? if current = @.Destination -- else return- _1 E* i/ O( Y6 N( t. `% N2 n
then3 L9 s$ j' h: }- h" x" g
@.Destination := void;
* a" L( L R, S& o/ k if @.occupied then
/ O6 V7 A! f3 E; ? part := @.cont;/ a, O1 u! l( |. u" d3 s* N5 z
@.transpOrder := void;" `3 ]( Q& Z) y: R5 q. H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* G) C, W- _4 i+ J" Y
@,root.eventcontroller.simTime);4 r& O# ^& ^) |; {9 `" A0 P
@.HasOrder := false;
+ Y+ h# J' o. g/ q @.DrivingHome := true;
" h' q/ \4 S/ E4 H! I rgManager.tryToStartTransOrder;
2 b! e, I5 [2 L( x if @.Destination = void
0 ?. T4 P$ h h1 x then -- no transport order for vehicle @7 i& f9 Y8 h' U# o
@.Destination :=8 b, L* X7 q& d* U' ^; o
rgManager.nearestFreeStation(@,track.~);3 w/ S6 a2 [' |' e$ {5 b
newDirection(@);
; w+ l: P; o4 T: C0 q8 b0 |+ D# m if @.Destination /= void then
9 A: r6 E4 @( G; ~& `2 x+ L @.Destination.NumReservation :=/ }- J7 h; {/ Y* k' c
@.Destination.NumReservation + 1;7 Y O7 A+ D3 o3 n8 h
end;1 Z% g+ A6 R; u, y }5 e
@.CurrIcon := "drivingHome";
& h! N; R8 {, O @.DrivingHome := true;/ P6 b" P3 H& c8 d4 v0 i5 }
end;3 u$ s5 P6 a" A* H( r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ Y8 @3 y3 Q1 i' Q. F. w; o part := @.transpOrder;
9 u( K& J2 r- s5 V8 ~ part.move(@);-- load part; F4 d- _, q9 h1 `. P9 z9 X) e$ z
@.CurrIcon := "load";
( M8 p+ ]3 ~1 b) T7 d GlobalDistObj := part.globDestination;
* }$ c8 _* \ a/ G assignLObj := rgmanager.rgAssignL;; U) G6 `" m1 A7 i3 O3 t h
row := assignLObj.getRowNo(GlobalDistObj);
. n( v) c& c, V# U: } if Row = -1 then -- since 70
; w% F$ j8 Y3 ]- w if lan=1 then2 P' g; z. W3 i4 c/ g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( }, H6 j. S# _3 V( h to_str("in der Andockstation: \"",?.~.name,"\""));
( o; w) P: w6 |1 Q$ } else
1 C8 Y+ Y; Z; D; @. B; G1 u* c! B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! z) a9 ?6 b. G4 j
to_str("in docking station: \"",?.~.name,"\""));
3 g9 K# B% o: S1 x. D, \- T5 p end;
( g; T W) K5 l" I% x: D& i" r- t else* }7 a C( u0 r8 H0 Q
@.Destination := assignLObj[1,row];0 x. c4 T z4 Z8 x K6 r4 R) o
end; ! A3 A/ |- B' Q& C
newDirection(@);" p3 g4 N# Q5 D# G% Q
@.HasOrder := true;
3 b, L( h5 ~. w" a0 s1 K- P end;2 }7 g3 q. `1 R& c
end;
; I" {! W- l3 P5 B/ iend; -- of the method
3 J; F# u( a+ U9 E5 R* a, x |