/* called by: entrance ctrl of the object 'track'
( A9 b" }, g0 ]' { e% u*/7 a1 L. G+ t+ w4 ?! ~
is' s+ D1 \, O' K" y S- Y% p2 n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& p4 s! o8 e8 K
do
0 N' ?5 B" @, O0 d! U; d0 t( O Lan := rootfolder.Internal.Tools.AOLlanguage;/ C h# ^+ Q$ E8 ?
if current = @.Destination -- else return- S v* |7 W/ T4 C4 `
then) F' v8 B7 q* I6 V6 F/ N2 p
@.Destination := void;
9 R& F0 s; V( K1 v+ r if @.occupied then, o; n3 Y0 Z* `/ R1 s4 X4 r5 i
part := @.cont;7 u, a Z, ~8 M- _6 l
@.transpOrder := void;
' ~& |% M( ]1 u# O9 K+ I2 A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ b+ l9 T0 s' A9 v @,root.eventcontroller.simTime);
# g) i0 N7 L3 ?1 X( w' b8 J( m @.HasOrder := false;" |# e- W! \6 X+ i8 s, K
@.DrivingHome := true;
1 {( M, w, Z* z: ^ |: M rgManager.tryToStartTransOrder;
! ?3 W" _4 a `; a if @.Destination = void
# n4 J. G! y l6 b9 Q' N0 ^) w0 M then -- no transport order for vehicle @
- R: c3 b% n6 o8 U% W) A7 | @.Destination :=0 L, ^# }; b7 i2 ^
rgManager.nearestFreeStation(@,track.~);% M5 h) }5 r1 s5 }, G$ d; s& k
newDirection(@); 3 b/ x8 k# }& w3 O; G$ G
if @.Destination /= void then# e+ U6 A/ H$ M6 c9 v0 l. ~0 A
@.Destination.NumReservation :=2 T# W3 B# t7 P2 c }" {# X4 ^2 ~
@.Destination.NumReservation + 1;+ N# l2 G. p' p" {- g# l
end;
8 \, x% W8 W2 n3 F' q @.CurrIcon := "drivingHome";
8 Y( r& J7 ]; s" T3 i. J: } @.DrivingHome := true;6 \ {' p+ B( g* z! O
end;; |# l/ l) q5 M; n& o8 _8 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 [& \- `$ `# a' _2 l# q
part := @.transpOrder;# x3 ~( k J# E6 Y
part.move(@);-- load part
. \( N+ ?+ o) j0 q) ?* Q @.CurrIcon := "load";
0 Q. b+ X: |/ [. Q/ q) B7 H GlobalDistObj := part.globDestination;4 {4 @0 @1 N& s6 {$ z) q# n) d
assignLObj := rgmanager.rgAssignL;
7 W ?; g, |; b* |. k! S row := assignLObj.getRowNo(GlobalDistObj);- n# E4 b( [9 [& c
if Row = -1 then -- since 702 W* B# i: g/ [( W' J9 t
if lan=1 then
( {3 |; y: K# |9 F( v- H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* L5 u; J& v- t
to_str("in der Andockstation: \"",?.~.name,"\""));
8 a# `, k- e: G1 E/ e6 i6 E# a else
* i; g) ]8 X# o# R' E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 |' }- w% F a to_str("in docking station: \"",?.~.name,"\"")); ) x" j+ H9 Q4 c3 \2 Q2 h% \) E
end;
8 l/ T% ? I/ n9 [ else. F; J( `( H( u( p
@.Destination := assignLObj[1,row];
: Y" b' x, O4 m# U, V& h8 l0 G end;
' d1 G/ e, U) L- Y newDirection(@);( J) \. G* {) ~: [0 m, q
@.HasOrder := true; o, X6 [& M7 q5 S' z1 D, |. M
end;
! A4 x2 V6 U" w: X: Q end;
; I! d P/ X4 n, k0 zend; -- of the method
+ j3 Q* }1 \" ^ |