/* called by: entrance ctrl of the object 'track'
: ]2 |+ v8 Q/ V" R; A* B1 e \*/
& P, p5 Q" a+ cis# `( v+ S6 t0 w- g9 s9 M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; V0 E' J+ E5 K( e
do
2 Y7 R' J1 ?- X+ } Lan := rootfolder.Internal.Tools.AOLlanguage;
2 m& _' r4 G) Y, D if current = @.Destination -- else return
+ M9 _6 a) @& @ then) }/ H2 `9 l; |% D- S5 m
@.Destination := void;3 O6 K) m- y8 O$ B" Y+ u
if @.occupied then3 x% l5 u# u7 I; x
part := @.cont;& I8 \+ p, R3 o7 x3 z2 r
@.transpOrder := void;
+ u+ C+ `. T# V& C0 W, E9 r7 C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 q+ T0 V) [0 h/ E& w* M: E" P& ^ @,root.eventcontroller.simTime);
: j7 R5 {$ H& Z6 K. ?. q @.HasOrder := false;: x' u4 b4 E# h( D
@.DrivingHome := true;
. d* M2 [) m# q0 ^+ x8 R& { rgManager.tryToStartTransOrder;
' i& r$ l8 p. P, d7 f0 w if @.Destination = void
" A7 | ?7 b; Z: \ then -- no transport order for vehicle @! n3 Y+ u Z+ K% [+ Q( ?' y
@.Destination :=
5 U$ z& X# O j4 ^2 K rgManager.nearestFreeStation(@,track.~); \* G+ S% f2 y
newDirection(@);
0 N: b6 W* S( q if @.Destination /= void then3 Z* V8 A$ Z7 t, _3 I5 Y$ ~# g7 B
@.Destination.NumReservation :=$ G/ Q; {4 v9 s5 T" z9 d3 ]
@.Destination.NumReservation + 1;
$ e' u8 S# q: m" {& [' Y, G7 w end;
y' Q+ J) p) \& y( |/ \& O6 k- N @.CurrIcon := "drivingHome";
8 B# G4 U: q& t( I0 Z9 E0 e @.DrivingHome := true;
! o9 l7 u0 [( n" O" z2 z: K. q end;
+ M$ K. s% x' W6 R/ ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 V1 m, L% |) j% c2 g4 @ part := @.transpOrder;; R+ k3 B% s8 { S% W: e
part.move(@);-- load part
! G! o; Y6 L0 W$ h5 g @.CurrIcon := "load";
4 ~' ]; R% @) d' W s GlobalDistObj := part.globDestination;
5 W9 l& ` w7 A& ^, Y/ p assignLObj := rgmanager.rgAssignL;9 S; V7 M) k: a0 B1 H) B& W
row := assignLObj.getRowNo(GlobalDistObj);. e( l8 |* Z( O: [" G# x9 X3 h+ u
if Row = -1 then -- since 70$ c( G$ i4 n# @4 ~& }8 t. N* H8 D
if lan=1 then
2 ? v" o: c6 t/ v+ u3 W; S4 A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' P- U/ n! F2 Q, M7 {/ @' Q to_str("in der Andockstation: \"",?.~.name,"\""));
' g5 a; W- G8 z! C else
# i- O* l9 f& O& L$ ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 w/ f4 d# {, F$ q1 N4 ]
to_str("in docking station: \"",?.~.name,"\"")); 5 h [0 q, R* i
end;' B, Z& B9 f6 x% p9 i3 |
else
* t; R5 g) M! q- v4 H0 Q5 h" g @.Destination := assignLObj[1,row];
8 j4 t2 {% x8 B' I! @9 w end;
( a6 H% h' R1 Y$ v: |- k newDirection(@);
4 N3 l2 v$ E( K- k$ @5 ~4 k @.HasOrder := true;
: p1 \; N: C2 S8 v* R7 h* n end;8 z9 I% A' _! I! `! v
end;/ t/ r) b: Z8 P
end; -- of the method
1 n1 Q0 k d5 D: K% `& T3 l |