/* called by: entrance ctrl of the object 'track'0 A0 V0 ~- L- S. }
*/
' | y8 `8 W, Y9 nis
. b$ J i- {+ D9 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 E! N1 c, I& ?: c8 o, Edo. t- r' Z5 u1 n0 X5 ^. F) R" Q
Lan := rootfolder.Internal.Tools.AOLlanguage;; U0 V' m j; |4 ~& p: }4 v7 w
if current = @.Destination -- else return
% d! W7 ~5 o7 U* Y5 N8 T. I then8 N- Y9 W+ g5 M) o2 J8 }
@.Destination := void;
* u; m/ C5 @4 |0 h% i2 e4 F if @.occupied then% w1 K( ~' E* q. ^
part := @.cont;! G; X) t5 a3 c1 C1 Q
@.transpOrder := void;2 M- ?1 \% A. V0 w/ d# Z) e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' V" d4 u6 M" ~ P
@,root.eventcontroller.simTime);' T9 s7 S' x5 X' s. i4 q8 y8 a
@.HasOrder := false;
# d) X% E/ x. \" q6 r @.DrivingHome := true;$ J- e% W, [# E0 ]1 E1 W. [8 u
rgManager.tryToStartTransOrder;- Y4 ^- h" ]7 o, I9 U1 u
if @.Destination = void
+ z, A3 G8 C' z& a. v then -- no transport order for vehicle @
" u+ b/ }" s8 k1 W @.Destination :=
4 t4 O$ Y# K! e rgManager.nearestFreeStation(@,track.~);* f* j+ Y$ b! }
newDirection(@);
- c9 `8 D4 S5 E if @.Destination /= void then
! P* Q( \0 @+ c5 v7 P K7 V @.Destination.NumReservation :=! `8 }3 N( c2 m7 a! l( ]
@.Destination.NumReservation + 1;
7 z; j N2 a6 a8 {5 s; N end;+ i) f& Q+ G1 o" R: w/ E0 j! g
@.CurrIcon := "drivingHome";
5 V* f) Z3 }0 d @.DrivingHome := true;
0 U+ g( i l1 @2 c3 ?( e; b9 r- x end;
1 u5 c" r- Y# G7 B else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ B: i( o, v2 p" E# m, b
part := @.transpOrder;
8 J6 {0 l; V3 T) m0 h part.move(@);-- load part# @& \* Z- K1 P1 |6 z
@.CurrIcon := "load";
7 b; @- _6 x: n* B GlobalDistObj := part.globDestination;
# J/ n3 w2 y' Z assignLObj := rgmanager.rgAssignL;
4 I) n& h; f. Q, F+ c/ p' K2 U) Y+ o1 a row := assignLObj.getRowNo(GlobalDistObj);! F+ z* W6 q1 s9 G- z( H, }- J
if Row = -1 then -- since 708 ^/ p+ a' [" u& R
if lan=1 then
+ c& d8 k" N& W+ P; f7 j* a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 ^6 b2 f6 a8 W* v1 A2 P% } to_str("in der Andockstation: \"",?.~.name,"\""));
( p' X3 o) j, M0 W) j else5 d5 w {1 `# p) z# E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ p+ Q) t0 i+ J* {- Z to_str("in docking station: \"",?.~.name,"\""));
& d) W: r9 W: |1 n2 C end;
# \- d& ~; ]8 t$ b$ k* f else, e7 R. z$ ~: s* t: W1 h3 |
@.Destination := assignLObj[1,row];+ }- Z# x5 @# ^5 B
end;
* S& }5 M$ o7 M/ b( [7 G* z: s: C1 Z newDirection(@);
/ m! U: x2 @) X0 Z, V @.HasOrder := true;: b/ [3 [9 V5 I9 F" L% {& b2 i
end;' V1 J7 v: Y$ J& V! k v/ J
end;! n8 S; G9 p& s* t' e& }
end; -- of the method! k" V5 n q% J- i5 Q, q; Y
|