/* called by: entrance ctrl of the object 'track'
4 M, t8 L" E6 f/ m! k2 Z! L- B*/
; T+ S: T. |( ?/ W5 o) T0 N8 Lis" A$ l% q+ a7 X) t3 q' |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ |) }, e8 b l, w( H" t# i- H4 E8 X* d9 G
do
3 u/ C! N+ Q+ V) K2 J% N Lan := rootfolder.Internal.Tools.AOLlanguage;
; H1 ]) P3 o# r( V3 V& C9 S if current = @.Destination -- else return! S9 ?" ]# d9 @* k- G
then
: F k% o$ p# E# z/ @. ?( D: W @.Destination := void;! @7 V" D! n; a
if @.occupied then
0 A( T3 @% _8 k+ R9 Z( v3 C part := @.cont;
7 i" _+ |" H3 b a! A h @.transpOrder := void;1 `6 D2 z/ \; e& J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 o% p. F: ^* G% n# z) j6 j
@,root.eventcontroller.simTime);
' m. N' d- `& P- n- M. \ g @.HasOrder := false;5 f, e1 I( s! s+ L* B; s) |
@.DrivingHome := true;0 n4 P! h( p Z: _9 w5 C6 F2 b1 _+ c
rgManager.tryToStartTransOrder;/ y+ T$ o! n" J/ U8 K$ w
if @.Destination = void
; J! }) D- s7 b# n6 h then -- no transport order for vehicle @
8 m3 f$ ~' J6 j3 G @.Destination :=
. J/ g1 J C+ |! b* ~( i- w8 |- g rgManager.nearestFreeStation(@,track.~);
9 G) O8 i4 ?0 ]; D* t. @ newDirection(@); 2 k" A9 C, K; A, L9 _9 s* Z" S' f
if @.Destination /= void then
) M9 {$ s4 ]" M9 C% p @.Destination.NumReservation :=: {2 T9 k4 T& r) w; E
@.Destination.NumReservation + 1;/ Q9 }9 z; _$ {; y# B
end;
3 {$ @3 R- ^4 K- Q @.CurrIcon := "drivingHome";' a# Y" C9 x5 z" d/ [3 ?0 Z" q
@.DrivingHome := true;
$ p7 J1 {9 o/ M0 t- s: }4 E end;
- @( z8 M& n! X& \' b else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 F# R6 a8 M+ O1 b+ U
part := @.transpOrder;
* G9 N5 G1 z0 O2 k part.move(@);-- load part
2 S- @9 Z: d \# b5 I @.CurrIcon := "load"; P* l9 e) ~ |
GlobalDistObj := part.globDestination;
7 I7 t2 Q7 f- P# S assignLObj := rgmanager.rgAssignL;
, l- F+ ?' k1 E: W. k3 ?, t row := assignLObj.getRowNo(GlobalDistObj);9 }: d4 `# V6 }$ h* h& }2 O
if Row = -1 then -- since 70
( u/ B! n$ C, K& S4 x# `" Q. h- N" P if lan=1 then
" I8 }, }# Q- v6 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 r+ B* m9 a+ m- ]
to_str("in der Andockstation: \"",?.~.name,"\""));
7 w9 U* J: b5 V" H/ l* K! T+ x3 b else
( `! ^4 v( ]. M, ]; Z8 A+ T( \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 M0 V, p! r& [1 X5 N% K5 {
to_str("in docking station: \"",?.~.name,"\""));
9 T+ J% a5 D( z5 I' | end;( t2 X9 \% h$ l9 b
else" U6 \5 _& g' t/ Z6 k1 M- T. j
@.Destination := assignLObj[1,row];
+ ?+ r7 ~/ k9 g end;
. z0 u1 X: Q4 K, E newDirection(@);/ {, e" X) s7 r# z
@.HasOrder := true;
* ?1 _+ t% D z3 @4 M, I1 [. r end;. c7 U" b1 |& d( @# }; o0 W4 e
end;% e1 C- z% b+ Q6 {
end; -- of the method
- L" v9 I! p# k b* z( B/ g |