/* called by: entrance ctrl of the object 'track'3 [. p4 q4 i" c2 h
*/2 S1 y. {$ p+ W/ M+ ~
is, Y: c, Q1 x, m4 R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, V: m' w: l* d, [3 w' X
do, k, K# q: I1 ^6 ~7 \
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 g( z$ v' @+ R3 ]2 z( u; w7 A if current = @.Destination -- else return
! e) ` r, b: C. |9 D7 v- r then0 }" r8 v6 T' D* F/ l
@.Destination := void;0 _; f& ~0 x' Y0 N( A- `
if @.occupied then
2 t6 P/ L9 U M% x |# X6 y part := @.cont;
Y$ p9 \: U' V: Y) m- { @.transpOrder := void;
+ T) I: N1 c$ c6 F* Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ }/ ?+ ~' O3 s# x* T
@,root.eventcontroller.simTime);5 y" R" y6 S6 f [' ?6 I* z
@.HasOrder := false;! e# P8 T- ~; p; p# O
@.DrivingHome := true;1 Z. j, W ?9 z: |
rgManager.tryToStartTransOrder;6 x7 x" c, e5 u3 E( X2 I
if @.Destination = void
9 u# j4 G9 t4 ?7 Y! J9 y then -- no transport order for vehicle @
2 r) m7 L) e' K# q @.Destination :=
* V. [. p" o: s) b3 I rgManager.nearestFreeStation(@,track.~);
) m+ A& [0 j# F# W3 J. V2 ^ newDirection(@);
3 E4 H$ Q" s; F3 W5 d if @.Destination /= void then
. h8 H8 V- ^: E7 k @.Destination.NumReservation :=
2 L: V0 c8 W- k3 c; \$ O. f# p @.Destination.NumReservation + 1;
' j+ V& e' Z% p; b end;% z! K' l# e9 w- v2 T0 m4 z/ V
@.CurrIcon := "drivingHome";# f1 x- p& p7 E3 C- }
@.DrivingHome := true;% D3 v" x0 N# f4 s2 ?
end;
, I X: T/ K4 d% |' F8 X Y- a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# q" F# l) _/ u3 Z part := @.transpOrder;
: G: L& |/ r4 e part.move(@);-- load part
, N$ M; Y3 ^) O5 A" {+ Y' D5 p( U4 Y @.CurrIcon := "load";/ W3 Z8 N4 p/ n4 q. z
GlobalDistObj := part.globDestination;
' G' \3 ^5 Z0 \) E, l assignLObj := rgmanager.rgAssignL;
) p( I+ W3 @% `: W% f! Y0 R row := assignLObj.getRowNo(GlobalDistObj);
. _" r" p3 p3 J0 t if Row = -1 then -- since 707 V- F4 n8 A$ p7 s8 Z) t# O
if lan=1 then% D+ N. Q+ f: u0 x* T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" Y6 t/ x9 I6 ^4 x8 l1 ^) F w _ to_str("in der Andockstation: \"",?.~.name,"\""));
. t% h `! G" G; t8 I1 e else
4 L4 Q6 X1 `( S% U8 V* E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
d+ }8 j, s' b( [' l# A8 V, Z to_str("in docking station: \"",?.~.name,"\"")); ' ~4 h/ Y. n5 e& C
end;
: n1 d3 X7 n& U* a9 B; x1 Q% D% N+ [ else
, p Z$ m0 w# e( U4 [5 m" O" E6 B @.Destination := assignLObj[1,row];
L u' i+ R! b" e9 g end;
8 R6 a! ^) ] e: g7 J newDirection(@);
& e. f" Q1 Y) |. z @.HasOrder := true;# I/ ^% d4 A% Z; u+ ]' n( J( s+ P4 S
end;3 G0 i- c: U( I& F% |
end;+ e9 F( r6 h y4 `4 ]2 u0 z: d
end; -- of the method
* T5 i3 \8 {3 O5 y% E- X |