/* called by: entrance ctrl of the object 'track'0 x2 k, W T; W" v: b/ Z
*/
4 u7 d( w% _5 p$ p( cis
7 l% D; x0 G. T+ j6 k( B part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 L$ S8 X8 r! q" `9 N: x
do. y% X4 ]! J% F! z) Z7 T
Lan := rootfolder.Internal.Tools.AOLlanguage;
' ~, O) D7 l3 I4 D# u* @ if current = @.Destination -- else return# M u. m4 ?2 w( N2 N6 m6 e/ P
then
2 k. G/ H! T7 @( t% O1 G. a1 M @.Destination := void;8 F/ Y+ _0 ?; T' P+ B# L8 }
if @.occupied then
. _* K- {* u# s, u part := @.cont;
( [4 E2 D% \& B3 p) G8 |; u7 m @.transpOrder := void;3 P( R# u% r/ n- Q) A% Z& r- F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% R/ r. t) ]1 }2 S/ f @,root.eventcontroller.simTime);$ f3 l9 S) }% O3 Z H
@.HasOrder := false;
/ F) H) \/ T5 H2 t @.DrivingHome := true;: }- w1 z! O$ e! x; E. P
rgManager.tryToStartTransOrder;
* s, |; h1 Z. w1 Z" c if @.Destination = void
* S5 h" @& o7 {% Q4 E2 P& v& r then -- no transport order for vehicle @
% z0 x( y6 O5 b, E2 s6 t @.Destination :=8 I, k1 k2 D. o9 _) n
rgManager.nearestFreeStation(@,track.~);9 c3 U2 r/ g* w- F$ q: i* R( E# w) M4 c
newDirection(@);
! B0 h$ E8 ?+ [# q if @.Destination /= void then s& {* n |# b# |
@.Destination.NumReservation :=5 C4 S) m9 \6 F
@.Destination.NumReservation + 1;
6 D9 r4 A' B8 f! {, V6 L& R. t end;+ A& z# h# q7 D3 J/ R
@.CurrIcon := "drivingHome";
8 i4 v9 ?2 {, q# }# n2 n- b @.DrivingHome := true;
7 v6 f6 {* n" u6 B; q! m3 @* i5 } end;% l% {4 H# i8 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ^( _. | Z) @0 Z5 A; c part := @.transpOrder;
) ~9 U7 a- {; D part.move(@);-- load part3 |+ `' e* s0 h
@.CurrIcon := "load";
+ D# m9 `( u C, N/ ~( c GlobalDistObj := part.globDestination;7 h- _7 ~+ A5 m8 |# t( o
assignLObj := rgmanager.rgAssignL;$ u# a+ Q4 ?; G; [8 A
row := assignLObj.getRowNo(GlobalDistObj);4 Q. [; ?/ S4 ~
if Row = -1 then -- since 70# p5 ?% P$ B; n4 r- N4 K1 O' d
if lan=1 then
% A2 Y) G5 O' U9 L ?+ I3 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- `# `. n' j: F3 Z& O to_str("in der Andockstation: \"",?.~.name,"\""));9 o7 s- Q& X# R& A# z
else
$ b b" P% E8 V5 T) ]) c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" C- h5 M+ ?) ?! f' T2 B! ~ to_str("in docking station: \"",?.~.name,"\""));
* _* ^/ H- t4 Q9 ]1 R A/ U: @ end;
% i. }+ u5 L8 I, V4 I7 ` else
, F6 O. e/ T- U) y @.Destination := assignLObj[1,row];# W% `4 p8 k" H+ X& `" `
end;
/ {" P& o8 ^% v newDirection(@);3 a; _; [! m G# c
@.HasOrder := true;) f) h2 b/ Y1 ~+ X! x) `5 T0 I9 e
end;
$ V3 x+ A/ c) B6 K& U; J end;
% ~# B% P+ X5 D8 ^end; -- of the method
' H s. v4 P! }% U |