/* called by: entrance ctrl of the object 'track'1 o) x0 R0 s0 Q% C
*/
' b6 f% s& Q- W& S. n% o `! Vis
q# K6 `8 K; Z( q part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 o1 f% p0 n# C+ |) N% L
do: e5 p! @/ t3 S, k3 B. W- Q
Lan := rootfolder.Internal.Tools.AOLlanguage;' K! b2 s+ d2 d
if current = @.Destination -- else return
' i$ E6 o. a1 ]) K) V( T then6 r ~2 m9 W% @; k' e
@.Destination := void;) j9 S' D( M, [
if @.occupied then& _4 L( L" F2 N7 H
part := @.cont;$ z$ ?; j7 p" L' D8 M' [
@.transpOrder := void;, d5 L0 w5 K2 v' P# `. U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% a4 L9 }& L2 g+ V% [
@,root.eventcontroller.simTime);
& r% Z# |' y0 P) S# l. E; ^7 H @.HasOrder := false;1 X) a' `! I9 g6 O- Q/ `
@.DrivingHome := true;& ~7 ]/ }2 ~2 u
rgManager.tryToStartTransOrder;8 k$ L" c4 n$ ?* f! a. J
if @.Destination = void
& X% N. Y+ C3 |6 E5 p then -- no transport order for vehicle @2 ~' l. x( C5 W. a6 \' p
@.Destination :=7 ] V* f3 E1 I) w/ G) H, @7 T
rgManager.nearestFreeStation(@,track.~); k8 G9 c# D* {+ \
newDirection(@);
- e5 O: p; X7 D' Y I3 e# B if @.Destination /= void then! e% d+ Y3 O! C9 h
@.Destination.NumReservation :=0 M3 K3 i, A9 z2 R/ J: S: k
@.Destination.NumReservation + 1;! T8 E) c* x2 K8 ?' A( _
end;& }8 d& B* I: h4 s+ {
@.CurrIcon := "drivingHome";
* V* ^' `1 g1 Z5 `! c* | @.DrivingHome := true;
. z2 O+ X7 s1 C2 }6 h" X8 j end;. d, V7 B( M2 N- p" t7 v7 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ f& h& \$ D; D1 ^" w- O( m
part := @.transpOrder;
( X! V7 F/ T1 N part.move(@);-- load part7 z$ P; Q( f/ n3 {
@.CurrIcon := "load";
8 L y3 |7 ]9 f6 J4 p GlobalDistObj := part.globDestination;0 O7 q3 a9 L5 ?, q$ Y$ X7 ~1 X
assignLObj := rgmanager.rgAssignL;
. E: U# _" j7 c8 [2 R% h row := assignLObj.getRowNo(GlobalDistObj);8 A1 Q- v: S# q0 ?% U, A& _' N' T
if Row = -1 then -- since 701 G; U; A: G1 c& J
if lan=1 then; ]# @; z0 p1 `- U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 u6 m5 [5 q5 v, S% C
to_str("in der Andockstation: \"",?.~.name,"\""));, Y2 R4 T+ y$ y4 F
else
& _! T6 Y. H3 p* ?1 x- u4 ~$ Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 w2 R" [7 d* a# l H9 ]
to_str("in docking station: \"",?.~.name,"\"")); ( t8 [ U/ J( G: Y7 G4 X- q" K6 [- x
end;6 z/ n, h4 h; I, G
else
) \8 @4 h+ y& M9 R @.Destination := assignLObj[1,row];0 W! k# A( a2 K; M0 g/ n( Z6 Y
end;
5 Z. J% ^# m U9 K newDirection(@);: W% f+ e) f3 X- E8 H' n& e
@.HasOrder := true;' }. t; V: `: {% K8 n3 L' T& W
end;5 O& C2 g" l' b9 x& {; T6 j
end;
5 H& Z! o2 z C8 eend; -- of the method
$ p5 l; p. \' v& x* R5 K6 [% h. @ L3 J |