/* called by: entrance ctrl of the object 'track'1 A4 X+ u+ \4 A$ Y
*/
# t$ X4 _ {4 u% Zis/ K, ?: [! q b5 R) s% v% U, x2 L I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 B) ~! W6 X1 [% T( X3 tdo3 K/ T: p+ g+ j! `- G/ N8 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
( l0 y1 v1 [3 T: H+ z if current = @.Destination -- else return
1 r w' b; L+ M4 _5 W then
6 u% v* x* q9 Y3 T& ]+ R8 @ @.Destination := void;
- ~& C5 |: X$ v# ~8 G0 R if @.occupied then3 d3 I/ g& n& e+ X
part := @.cont;0 u7 G0 X$ L; F: T( D
@.transpOrder := void;4 D6 [5 D: Q5 S, g8 Z" {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: H/ y' n: n/ X! S6 U! c; a @,root.eventcontroller.simTime);7 }4 j3 Q/ i" A2 B
@.HasOrder := false;; K, ?9 T1 H) s2 |
@.DrivingHome := true;* V& S, M( Q5 f; m6 ~# a
rgManager.tryToStartTransOrder;8 V# u. q) r* K' x, x$ E3 t
if @.Destination = void7 O: @* }) L3 n9 H
then -- no transport order for vehicle @
5 Y) _% ^8 c# k1 ~; @ @.Destination :=" E" J7 P- k3 z
rgManager.nearestFreeStation(@,track.~);
. L+ @! M2 }# S8 {; R! u' q; h) j newDirection(@); & K }1 F- P* z. K% B
if @.Destination /= void then
$ X e; q! w' H& n% V @.Destination.NumReservation :=
1 f" f0 }9 N# M) r' e% e4 l1 Z/ t$ a @.Destination.NumReservation + 1;7 f. n( f6 A. p- r
end;
5 H! ~1 Z) y8 v6 V0 D X% E @.CurrIcon := "drivingHome";, S5 X2 P" }. \/ P- q
@.DrivingHome := true;
1 b) X) q. }. e- P end;
: u A; R7 y/ s" A( Z, i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ s3 k/ q, f" x$ ^, N4 c$ A part := @.transpOrder;
! A. z2 ^' k! R; k ? d7 ] part.move(@);-- load part
2 Z+ {& g# `4 i' V2 X% t: a @.CurrIcon := "load";- c/ G/ s+ W3 ^2 r) N
GlobalDistObj := part.globDestination; E7 ~* z7 T' K
assignLObj := rgmanager.rgAssignL;, h) ^" Y8 k5 g5 Y
row := assignLObj.getRowNo(GlobalDistObj);. b* @7 V& W+ J: f! Y+ J
if Row = -1 then -- since 70
, {2 k& B6 U4 ?. P$ n$ G if lan=1 then* f$ g: e9 V: K; B( }' E) }( r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 N# Q9 p% e" V" I" U( v! Y to_str("in der Andockstation: \"",?.~.name,"\""));
$ [/ H2 h* T' \5 d else
, u( j/ F) A5 _3 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. N, ~* j& g8 x3 U0 T
to_str("in docking station: \"",?.~.name,"\"")); 7 w" ^# f+ s% d9 Y; S: |
end;/ B3 E$ S4 x J( P9 G8 n
else
3 Y) C) c2 e& ^6 N8 ~ @.Destination := assignLObj[1,row];
) I b% D; U- F1 s: a end; 5 I5 ]9 q3 L# x6 U3 E t8 T; o
newDirection(@);1 p* A1 P ~3 o+ ~! E
@.HasOrder := true;
9 n( Y( |/ o* a& P5 P2 u) I( S \ end;0 h) z% @% K# I: k: W
end;9 _. x1 Z* |" V
end; -- of the method
9 |. x& @7 M* i! V' Y+ ^, Q# l |