/* called by: entrance ctrl of the object 'track') A$ \6 P8 y, g
*/& r9 c5 n, ~6 P f9 @, o
is
: O3 K, [" \6 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 B5 M# g2 B9 n& X6 c) \! ~
do
2 I4 @ i# n* H: K Lan := rootfolder.Internal.Tools.AOLlanguage;. q; P& R/ h4 Z+ i2 j$ C
if current = @.Destination -- else return" r( x( }* ^( j% y9 l/ e0 h
then
. A. `; g2 _5 V P$ S) q @.Destination := void;
* S3 P7 i8 C. D1 a* I if @.occupied then! [! T7 Q( m: @
part := @.cont;+ \* S' k5 |: L2 }! p& C
@.transpOrder := void; v X: c" K: k m) C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 y1 Q' T; B0 K @,root.eventcontroller.simTime);) h% s" ^1 o L6 M1 a+ V( \
@.HasOrder := false;
" i! Q5 z; m6 C" Q8 H* s @.DrivingHome := true;6 }) [' O ]' M7 x% W( S
rgManager.tryToStartTransOrder;
2 p1 D- J6 ]- \3 E. u if @.Destination = void
' g5 |* s1 O/ C4 j2 [ then -- no transport order for vehicle @: ]4 B! p8 J* }
@.Destination :=6 q1 i4 r; [/ r
rgManager.nearestFreeStation(@,track.~);
7 z* ?' e1 M; k3 {( `1 {6 f newDirection(@); 3 _( r" W% n2 A7 s) c
if @.Destination /= void then& y6 F0 ` E2 _
@.Destination.NumReservation :=( c3 t" ~! Z6 T* o
@.Destination.NumReservation + 1;- s3 E j3 s" h" \. C
end;
7 [: @' ~4 v& y! t7 Y! A$ K5 j/ P @.CurrIcon := "drivingHome";7 {+ D" G/ S1 c8 d
@.DrivingHome := true;
t+ o* M7 }" m! Z4 g end;7 I7 B, G5 O. ~ _4 P+ ?2 y" D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, i7 s6 L( k6 x. T; y6 U9 O; E
part := @.transpOrder;0 [9 d$ V. e" d! v
part.move(@);-- load part2 o5 x6 u: L+ C: ~3 P! F
@.CurrIcon := "load";3 J5 t) G% Q% @% h
GlobalDistObj := part.globDestination;3 O0 Y) w3 M4 z, X z0 }0 g
assignLObj := rgmanager.rgAssignL;5 ^2 b3 F L2 b: o
row := assignLObj.getRowNo(GlobalDistObj);
9 _- q4 D5 ~, P; n i* N" @ h if Row = -1 then -- since 70
; ]1 A4 V$ w6 ` w if lan=1 then4 x5 U7 U2 u& e# E& P$ m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," @ |. i& i/ e, V! ], s
to_str("in der Andockstation: \"",?.~.name,"\""));
' e' K2 b0 a j; X3 Y else0 ^2 N# ^! @) F& T" A/ E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," m3 P& z0 s( j0 E
to_str("in docking station: \"",?.~.name,"\""));
9 t# ~' z2 x) T$ O+ w end;
1 ^# y5 M4 k+ a7 Z0 z else& T) R3 H" D) t& M+ X
@.Destination := assignLObj[1,row];
: K9 _3 r' z: S* [% H$ k8 Z end;
) p& T" Q: ~& o0 f& j newDirection(@);
* R! A) n* o2 t$ j @.HasOrder := true;+ p3 [7 }8 o/ n2 e) B
end;
, ]* e8 t: B Z: J end;( n8 S6 W4 p o/ o( H
end; -- of the method0 N1 I5 ^2 u$ J
|