/* called by: entrance ctrl of the object 'track'
9 A) j4 A0 u, n3 A* y*/
# k, h9 |% C! q& l' D! dis
) I) n P* ?9 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& V; P8 u! l& q) w% g$ {$ a, D7 ddo; \. N3 ], o( J2 J0 A. v; J
Lan := rootfolder.Internal.Tools.AOLlanguage; e7 B8 P+ }0 t+ t7 _0 _
if current = @.Destination -- else return
% F3 c/ R# v+ `! K: @" [ then K6 s% _+ O- ^/ M5 D! G4 j" n
@.Destination := void;
, ^0 C; f$ ]0 H( \8 a6 p if @.occupied then
# ^. ^: h% h2 b& I& O6 {; ? part := @.cont;2 o, k5 X- M6 o) e% X# B
@.transpOrder := void;
+ v- C3 }6 _2 K# m% ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& ]6 p; \/ W( L
@,root.eventcontroller.simTime);/ v! t+ g/ R9 h# N1 ^) w$ }" D4 Q6 e
@.HasOrder := false;
' Z$ C* g9 Y% t; M% f- j9 _ @.DrivingHome := true;* v' G" O5 T+ H9 m
rgManager.tryToStartTransOrder;5 s$ l# A: s5 m2 _/ q
if @.Destination = void; j& k# U3 A0 B- k, m7 N+ E3 W1 h# f- K) l
then -- no transport order for vehicle @, m! O% z, E! Q& a3 C, K/ o
@.Destination :=7 j0 [4 U; K* A4 D. n& l2 J
rgManager.nearestFreeStation(@,track.~);
- _2 A) \0 V) T( ` newDirection(@);
% e2 ^0 l, o; V; {0 _: j if @.Destination /= void then
' F3 K7 X8 ]& r, w4 Y, ? @.Destination.NumReservation :=
8 A2 m% B! V2 `& U3 }/ ] @.Destination.NumReservation + 1;2 h2 [2 k# O2 W# }. {5 t
end;' x( ^* e' I( e2 |
@.CurrIcon := "drivingHome";
6 R7 W; u# y) G2 E0 T @.DrivingHome := true;
4 Q. |! w5 s/ j7 C0 X end;% e$ l8 T( j8 j. o" a; O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. h+ u9 y8 F9 A part := @.transpOrder;
6 X, [. T$ n- Q+ c" t9 ~1 A0 i part.move(@);-- load part
# X" Q1 ^& i. }$ t' l @.CurrIcon := "load";
- T$ i1 e8 v6 n& Y7 Y, p GlobalDistObj := part.globDestination;
/ b3 k2 t. Z& u* I% e. n! \. ?% } assignLObj := rgmanager.rgAssignL;
6 [& F# T1 ]' R3 N! q! Q row := assignLObj.getRowNo(GlobalDistObj);
/ x8 z. T* D( j4 b if Row = -1 then -- since 70
# P' J8 z4 L/ e5 D# f2 {: @ if lan=1 then7 ]) c$ a- q% T @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 i, p, ]) c4 p7 t6 z) ` to_str("in der Andockstation: \"",?.~.name,"\""));
) R, S8 @: H9 y3 p7 U8 y! t else
$ w# _: E* T! V( D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ^( @ t" q( b6 W' z% y to_str("in docking station: \"",?.~.name,"\"")); 6 ~- X" G4 \7 V( i% {" f
end;; A( g2 c7 H. o }% x( C9 V X
else
% }9 b% A* e" l9 S* |% C) u/ c7 O @.Destination := assignLObj[1,row];
f$ B5 h0 J4 }& E$ U end;
+ T" _! A' T( v& S& f } newDirection(@);! B; _# e0 g8 I% D' a
@.HasOrder := true;
4 T. n. ^/ N* k* P s0 y9 }# D end;
+ S- g! a7 r! ^, {: b6 c end;
+ ?3 ?6 u v6 [) n1 k8 y' Nend; -- of the method% ?; K, E, g% H: _
|