/* called by: entrance ctrl of the object 'track'
& I) g/ g; r0 f/ C: ~' E7 u1 T! ]( |*/5 K' m: h' y2 V
is
! V; Y! I7 y& F# t3 s8 n: h9 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;' Q' _9 i7 F4 C1 {& t4 s% |
do% o4 A7 c8 H0 d. q/ [
Lan := rootfolder.Internal.Tools.AOLlanguage;! z. n4 f7 B! q$ m
if current = @.Destination -- else return' Y( ~' J; T" [' u" E5 Y% R+ E
then
0 H, T. i! m$ }# a1 n( h! I @.Destination := void;
& B$ J! [0 _4 F; C! t if @.occupied then( i: a5 x {' n! F0 X. d
part := @.cont;' P2 ~6 P4 _# S
@.transpOrder := void;6 K3 J; ~( E3 ?3 I2 f. {, t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. m. j3 h N$ r+ i5 r @,root.eventcontroller.simTime);
/ ~) b! J! F* k @.HasOrder := false;
: _# G( h' k) u @.DrivingHome := true;
; K$ a- c! m! Z5 c- [ ^0 C" L rgManager.tryToStartTransOrder;% p9 o7 v2 l0 f' X
if @.Destination = void* H+ X# u7 v& C U9 w
then -- no transport order for vehicle @
9 @. a4 r ^+ C0 N. |' H6 y' | @.Destination :=; L, o, c. j6 j& |
rgManager.nearestFreeStation(@,track.~);
4 ?6 N* U3 ]( H newDirection(@);
5 P7 k7 C$ w9 T( u9 L if @.Destination /= void then* n0 y" y; y4 Q$ L! O# w
@.Destination.NumReservation :=
! Q: l1 \7 |- n$ [. J @.Destination.NumReservation + 1;2 F7 {. D3 |* Q" h+ [
end;
9 B3 f& P6 B$ G( r; H @.CurrIcon := "drivingHome";7 k! ^+ q% Y6 v4 D3 x% Z d
@.DrivingHome := true;
! i/ Y- r& V0 Q, O/ x) |8 E. f: e end;
: |' N# Y) m1 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& t2 C& k+ o/ j; f* b' d6 U2 x2 U part := @.transpOrder;; `' n: k% R+ s* H# R/ `4 y7 E
part.move(@);-- load part5 k) J, m9 L! {; ]
@.CurrIcon := "load";( ~- c% H6 t4 f9 [; K
GlobalDistObj := part.globDestination;- v: u, S% o" P8 M' D
assignLObj := rgmanager.rgAssignL;
8 n: @% c1 `# r6 y. f% ? row := assignLObj.getRowNo(GlobalDistObj);1 S5 N( t6 Y! b2 d3 d% _
if Row = -1 then -- since 70
% a! H% G+ y0 o% i4 G( ~/ E/ D if lan=1 then8 I+ ^- t; [, ^8 G" n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: f8 Q2 {" X1 \( F8 j/ z
to_str("in der Andockstation: \"",?.~.name,"\""));5 a: v+ f5 T' g, L; h2 X
else! p7 u, M/ E$ s! e/ i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 B. L9 ]) Z* P/ k5 A to_str("in docking station: \"",?.~.name,"\""));
( @, k3 n" Z8 F' `8 q end;
$ M( L) s% \% O else9 j& n o/ N% X7 L! m* f% b
@.Destination := assignLObj[1,row];! y. r/ z/ O6 v) F, t6 h
end;
3 w" f8 z: v6 \$ }: @! F* f E( H newDirection(@);
0 Z' J p! G" ~( H6 m6 z z @.HasOrder := true;7 L7 H: `% T5 `% `% l |6 b* u
end;' t4 [- U% U% x7 L0 w+ K5 F
end;# H3 b/ n& Z3 I Y
end; -- of the method
. e! U1 b# I* m1 `9 L, T |