/* called by: entrance ctrl of the object 'track'! A% d: H; e3 q% R9 V8 l6 n
*/5 v3 @( A5 O ]/ f* T
is7 X7 A% y+ D! C. |) B% Y! H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 x! `) E' w( s2 Y& `
do
m, R! R) H# Q( F, d4 K( X: E Lan := rootfolder.Internal.Tools.AOLlanguage;
$ z5 S" ^8 ~" D if current = @.Destination -- else return7 z4 |( }& g2 d3 M0 c- ^! d
then
& U9 `9 ?/ X$ K" R8 J* _3 ^ @.Destination := void;
7 r) o7 [6 ]& I* h) z. P if @.occupied then& P% N6 `# E5 M( v; \
part := @.cont;6 } s. L0 T% D9 h; V$ H
@.transpOrder := void;
. P/ n, r8 d N/ k5 r$ X1 D [ i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ Q: r0 C8 Y6 g3 G @,root.eventcontroller.simTime);
3 z1 V; o, y6 p* Z$ F j @.HasOrder := false;
3 s7 ? M2 L. b, E+ { @.DrivingHome := true;6 T7 w$ z2 }1 U- z$ k) @6 v0 o
rgManager.tryToStartTransOrder;5 _8 j5 L% Z+ V2 t; Y6 M
if @.Destination = void
- L8 P v+ K" h* g0 n7 P$ z" a) s% Q then -- no transport order for vehicle @
. Y" M+ k! u* s$ X, j& d3 b( n9 ^ @.Destination :=" J$ F e( W9 `
rgManager.nearestFreeStation(@,track.~);
" ]8 Q0 S/ m0 z+ ?) H6 \0 {1 d newDirection(@);
+ e9 Y- R* f: u; P) u4 @. u if @.Destination /= void then
" }( V4 e- _) R5 E @.Destination.NumReservation :=
( b0 N+ ]& d! m3 \: T F @.Destination.NumReservation + 1;
9 r8 A/ c2 j; C& ~ end;
& S2 G y/ e* ]3 W; z @.CurrIcon := "drivingHome";
( T- o/ K( B" Z- z+ q @.DrivingHome := true;
, {" F, f) E; U) A3 c$ N end;/ @1 Z2 s$ M) v& g u# `4 ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& k, F8 C$ W- g4 f5 A
part := @.transpOrder;; H# c8 \) z$ K8 w' v3 ~1 I% U1 t
part.move(@);-- load part
) ^1 G2 N& {& Z4 z$ L U y) p( m @.CurrIcon := "load";
$ ] k' j. i/ q4 O. p GlobalDistObj := part.globDestination;/ I' B7 \" k& _5 u! Q; W, w
assignLObj := rgmanager.rgAssignL; P5 c3 H$ \% e8 S
row := assignLObj.getRowNo(GlobalDistObj);8 Z, a Q6 B; ^7 v
if Row = -1 then -- since 70
3 H; J v! B, P5 |! }# o if lan=1 then
* _7 |; {4 e# U- Y' Z2 |1 N5 y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 O8 \- j/ y" [ to_str("in der Andockstation: \"",?.~.name,"\""));
5 y' A! {+ m" n1 ^- ]* d else
; e g7 ^. Z4 @; ^- Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# s' |) m2 [1 ~4 G+ R6 c8 O+ ] to_str("in docking station: \"",?.~.name,"\""));
9 X* i) g" I/ q7 h2 S q7 X end;
2 Q0 ^1 T8 C [- j, } else9 Z H h* U8 T
@.Destination := assignLObj[1,row];
7 Y! Q/ R6 N2 N6 \ end;
* z0 Z( N3 [, ^3 r newDirection(@);
. r! C$ u( g6 ^4 F/ r @.HasOrder := true;
: G% \. Y& F; i end;
! i7 Y/ b$ e4 K1 n* f end;3 W% g8 u. Y8 i+ H& V' Q
end; -- of the method
0 W$ k' e4 X( |9 E* E% @) m |