/* called by: entrance ctrl of the object 'track'
* H! m% m9 `+ l, Z/ t6 \*/
3 m. ? i. y+ His
6 P$ }8 i& V# _$ Y! I6 C8 h) O) Q6 c part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 s" q8 E6 j; j% L$ @' q2 o! `; L
do& n1 N& ^( v9 {, R$ Y; N% N* v& O
Lan := rootfolder.Internal.Tools.AOLlanguage;& J+ V6 X* E: N8 i! W" x/ t# l3 t
if current = @.Destination -- else return! f; Z3 U9 u2 U
then
" Z( v* \- `9 [5 ]: f+ P N @.Destination := void;
6 t. @& `' I" L2 E L% A$ z% A if @.occupied then+ ~, v2 J: H3 K& j% O' X& f
part := @.cont;% @5 a7 ^% u# Q6 ?% A7 O: K/ H6 ]
@.transpOrder := void;5 S. [( N* u) o! I+ {; e w. r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ e* G K( c- `0 S1 z7 p$ S @,root.eventcontroller.simTime);
% d- `3 _" T; F9 L* r* q" } @.HasOrder := false;
% F8 W7 i. o- p9 y1 x! {( U @.DrivingHome := true;
* r* f; I" ]+ J+ W, H- ? rgManager.tryToStartTransOrder;
+ `5 H! w5 E: u" t: u. S if @.Destination = void1 l8 l$ N: x, H0 S# R N# m6 K
then -- no transport order for vehicle @! A. }6 L2 Q: ? D# w% z1 i
@.Destination :=
: k; K2 K0 K/ Z4 A5 M4 a$ j rgManager.nearestFreeStation(@,track.~);5 R6 K% |; X( x% P
newDirection(@); ! {4 T7 @& i; M2 j, u
if @.Destination /= void then
+ e1 E# C. w. U* t, z @.Destination.NumReservation := o# V7 t& W" R, _0 r
@.Destination.NumReservation + 1;
& @. B: `3 P7 c2 d end;
; C" Z m+ W" s* P! E: I @.CurrIcon := "drivingHome";
* Q* K9 o9 b9 M @.DrivingHome := true;6 T/ G" ?' _3 F
end;
9 T7 [0 e1 i5 C8 I0 H! O3 b J else -- the vehicle @ is empty, both vehicle and part are in the same dock station, r1 _( s X6 a' ?0 {- X: ~
part := @.transpOrder;
4 p: j- `$ M$ j+ [8 a7 S part.move(@);-- load part4 E+ n7 y _ J4 h, e
@.CurrIcon := "load";
7 Q; N s1 j6 G3 ^- d: N* q( h* }4 h GlobalDistObj := part.globDestination;
# n6 I! F! I3 N$ a assignLObj := rgmanager.rgAssignL;* o4 y7 T0 S" |
row := assignLObj.getRowNo(GlobalDistObj);
8 [9 m/ [, L1 V: N& {6 T0 Q if Row = -1 then -- since 70+ d8 G. V2 X: U' M( I6 j
if lan=1 then
- M% D4 V# c! W& w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ I" j: X, ^1 m4 o8 \) v8 ? to_str("in der Andockstation: \"",?.~.name,"\""));
( l; a9 v# e! p4 ]6 L; \ else
# s% `7 {# B% r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" j' N* o$ h! s to_str("in docking station: \"",?.~.name,"\"")); 7 |- |0 G+ R9 M x
end;
8 V( O+ y, F/ c# {2 }$ G! e else' R1 A: d0 r$ j- _1 Z' B+ C+ k
@.Destination := assignLObj[1,row];+ u" Q$ m: {" U2 B( j' @9 q
end; % E9 [8 Q8 [. \' y& f& d* H
newDirection(@);
, Y/ ~$ y$ P [$ k% F @.HasOrder := true;
, b, m, C0 a. J T# p end;
! j+ F+ T3 R3 A" I( L end;# x( d# d6 D% ~, k( v( d- e. r% h; t
end; -- of the method# u/ { v4 ` W5 y% \; t
|