/* called by: entrance ctrl of the object 'track'
8 Z+ g8 ?% e" l; b7 E*/
5 ?/ b) _/ J4 Jis. w9 A6 G. d+ y# W, k1 v: o+ K# {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 W! K9 u* p0 F/ W
do& I! k0 c) y- B& {- W" W# d
Lan := rootfolder.Internal.Tools.AOLlanguage;9 p, D$ N) D& b* P
if current = @.Destination -- else return
1 N, Y$ }* L' w- [+ J( k then
/ F/ b* x2 A: C/ l6 j @.Destination := void;
J7 _, y/ g/ p if @.occupied then/ v+ V2 f" r8 f& e$ d0 S0 y# E2 x
part := @.cont;: S- d! t# [9 T9 h
@.transpOrder := void;; N0 |; t1 N! {! k5 A% J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ~2 t4 ]6 J: Q' C! v( _
@,root.eventcontroller.simTime);
& h5 D3 Z5 k/ L' K' b @.HasOrder := false;& r0 |) F5 h$ V( b& p8 O8 A
@.DrivingHome := true;
8 Y1 \" k2 U( j) D5 M, }8 V! _) y rgManager.tryToStartTransOrder;, {1 Q5 k/ Q7 L
if @.Destination = void
T, c9 P( r v+ _! e then -- no transport order for vehicle @0 W7 K1 w; R6 t
@.Destination :=
% Y6 n; x( k/ k6 Q rgManager.nearestFreeStation(@,track.~);) b0 ^% x! ]+ w/ F9 @$ G
newDirection(@);
% |" T# _, [* T4 P" O& d/ u if @.Destination /= void then1 r& p$ x. r' ]3 [( E
@.Destination.NumReservation :=2 i. o4 M8 t- O4 K% S# {. g" w
@.Destination.NumReservation + 1; B% Z% K: r) t! M# i& M
end;! r8 P6 d! u+ R1 m5 H
@.CurrIcon := "drivingHome"; d }/ Y5 I% s `- W4 V- s5 C6 b
@.DrivingHome := true;7 I3 P/ W' R7 W+ ~5 c' |1 g, T
end;
! B* F, x z0 X7 r/ h7 y* s* } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 s2 T. ^7 V* J8 ^4 w# x part := @.transpOrder;
, z: u8 G+ }) L: \ part.move(@);-- load part1 Y" {9 ^* z/ c! y% t9 _
@.CurrIcon := "load";: p1 G. y' E1 d! Y ]
GlobalDistObj := part.globDestination;1 w# Q* ?# `- T3 Z
assignLObj := rgmanager.rgAssignL;
% ^. p5 {+ r. u- n; d( ~- D0 Z- A row := assignLObj.getRowNo(GlobalDistObj);
* }3 d6 l. W a if Row = -1 then -- since 701 K' g: b' d+ {( |, T: c9 z3 y" v
if lan=1 then
% r8 f6 I0 M( u/ o& c" B6 Z' J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 a/ ?) B7 t2 G n/ t to_str("in der Andockstation: \"",?.~.name,"\""));
& H% c% z% L$ C, N1 y0 [ else
" N% p- w% y# \ |, E; j4 K D) z7 G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# e% B% D" a8 q$ W/ h9 r/ J
to_str("in docking station: \"",?.~.name,"\"")); - _* c% `5 t1 t" i
end;& ` H8 K. R1 a7 h" B! T0 l9 f
else
# |* C3 w2 M2 |7 ~ @.Destination := assignLObj[1,row];$ M7 }# ?: {3 K5 [- W, {# e
end; 2 I: a& R4 r0 b/ Z
newDirection(@);+ L; i' t9 P3 L6 }3 L3 z# ~1 _
@.HasOrder := true;- v0 ?0 C( {/ f I0 L. w
end;
* }3 j# Z0 b% y/ ]' a end;
2 {8 u$ E) g" Zend; -- of the method8 ~7 N' r& ]: a% Y
|