/* called by: entrance ctrl of the object 'track'
8 B( p& S" T4 K; b. M*/
* ^1 j+ \0 N; }is
4 m% E8 `; E" W2 }" H* k5 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;# ]& |' A# v; g6 C) h# B6 g/ p
do
|; @( }4 J$ x. i' p# @# K8 h5 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
$ {8 U; n- I5 X6 Q* ~ if current = @.Destination -- else return
6 L$ A) E4 ]# Z: H# ] then5 T0 Q# i2 I, B9 _
@.Destination := void;+ T' w9 E! w) z* M! a- m( `5 ?
if @.occupied then
5 j+ V2 Z2 s& v! I8 n0 G part := @.cont;
W/ y- c2 [0 s7 p @.transpOrder := void;" i# t1 ` c: q2 e7 \6 ^$ K# N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. Y8 ^6 S0 t9 W: M Z, ?( H: }* _
@,root.eventcontroller.simTime);- { r4 _4 w$ S0 T, ?& }0 F* L$ U6 y
@.HasOrder := false;# u2 Q5 }- m3 \+ O/ s
@.DrivingHome := true;; J' n. C9 e7 B2 {: K/ J. e
rgManager.tryToStartTransOrder;. g. T9 c4 [9 B1 l4 V
if @.Destination = void0 w! @ e& S9 L$ _5 f( e ]- _
then -- no transport order for vehicle @. x" ]! \' |% |# n4 w
@.Destination :=
, o) x" l( c7 B1 h& U rgManager.nearestFreeStation(@,track.~);; F2 g) o! w9 [( Q( _$ L! }* @
newDirection(@);
7 C3 ~4 I" F9 Z2 c if @.Destination /= void then0 a/ A# ?* ?3 X& j$ H7 q! b
@.Destination.NumReservation :=
! J' `" M& ^/ T0 X& r5 d @.Destination.NumReservation + 1;
' ?0 A/ J% i. u end;3 I* A+ ^$ ?0 r- M
@.CurrIcon := "drivingHome";
4 s7 x) ~; I) r* ]$ V9 w @.DrivingHome := true;
4 o- {1 |8 {! z J% H3 F end;
! M* D% M5 Z% v$ I& k4 l* B E) E* M! b else -- the vehicle @ is empty, both vehicle and part are in the same dock station. @1 O$ x9 g7 o
part := @.transpOrder;
( f% \: R+ j9 f6 R# c' y; M" z$ X! v- v2 i6 b part.move(@);-- load part6 S+ o4 W' n2 n
@.CurrIcon := "load";
6 n$ s! o+ [: C, V" Y2 Q& [ GlobalDistObj := part.globDestination;
/ I, }1 i8 d, F4 j K assignLObj := rgmanager.rgAssignL;
. [- K; `% t3 M row := assignLObj.getRowNo(GlobalDistObj);
; o6 [7 J8 h: J if Row = -1 then -- since 70
7 \% g" [9 m _" N: z {4 `( @ if lan=1 then2 f9 ?" L! Q4 |! _9 ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 y; o9 T8 {/ [$ r& x to_str("in der Andockstation: \"",?.~.name,"\""));
2 W8 Z! n/ E: v5 q0 i: L9 E) k4 x else) ]* r9 v9 f# J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% z5 s: @5 O' Z
to_str("in docking station: \"",?.~.name,"\"")); % ^" d' o! q1 J2 U U. D, h
end;
0 L' s6 m+ q4 ~$ @$ D+ y3 O6 A else
- ?. y) N3 ]7 K' M" R- h @.Destination := assignLObj[1,row];
* Y0 v' \0 V* Z Z3 r, c6 @ end; / C2 g* ~3 u) }: H
newDirection(@);
2 A( ~9 ?- Z/ ^2 w4 j: H& q @.HasOrder := true;
! D7 `1 z1 Q" W7 \* L- ~. N end;
7 Q* ]+ {! U2 ?" @ end;
/ ~- s2 X! q( e0 v% pend; -- of the method# n" I9 q# B' J! v- j1 m
|