/* called by: entrance ctrl of the object 'track'* f' v: t8 Z$ k. z6 H, P" F- M+ u
*/% x8 O( V# X) \- h7 J
is
3 \) r8 O) f1 K* |3 Q1 K; ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) f x" S6 S7 h- o) Bdo
% b7 Y6 g) U( D1 d Lan := rootfolder.Internal.Tools.AOLlanguage;- r+ v1 L0 ^6 n8 u$ r
if current = @.Destination -- else return
: x" _$ R. n7 @, V& r then
) v7 H9 ]1 d6 O: e @.Destination := void;
- o$ E9 W8 H8 Q1 ^1 w if @.occupied then
, v4 ^+ Y5 P# ^2 {: W# v part := @.cont;) A) L0 X# q: K
@.transpOrder := void;
. h ]. d' `3 T$ g( U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% V [% x4 j8 h4 Y
@,root.eventcontroller.simTime);! @3 m# |9 |+ Z$ `& I# F: K
@.HasOrder := false;# z# Y& U5 ~ T, ]& N# h
@.DrivingHome := true;
0 R$ c- C% n0 B" { rgManager.tryToStartTransOrder;
% T Z4 i' l, p4 B' m! r if @.Destination = void4 t8 h7 g/ R7 z% F! Q
then -- no transport order for vehicle @/ q, Q& a6 [# [( i M
@.Destination :=7 P# t3 @" K4 \1 M+ N. Y" {2 A; Q
rgManager.nearestFreeStation(@,track.~);! ]+ ]8 Q0 @6 n7 y( v
newDirection(@); 7 o. r) P* P- c7 @; O: u
if @.Destination /= void then& o% X6 A: b5 i1 j3 }5 Y1 F! D Z
@.Destination.NumReservation :=4 Q+ x3 P# S1 B. m
@.Destination.NumReservation + 1;
' w$ `2 w6 w6 K9 \8 a8 ` end;
( F j5 d& `3 P2 q: [ H: G @.CurrIcon := "drivingHome";) t6 R" M" m. Z2 a5 s
@.DrivingHome := true;' \" n: W# b- n F' ?$ U" B$ K; r
end;
1 o4 y! {$ N, Q: H3 V6 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) w$ I+ Q* p2 b# ^6 l# ]: Q part := @.transpOrder;
( A' Z( K l: ^* j) J" x' b" ] part.move(@);-- load part; P8 T5 w5 Y5 r8 C7 c
@.CurrIcon := "load";$ Y- D- | z' n& m& d7 \
GlobalDistObj := part.globDestination;0 |- a, z4 U, j! C! R9 b
assignLObj := rgmanager.rgAssignL;2 H6 {% k% P X1 ], K9 Z+ W/ n
row := assignLObj.getRowNo(GlobalDistObj);
* z3 Q Z! q) N/ p/ p4 {! [* F if Row = -1 then -- since 70! H- O) h, h) g
if lan=1 then
! g2 i- y5 K( d: D+ C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, q# r2 l& h% T+ ]( c( I- W+ f
to_str("in der Andockstation: \"",?.~.name,"\""));
" h) Z+ g. W& _5 n, f$ _; ^* j3 a1 N1 y else
- J* T3 @* c; l# s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& B6 ~1 I3 W* F! O( ?
to_str("in docking station: \"",?.~.name,"\"")); 6 Z5 R |, E1 H4 A; ~( B W; }
end;' I4 ~& T& I" D. v
else% P) D# z. \, h% y/ \* {2 Z. ^. f
@.Destination := assignLObj[1,row];
% d7 F1 ?9 x' A end; 2 u, C3 u# }: ]1 t5 G, o
newDirection(@);% V8 k. L, u! d! a8 D! A
@.HasOrder := true;
8 T' R( ~) p1 {* H) J end;$ w) Z1 {! b- x3 u- D
end;
& s4 d' A7 E% l/ L8 l; P2 W+ J' R' Rend; -- of the method* I. B+ E5 R+ E* ^( V$ m8 ^
|