/* called by: entrance ctrl of the object 'track'4 Z* v( @- \" }2 b& l6 d5 x
*/. z# B' ^1 n% y4 r6 o+ B( Z' R
is
8 A# s! j" P' Y& f: \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;% v" C: ~2 F1 X6 O/ [7 [
do
' P0 y5 E" `! k( U2 Y8 c! K$ d Lan := rootfolder.Internal.Tools.AOLlanguage;" l. {2 `' `9 g+ _
if current = @.Destination -- else return9 y8 {5 M+ y3 l3 f. e# D
then
/ c( `/ E! m ]6 v @.Destination := void;
& M* d) q* e/ }1 h$ A. g4 n/ _3 K if @.occupied then7 p: ~5 k) g! b# b7 L- S) f) i4 i, {4 @
part := @.cont;
* y9 k. H( p, Z% V9 [ @.transpOrder := void;
5 z4 K f) b* i1 j; s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- D) U+ N& S2 k
@,root.eventcontroller.simTime);
! s b) _0 r) a+ N) A, d* {6 W @.HasOrder := false;# w* }: R& q( W# b! J+ {8 k
@.DrivingHome := true;
. n; Y. B3 S2 I: [8 s& i rgManager.tryToStartTransOrder;
' I! s/ ` {; [" w6 A if @.Destination = void
9 K0 |6 V; J' {& T( p1 i then -- no transport order for vehicle @" Z' D5 m# U$ P2 \+ `: _1 I3 v
@.Destination :=
, z: [0 j9 y! D6 `# E3 a rgManager.nearestFreeStation(@,track.~);8 M: q4 M9 m% j+ \
newDirection(@);
# F" U. _6 A' {( P if @.Destination /= void then
& D: w+ {$ L+ U! E t @.Destination.NumReservation :=' o U; V/ V# X7 I$ C# t% ^' \
@.Destination.NumReservation + 1;' {# l& g+ B4 y1 Q, q
end;
0 P4 a: n" w ^& a6 k @.CurrIcon := "drivingHome";
; F8 Y* l3 R7 ?" E @.DrivingHome := true;7 x m5 `) n# h7 I; S
end;$ f: ~! h6 G( D( h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 |/ d+ x! p0 e$ N6 w part := @.transpOrder;
9 R7 `: p) V+ L9 p part.move(@);-- load part
( D' D! b# r' m8 a. F0 z! T @.CurrIcon := "load";5 e; ?# W* }! G8 s: @$ ~4 \# ]' C
GlobalDistObj := part.globDestination;
* m" U9 D- n C" N/ w assignLObj := rgmanager.rgAssignL;/ @ D7 m! D1 y( h" O) d) }9 d
row := assignLObj.getRowNo(GlobalDistObj);, q' Y& E0 O/ l7 [6 i4 `; R
if Row = -1 then -- since 705 u4 J2 }8 b4 J. p! D6 e2 l
if lan=1 then. j9 T% m+ B: s. K* G5 F8 a$ w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), C! D9 N; q/ i+ n7 N/ ]4 d
to_str("in der Andockstation: \"",?.~.name,"\""));
: t- H5 ?# Z# r6 Q% G: G# I \2 Y5 X else$ G. m- z$ v# C! T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ a7 R6 a7 [; K* o5 {5 V. @ to_str("in docking station: \"",?.~.name,"\"")); c% W& o+ I: C( R; @6 F! D- t% r
end;
8 A' V" z x5 K g! H else! t" k- C* U' m% |+ c; B( T
@.Destination := assignLObj[1,row];
# g; B! O7 O+ |5 a) D( k" H end;
) K2 d* m3 |/ x. R2 g$ h# F newDirection(@);9 G$ f' e. `! X8 K2 O% Y( v
@.HasOrder := true;
7 C) c: K* F% x C/ v. K; K end;
) n4 ~; n. ^& \6 m, ^' P) o: L9 ^ end;
7 \3 G3 {8 X" O! C- t8 Nend; -- of the method
, D4 M8 y& B% ?* w" m4 K1 U |