/* called by: entrance ctrl of the object 'track'
3 z# `' X/ I2 c; G5 X4 s1 Y0 o; r*/
+ ^; w9 U+ ^" J5 V% f: C6 |is8 p8 `9 b( R2 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 }. L" j# @& q; W: T; Cdo$ O- e+ g T- t+ N- G o0 A7 {
Lan := rootfolder.Internal.Tools.AOLlanguage; \! w! t6 V. N$ B9 \$ v
if current = @.Destination -- else return
) m% F3 A; f# W( y2 b+ N3 @ then
% \3 t9 b+ H6 d. r" x @.Destination := void;, g3 M, W C+ M/ Q/ o" D$ c2 i
if @.occupied then' J, r/ S P# f
part := @.cont;
8 m) x& o- s5 ]8 p @.transpOrder := void;. I, Y5 A: u7 i6 `& p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& F; m& ]6 U% m' t
@,root.eventcontroller.simTime);
) ^3 E" } A" S& s: Z/ B @.HasOrder := false;$ H9 w* V+ F2 V6 L
@.DrivingHome := true;
8 w+ }. v8 d4 O7 |# H8 s rgManager.tryToStartTransOrder;, H- k; ^+ O P( o
if @.Destination = void
6 M$ A! s! j0 G! k }; \ then -- no transport order for vehicle @: C( \3 w2 M* F0 D9 g1 F0 B
@.Destination :=
% `+ N6 R; h5 L4 F& \" a rgManager.nearestFreeStation(@,track.~);
& `+ L0 D( B h- t" ?* x" S H4 y newDirection(@);
' H; w- p4 Z1 Q0 I1 p if @.Destination /= void then& d1 f- B1 }4 L/ z z8 V
@.Destination.NumReservation :=
! b- l7 F. [2 n @.Destination.NumReservation + 1;: l5 ^" S# A) q0 I8 z& A' u% ~
end;/ X5 U- r6 ~* L/ ?0 _$ _2 x5 c
@.CurrIcon := "drivingHome";
# v/ q) i$ {! ~7 x3 k$ I/ a- [ |) ` @.DrivingHome := true;
" ?3 k$ E! F5 U6 R7 o. G! p end;; k9 k( a" ^* `( ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. t. n2 O' {2 [7 Q part := @.transpOrder;2 v0 d, e/ p2 g. c- v# B) J
part.move(@);-- load part# C$ \; ~, |6 k. {1 G% C
@.CurrIcon := "load";
* C7 Y5 ?1 s1 k- Y' W8 @ GlobalDistObj := part.globDestination;4 q) c. U" B3 j8 }
assignLObj := rgmanager.rgAssignL;+ B5 g1 w5 d( ~$ H: H4 a4 ~: j4 B; s% }
row := assignLObj.getRowNo(GlobalDistObj);
$ g4 f9 B2 `8 p+ M if Row = -1 then -- since 70
# F, y( t7 l0 h- ?% f! X: a% r if lan=1 then
8 X" N7 T, z; |! ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, O1 ^6 s5 Z; ^2 ~$ Z. q/ i to_str("in der Andockstation: \"",?.~.name,"\""));! o O+ @6 O1 d# J: \
else
( D: C5 Z& H% z3 T! F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" O* g2 e2 I3 C to_str("in docking station: \"",?.~.name,"\"")); ; E: ? U ^0 \. ^
end;
0 E4 u. R/ L$ l! u/ U, y$ }8 C else( ]9 @7 Q9 t: }+ v- g" g( p
@.Destination := assignLObj[1,row];
5 i1 f, q0 O3 c6 } end;
0 s8 Y% f' ~+ k' H% I! d% f newDirection(@);
" c3 X2 ?: g2 _2 O @.HasOrder := true;
. r5 a! b$ C$ [, b1 V9 w3 q, ^1 k end;' v& _/ `% p$ `- ]# S( V/ d7 {7 R
end;
% }$ t. E' S1 p6 dend; -- of the method( y6 d5 @) p+ u! c9 E
|