/* called by: entrance ctrl of the object 'track'
: U* t0 u2 a5 T- E. d*/0 U% t+ @7 ]' ^) [1 ^4 h
is
2 X m. W: J( r! T$ _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;% y: f+ s. S7 B* ]$ ?" p
do5 q1 l( \, |: b) u1 ^
Lan := rootfolder.Internal.Tools.AOLlanguage; f* k! j9 O( F. j
if current = @.Destination -- else return6 A" S5 m5 A# F" t+ }
then
9 n- G, L% M' f) G" k @.Destination := void;
- p# `- H: `: ]+ x; F# X$ U6 F if @.occupied then H( @$ a* z7 g# H+ f; ^
part := @.cont;
) q, l5 F; _! b% N. T) @5 h @.transpOrder := void;
: t5 Z8 T: B" C9 h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. w9 N- G) L5 \" L4 c
@,root.eventcontroller.simTime);
$ t+ n7 Y, X }/ w @.HasOrder := false;
5 I" a3 q. [ t& _0 S$ k8 d @.DrivingHome := true;, a' t. i/ m8 [
rgManager.tryToStartTransOrder;
$ K( t i: N( H8 [( G if @.Destination = void2 b! W# v" X$ ?% ~
then -- no transport order for vehicle @
7 Y! ?+ D! U L4 y" k/ P @.Destination :=" S! W3 A! j/ | i1 Z) F; A
rgManager.nearestFreeStation(@,track.~);
2 w) \3 a8 U4 n! L/ n6 W8 v newDirection(@); : j7 O4 V5 y" [9 V1 [
if @.Destination /= void then
( {: A$ T! L6 Y+ ~6 u0 h; q# m @.Destination.NumReservation :=
! B+ ]7 n5 G9 |' ^/ b2 O0 X @.Destination.NumReservation + 1;( g( m8 h H# O) p+ Y% y
end;6 V2 b/ A7 O4 h. J4 A
@.CurrIcon := "drivingHome";* M& b+ B& x7 ^# T; H
@.DrivingHome := true;
+ j9 D `! y; M end;
, }. m+ v; j4 q2 e: o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* y3 C1 @3 j/ i7 q* X7 Z5 S part := @.transpOrder;
, J& S* w6 E* ]; s6 D% B+ m part.move(@);-- load part2 i! v9 ?8 ~- |% U- E
@.CurrIcon := "load";
$ h1 `% ?2 Z5 h! H4 U GlobalDistObj := part.globDestination;2 h* T* X H% F5 T/ C4 F D8 `2 T
assignLObj := rgmanager.rgAssignL;
T7 T8 y2 @* r row := assignLObj.getRowNo(GlobalDistObj);
) v, L: P' P, z C1 j2 r5 Z& I; V3 o if Row = -1 then -- since 70
. z% p8 M- `' m if lan=1 then+ e* m2 C& q# O7 N$ z3 S, Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, A2 W! [9 x0 K0 l7 z2 W6 l6 F to_str("in der Andockstation: \"",?.~.name,"\""));
1 @8 G9 j) Y3 G( W- q" [ else
1 k" L) Q& C0 e: I4 I1 v' P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 H) J7 j- W7 ~7 O' V4 g
to_str("in docking station: \"",?.~.name,"\""));
% m: K, s' t% _+ u end;
' e0 _& L1 ]1 Y2 S else
5 V) P# U* P7 |' w0 }0 B; {! o0 N @.Destination := assignLObj[1,row];
9 ]9 L5 s$ w3 D8 J end; 4 ^- H4 t& j3 y! `
newDirection(@);& ` S5 r- {) B, d5 H7 C! D2 i T
@.HasOrder := true;( U2 ?( U- @/ r$ L" Z2 T
end;
9 `6 v+ @8 i- ?3 `# X2 X- m1 f end;: S5 ^+ g- l9 G, O
end; -- of the method3 A) G7 d, G1 \/ u' b, k
|