/* called by: entrance ctrl of the object 'track'- h7 z; x2 B# \0 O# O) M
*/: e6 U" C! @! T. s* E* c1 ^0 Q
is
4 t( T5 L+ v6 i% P v" |" x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ c, x2 N4 k# m. l8 E% odo
; [& B$ X6 e( {& f Lan := rootfolder.Internal.Tools.AOLlanguage;0 l& F/ ? z/ Q( `/ V7 e" k9 M5 A
if current = @.Destination -- else return
X: N% j. B( Q$ h$ g then
; A4 r* E, X+ q# ^: p @.Destination := void;
, d$ s+ [0 s, w- O# Q8 a' t( _ if @.occupied then- i: w6 ^0 _, }
part := @.cont;& p6 N8 r$ w% z9 S: j* f
@.transpOrder := void;0 L9 c% e2 g3 e+ _0 Q& F) R' K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 j/ W! j7 S2 `3 |/ f: w @,root.eventcontroller.simTime);
1 S: j- Z! q A3 z @.HasOrder := false;: f5 i8 E# h) d+ [# @, t9 t
@.DrivingHome := true;; ?! p" o( T' p) o) d
rgManager.tryToStartTransOrder;: a2 @6 x7 U+ ~$ I) |2 i% t
if @.Destination = void" e6 l c/ A) g
then -- no transport order for vehicle @
0 N% ?* [! [! X& m0 n$ [# g @.Destination :=
5 L: d! |4 z; L8 \ rgManager.nearestFreeStation(@,track.~);
8 `4 [, n a% g! r: L1 O6 _ newDirection(@); 9 ?$ k6 @1 R$ X7 f4 f, u
if @.Destination /= void then8 c6 j9 @$ S1 a- `
@.Destination.NumReservation :=
G k$ k7 ?& g7 }+ R2 } @.Destination.NumReservation + 1;9 s# O( Y1 T3 M( u' Q
end;
% b4 z9 Z7 \/ k- d @.CurrIcon := "drivingHome";# r0 O$ s! g3 @+ |- T. N! J6 c0 Y
@.DrivingHome := true;
4 w( j; Z! q' q7 R* B" z end;/ |) @; H) P! X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ T; z! v5 q6 b7 {1 X' C+ s: T part := @.transpOrder;
0 P7 E, ?: Z( S part.move(@);-- load part
+ o3 i6 A$ m/ s+ Q9 | @.CurrIcon := "load";
2 g, Q5 F6 [$ r0 b. G7 A8 M- F( ?' e GlobalDistObj := part.globDestination; A% _ @: r& R$ E" C
assignLObj := rgmanager.rgAssignL;
2 l' q8 y5 @, X. r row := assignLObj.getRowNo(GlobalDistObj);
% |, z6 F- e6 W, n; i" Y if Row = -1 then -- since 70, n$ J8 c& f+ C; X. o
if lan=1 then
+ {0 ]! t! ] [; E6 g* U9 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) o5 f) G, U; C# g. D
to_str("in der Andockstation: \"",?.~.name,"\""));9 B7 i- a/ [; X9 x
else
, z6 `4 N: r- Q2 T7 i d# X) o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, ]: @: j1 S6 s% M7 m to_str("in docking station: \"",?.~.name,"\""));
4 m O% W( ^# v1 { end;
5 a( {: g. S/ F4 D0 {, T else' r* y8 x- {1 |2 u
@.Destination := assignLObj[1,row];- Q. Z# v2 J8 n5 |+ x4 g3 u
end;
# m+ H+ w% X& v! z# x- v8 ^ newDirection(@);
. K" O4 B o) ?) O8 r @.HasOrder := true;, V- ^2 P1 ^; v2 q
end;+ G$ Z2 {" O1 v; v- H
end;+ O- X/ @( Y2 C' z2 Q; q0 _
end; -- of the method
& j' t+ C3 }9 Z4 a( h |