/* called by: entrance ctrl of the object 'track'' `; r* h3 S' Q# O% ?
*// z7 m/ V6 L7 I$ |& z/ k( c
is8 H( ?" |$ @5 `+ w( {5 {3 w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 h" x9 s, c. i! mdo
2 s2 d: ~. ? _* f Lan := rootfolder.Internal.Tools.AOLlanguage;1 s0 c0 w$ e0 e0 d' P
if current = @.Destination -- else return3 h0 I6 k3 q( ]6 P
then
n, @2 H `; Z, i3 b) G4 W. M @.Destination := void;
/ |4 |5 Z. U8 Y& P if @.occupied then( t/ [/ W# T5 C3 w
part := @.cont;; A+ d9 C8 v3 {* [- s
@.transpOrder := void;
$ _! s% b9 A; M6 q( z v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 B' z' ~0 A$ D+ q2 F
@,root.eventcontroller.simTime);
+ r* A$ U6 k: }% }1 R( |5 | @.HasOrder := false;
; ?# s D; M$ [) L6 r1 |3 ~; _ @.DrivingHome := true;
5 i# Q; _+ ]2 c" |# l3 d* _$ T rgManager.tryToStartTransOrder;
/ J$ J- G R- ~$ `5 g if @.Destination = void
) m% R% m( w3 s7 t3 G0 \ then -- no transport order for vehicle @
7 s w9 g) y. B- N# A @.Destination :=
; P. j5 m. i# H; x; k; Z$ [ rgManager.nearestFreeStation(@,track.~);: S7 A$ D S6 ~/ m# r) V2 b" j
newDirection(@); ! q4 [7 h0 |1 K M2 o6 z
if @.Destination /= void then
4 w* [& Z# O7 X' l$ b+ u @.Destination.NumReservation :=
, g k2 J5 h. ~" X/ X( } c2 W @.Destination.NumReservation + 1;
' M! k: y* Q+ A3 v6 b% z end;4 \# l+ D* {; i7 {/ q
@.CurrIcon := "drivingHome";
4 F. h( j% a/ k" w3 ]# l8 n2 v @.DrivingHome := true;
1 f, W* s. e% t# P7 }9 `$ a end;
! n* U |( t. t6 O8 Z% z else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 e! f; O% p0 y$ N0 \
part := @.transpOrder;( y( Y. G/ c) N8 {: |
part.move(@);-- load part
1 a e& M( g r* s: g T2 Y$ }/ k @.CurrIcon := "load";# O+ }- d% f8 Y$ q- b* {; }
GlobalDistObj := part.globDestination;
. G6 v8 G! S; G7 u" `/ G( X assignLObj := rgmanager.rgAssignL;
; @% v; J+ B4 K) ?6 U row := assignLObj.getRowNo(GlobalDistObj);
( w# O0 u3 i# E if Row = -1 then -- since 70) K" j( A" z2 ~
if lan=1 then
) I2 {2 L! P, F9 a; ?. I# ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ U8 z. h; W2 R to_str("in der Andockstation: \"",?.~.name,"\""));4 v8 J1 c, {1 ]7 N. _' s
else( X. V" B+ r9 e$ N& f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 G3 }3 i/ I9 |* a" @. l to_str("in docking station: \"",?.~.name,"\""));
6 o: r& F0 t x8 W* c end;
% t! p0 ^4 ]% P" W3 \+ A u else" x9 }, H0 ^) g1 L! C9 m/ S
@.Destination := assignLObj[1,row];! g0 ~. l0 \; P9 R
end; 6 a% V- w6 q; ^6 [
newDirection(@);* W+ ?! `$ j9 F) ]7 P
@.HasOrder := true;1 M L7 T) Z! \+ z \
end;6 f; q' s9 |; P/ F$ i
end;. @3 B/ }! P9 i3 R& Z7 O
end; -- of the method9 f- @+ R) F4 T1 x3 d9 u
|