/* called by: entrance ctrl of the object 'track'
4 |/ f* p$ ^: P*/
: `9 ^ q# E1 p4 h# Bis# q7 Y7 k: ]- ~5 H5 `; Z4 w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: M9 y+ Z* x- R' ?5 zdo# _ Y4 p. `2 a1 s' k
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 P: E1 {% n# Q! j' ^6 V4 G if current = @.Destination -- else return: K- j" y6 _6 Y2 R6 P6 V4 n. {% r
then
5 b5 |' g9 v" V @.Destination := void;
4 [. ]$ {( E' b! R* M7 p if @.occupied then" G3 ~, b/ F& ]$ a8 n1 Q0 r
part := @.cont;
2 m( D2 M) ~ v: _$ z# P; R: a @.transpOrder := void;; S( u5 w% y5 Z) Z1 o- b# v# x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, h O9 `- a# X" Z7 l# b' m3 K, p, X7 J
@,root.eventcontroller.simTime);
3 X* L3 o. z4 R2 z! J9 b2 j% L @.HasOrder := false;+ L; G# V5 B, `
@.DrivingHome := true;3 g0 g# n) X7 U! D8 B
rgManager.tryToStartTransOrder;
$ Z8 [7 @0 r4 c1 X: J if @.Destination = void& {# f1 h# `1 h, {+ L$ U) [
then -- no transport order for vehicle @
$ j( \% R% ]6 E) A* ]" s, m" k1 g @.Destination :=6 a0 K+ N% J( V4 K+ D
rgManager.nearestFreeStation(@,track.~);
0 G3 g0 ]. _+ l9 ~* C4 @/ g newDirection(@); ; T4 P7 F' y$ F7 R
if @.Destination /= void then
# l- p% z0 z8 [5 ?8 [! N% K @.Destination.NumReservation :=
( K/ Q5 w( x$ M- t8 B3 N7 A @.Destination.NumReservation + 1;' b; ]/ W; C) m O$ b& r5 V
end;$ F) }$ H" Z2 W$ I* `! T) }2 p' c
@.CurrIcon := "drivingHome";
- f$ m/ K3 y) ]. T3 Q9 j @.DrivingHome := true;4 W H0 D7 i, L" E5 C
end;
$ i* P" C0 S# f2 x. {8 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; n% \4 W# `$ U: r part := @.transpOrder;
& q# H4 \% K4 y4 c, T7 a part.move(@);-- load part
+ X4 K; |/ j+ R& a3 V @.CurrIcon := "load";
7 j! M; x) N8 z7 n GlobalDistObj := part.globDestination;
- W3 M, Z$ l* e" C) S$ `6 E5 T assignLObj := rgmanager.rgAssignL;
; b2 \& M# @ j. i2 [* s b$ n g row := assignLObj.getRowNo(GlobalDistObj);
( O6 }5 Z4 e' w* I( X if Row = -1 then -- since 70; T: i1 V: Z: f& T3 k- {5 d
if lan=1 then
( h( a! d* C1 \8 @- R6 ]' i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' S, a# _: n* s: Q& S% |
to_str("in der Andockstation: \"",?.~.name,"\""));
1 u P/ T7 C: [& a6 B& l' A else) B- e* T( D& H9 k/ ^! _3 u9 o' M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: c: t+ ^/ D, V' _ to_str("in docking station: \"",?.~.name,"\""));
) S; z+ u) _" M3 k x* C. a end;
8 a8 q% M: l3 } n$ ` else
- \( ?: y" M, J8 }6 f( p @.Destination := assignLObj[1,row];- l& Y, a1 a Z' {! v; O2 I
end;
" G/ v T+ i$ F; B0 ?5 n* R5 A" R newDirection(@);4 q5 A4 X e5 u; V# ~: f- v1 ]
@.HasOrder := true;
2 v h1 R O6 o& z+ O end;
6 [, I7 K" H4 z) s end;, W6 ~" Q$ [2 K* ~0 y0 X# I* ~
end; -- of the method9 b5 H/ _5 c9 E; _- v3 y
|