/* called by: entrance ctrl of the object 'track'
! s/ w; \5 A1 u' A2 ], {+ I*/! ]3 R6 m9 b3 ~/ y9 T
is- W6 P6 t" R) n9 M: l8 D6 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: i+ r3 g7 N' o7 }' J% s% A/ a# V r
do6 d4 t: ~7 i( s" g5 B) e
Lan := rootfolder.Internal.Tools.AOLlanguage;
! f, r& u0 u+ b if current = @.Destination -- else return9 V' G8 x3 J5 z- N: l/ T
then
( S$ E3 G: L8 R) i* o' C @.Destination := void;
& p; O" \3 w+ Q. F7 f: U if @.occupied then
! O+ b# d5 P b4 K6 m# b part := @.cont;* v9 J! q/ D3 G; g+ O8 x
@.transpOrder := void; v+ b- u+ Q: g9 W5 [: `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," U r1 o# ^5 i s5 X4 N' C' U
@,root.eventcontroller.simTime);2 p' k% \9 q! d& j& Y9 a
@.HasOrder := false;% J0 y& T# i! A+ [
@.DrivingHome := true;3 \6 k1 [. J$ ?/ r6 O: u3 w4 s
rgManager.tryToStartTransOrder;
+ U/ J6 Q+ [ r* C9 B1 ] if @.Destination = void+ _: d" e: g) Q2 o9 g- o# E
then -- no transport order for vehicle @8 \+ p- F! _" G0 _- _2 B5 p$ U3 |
@.Destination :=
6 P: r; _# ^/ d% O6 m6 {/ ] rgManager.nearestFreeStation(@,track.~);
, V8 ]5 L+ R, }& w$ S newDirection(@); / c8 I( c# O9 a- }5 {/ M/ i. l* v
if @.Destination /= void then) N4 f/ S1 w, f7 {# F/ U. i
@.Destination.NumReservation :=
7 s5 u* c& x" R0 B, ?3 V3 y8 t @.Destination.NumReservation + 1; e* H: y( H3 u& c
end;
8 O) T, N, t! E7 \, e @.CurrIcon := "drivingHome";9 f& M+ h# `# w% z
@.DrivingHome := true;& `/ i& v) Z" L
end;
5 z0 o3 O: U! C else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ F( I( c# d+ z! e+ K2 Z! G
part := @.transpOrder;: x p$ t/ J5 W9 o: x. A- b: C! H
part.move(@);-- load part
& p7 J- K3 b8 y, v8 ~ @.CurrIcon := "load";+ b% F- Z/ p6 b( D0 I- J
GlobalDistObj := part.globDestination;
' F, a9 z* K2 }, J9 u" i: B assignLObj := rgmanager.rgAssignL;
# a& a% x- |) r/ }, k6 L row := assignLObj.getRowNo(GlobalDistObj);
- U7 y" [ z4 O if Row = -1 then -- since 70, r, c$ c$ P; d7 U: a2 M# Z; q
if lan=1 then
$ {' O( _0 K5 `# l7 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' G4 \* C4 Q0 R, R7 g* X to_str("in der Andockstation: \"",?.~.name,"\""));
6 @) r; Z- t0 }# {2 _: A! s else/ p! e. F; s% ?0 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 S- t1 N2 T: o: r
to_str("in docking station: \"",?.~.name,"\"")); - Z; V+ {& v2 z' ]/ X) b3 U
end;
' N3 m' b8 l, I1 j. g else
0 S' f: I/ S8 z& |# \. Y @.Destination := assignLObj[1,row];
n3 q4 `- Y3 V% u# A end;
# H: w- n9 r% U7 e7 k% d newDirection(@);
* b9 h; t$ y$ A( N* l0 e } @.HasOrder := true;
X' `3 |8 U+ X- } end;, v' S# B) i+ y4 k3 y* a( v- Y" `5 [. w
end;
( k: B2 u* y2 X) j- |, jend; -- of the method
, j; Q* }2 j4 g2 B |