/* called by: entrance ctrl of the object 'track'
2 ^! \, |- L0 \*/2 |# @2 V: h+ m/ C* V' C6 o
is
" a! ^8 r' \2 \' M1 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, D7 ~: x% X0 \. Ndo
; E8 w# D( @, t! [! W4 P Lan := rootfolder.Internal.Tools.AOLlanguage;
$ R. ^, D/ w6 X o0 ^# | c: V# ] f if current = @.Destination -- else return9 U0 ~' g9 H& `; C! k( d5 K3 S
then
) o- q& p6 E& l7 ?8 y5 ? @.Destination := void;, @: [5 ]+ J( W% f' L
if @.occupied then1 i* A5 V) }& f- j# Y
part := @.cont;
! _/ |& P6 }: v7 |( G# q' Q @.transpOrder := void;
9 s' x; S, }/ f# h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, c- z# [. v- I! u% h9 Y @,root.eventcontroller.simTime);9 w5 w! L( X+ R4 C9 E" a8 p2 v. T1 _% _
@.HasOrder := false;3 f' p+ h9 E3 C% D+ H2 p, c% \
@.DrivingHome := true;
, `4 X9 p6 V/ M" s" H: W- u+ @8 f3 a5 P3 c rgManager.tryToStartTransOrder;
+ V7 X: i; Z" ^; M+ m if @.Destination = void
) R% v, b, B( c! ~9 G then -- no transport order for vehicle @
/ D' ]! B3 `) P- M3 L' z d2 y, } @.Destination :=
# X9 v' V" z5 h+ @ rgManager.nearestFreeStation(@,track.~);- d( O8 ?7 g7 j6 X5 s3 j! h
newDirection(@);
0 r( [- l9 R, Z" x2 o: y if @.Destination /= void then
# @2 z; V4 a" B, \, W @.Destination.NumReservation :=
9 U* f" c) [2 O @.Destination.NumReservation + 1;
+ a% t. ]: W6 J$ W! U7 g end;
+ T) V: b* ?( q: Y0 e, i @.CurrIcon := "drivingHome";" {/ n" m! }/ J9 }5 A$ d" w
@.DrivingHome := true;) z" Q" E+ I% U# u& Y
end;
# N8 Z! E# V# l9 q else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 f4 F% k# O; W$ M0 C0 }# m
part := @.transpOrder;1 D" A, p9 \+ e) C) ~
part.move(@);-- load part
* H2 N8 x6 {5 p% M @.CurrIcon := "load";
3 M" ?. W6 J1 h* X$ l GlobalDistObj := part.globDestination;! m3 a/ w/ E0 ?5 E
assignLObj := rgmanager.rgAssignL;- b4 K8 b! z7 I( v/ J
row := assignLObj.getRowNo(GlobalDistObj);+ f2 w3 E1 z( V
if Row = -1 then -- since 70+ d/ e# b" z- Q) K+ t9 E
if lan=1 then
' ?- E+ n$ j0 R( ?( s! v6 _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# C, k- U) Q. k# H- b# W& U) | to_str("in der Andockstation: \"",?.~.name,"\""));
5 g o4 K+ a" V+ d) x2 p else
1 n& o/ g6 E' C8 [; ^, G* w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ P0 X4 @( ^+ c: j8 K5 x! H
to_str("in docking station: \"",?.~.name,"\""));
( s5 m8 ~3 l' R6 }+ s. ^2 ^ end;- O# g3 v; [! v3 G' I( S
else
0 k, y. _* E6 { @.Destination := assignLObj[1,row];
/ R, ^& H8 b! ^* U9 s* e end; 6 \* Y* t+ k, l( x1 ]
newDirection(@);- Y0 G1 a0 T' Q; B& w
@.HasOrder := true;9 Q. G6 ~2 x5 {$ j5 q
end;
) F: h1 k7 j0 _ end;
6 m7 u2 V" ~" m2 a$ [9 x% S n1 t, S8 uend; -- of the method4 h' q% j7 p3 f( }& E9 C
|