/* called by: entrance ctrl of the object 'track'$ j9 F! ~# R1 h; B- t
*/
$ } [+ q9 p$ Z7 j9 Iis0 x- e5 ^9 f b; |3 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) L1 F+ u7 Z/ o5 x4 gdo& \, x5 ?9 \* I! W* H4 `2 s }. |$ [; @
Lan := rootfolder.Internal.Tools.AOLlanguage;
, s! r9 {6 @/ X5 ~ n if current = @.Destination -- else return
& ~- h+ h" R& X$ I- N' w; r then
& @" V2 S4 J' e# H7 u, ~# Q5 y! e @.Destination := void;4 D; O, W! z& p% t9 d
if @.occupied then
6 d; ]$ D( h m1 J* d part := @.cont;
( z* O( X: A' n- M* e8 c @.transpOrder := void;
- |" Z# E, r0 r9 A* f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 B5 d J! j2 I2 H) U0 Y, Z
@,root.eventcontroller.simTime);
2 L$ }! I' `, N: b9 C9 l @.HasOrder := false;4 u- s* D+ X) ^6 C
@.DrivingHome := true;
) o' N3 @- w/ I5 S1 t rgManager.tryToStartTransOrder;1 k( Q& Z( T$ m* ` a! W5 s5 V8 ~, a
if @.Destination = void
4 ~! G& k' f/ ]6 @ then -- no transport order for vehicle @
7 }0 f+ t- P9 \0 O& A) M @.Destination :=5 a4 L* ~# d" C8 o0 `
rgManager.nearestFreeStation(@,track.~);2 I) G5 e) F7 V, D
newDirection(@); % K/ H5 ~" }! |/ v" \
if @.Destination /= void then
( [& ^/ X: q' a3 t' A# X4 i @.Destination.NumReservation :=/ M: r) K8 p# B
@.Destination.NumReservation + 1;* C' Z! L0 k5 ^1 g
end;
$ ?4 R' u) \/ ^ @.CurrIcon := "drivingHome";
# A7 d" X. h5 I' E" F8 L @.DrivingHome := true;1 J8 T, K0 v$ G& w( j
end;6 o1 N C1 ^5 k/ Q' D2 ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( d+ }! b7 J0 X7 q& t) ^! g/ S9 m
part := @.transpOrder;
8 W2 L& U1 x/ T1 G2 r part.move(@);-- load part2 O2 W5 S- y# W
@.CurrIcon := "load";. l7 o, w; n0 y6 P: r
GlobalDistObj := part.globDestination;
# Y9 o% T' g' W( b# T3 ? assignLObj := rgmanager.rgAssignL;$ D7 t, ?& i9 l. g/ L, L% i
row := assignLObj.getRowNo(GlobalDistObj);
( E7 f& @% ~8 a if Row = -1 then -- since 70
' Q9 d, R6 }' q0 Y5 ~$ D if lan=1 then
H# y) ~ v' K% y5 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# L+ G! J" N! u. H3 e% @ to_str("in der Andockstation: \"",?.~.name,"\""));9 i! ^ p& I7 ]9 r1 m. s
else9 n! J& U% o, m+ l" M, k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 s. `& s2 O5 q! I to_str("in docking station: \"",?.~.name,"\"")); 4 v7 i3 P) P3 b6 I, U( P
end;) w: F) A* `* V2 x
else# d9 D, \1 k) L
@.Destination := assignLObj[1,row];* @" S% b( Y( O! `, \' \5 y- g
end; 3 O# d% {2 S0 B! E
newDirection(@);
+ @) v) D2 l0 b; T/ i! u' [ @.HasOrder := true;
# v0 o2 p3 i( G end;1 b2 t4 [' ?2 J- Q" D+ k5 P9 B
end;' K8 J; F$ k0 x: u. c- ?( n3 W
end; -- of the method
! c5 v1 {6 c$ E |