/* called by: entrance ctrl of the object 'track'
: [, @2 V9 ?1 Y& I! Y$ M' Y*/& M3 ^0 k& Z- b! ^8 \" D- V
is
/ u! Z$ g; I& B6 n" b part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, u1 \6 \( V7 r2 s8 l- qdo
. ]: Y& F& }9 K! B$ J3 i$ u, R0 l: b Lan := rootfolder.Internal.Tools.AOLlanguage;+ f3 E% N3 Y7 p" i# n
if current = @.Destination -- else return
! k: \$ B3 ^* h' r7 v8 L- k" V2 { then
8 q* X8 p5 {0 k) @1 I! L$ R @.Destination := void;" z4 {5 N+ q- }: V
if @.occupied then& c& ^3 [4 o9 F7 q2 Y- t/ u
part := @.cont;
4 [- n; n$ z* q @.transpOrder := void;+ U7 z5 B' K5 \- P( A/ ~2 {( b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% B9 B( V$ |% `
@,root.eventcontroller.simTime);* q. g5 j" d$ [
@.HasOrder := false;7 T& [; u0 ?( c: g! K
@.DrivingHome := true;
3 @- O- G M1 x6 N0 n( p5 L; a o8 P rgManager.tryToStartTransOrder;
7 @: A5 W6 `/ \8 m) K! C if @.Destination = void A& ?( v. ~+ Y/ m, o; I
then -- no transport order for vehicle @: V7 J0 g4 y! ]' K$ ~7 O/ f) c7 H9 K
@.Destination :=
& k& c: A) G: @& ^0 P! | rgManager.nearestFreeStation(@,track.~);: [+ k- [, y( ]8 u4 Q
newDirection(@);
! |5 }+ p. e: } if @.Destination /= void then
* h$ J3 {$ |$ {! }- q @.Destination.NumReservation :=9 G4 ?: D6 A, j* o
@.Destination.NumReservation + 1;
( O! p* P5 {. t! }+ B, Z" H end;* d5 ?8 \" }$ ^* ` C' B/ \7 d
@.CurrIcon := "drivingHome";7 ?( L' C- k5 K1 T
@.DrivingHome := true;7 N7 z3 C! I" ]: w
end;7 w) z6 X+ g9 _* X4 `+ y0 h( h d2 A8 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 k8 {4 p/ s {3 t4 }' Z% b# _, D part := @.transpOrder;+ ^5 ?/ r: s0 `+ w$ H; N7 A$ y
part.move(@);-- load part1 ?. T# [' b$ }5 R$ Z
@.CurrIcon := "load";! l% c- J( ` e& _+ J, ^( l
GlobalDistObj := part.globDestination;! R# q9 l$ d' ~9 d. m. w
assignLObj := rgmanager.rgAssignL;; {- H# v. r6 t0 K
row := assignLObj.getRowNo(GlobalDistObj);
& B, ?! [4 S1 _* d" E& U/ J$ { if Row = -1 then -- since 70* C2 A1 W( i+ F2 \1 U' u' @. v# S; i
if lan=1 then, n8 L+ Q$ i S: I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& q3 e/ {/ I+ r! Q, S
to_str("in der Andockstation: \"",?.~.name,"\""));
3 r+ [/ e5 _8 h else2 n" l$ N7 x) n+ n5 j0 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 j+ `0 y, H8 C& C to_str("in docking station: \"",?.~.name,"\"")); / ]3 F4 V, z1 \5 e" G" Z
end;
1 K) g# r3 Y4 G; C else- e; g" [6 x( p8 t
@.Destination := assignLObj[1,row];
0 v, P9 M; D" K) d) b! [" L end; " k' ]+ L* S y M
newDirection(@);
$ L/ w6 q- j" `4 b2 H @.HasOrder := true;
: F! j& M1 S& \; L- o end;
$ M7 s2 ]9 h. T& M/ z end;8 r; d7 J& d/ y. _2 e
end; -- of the method
; ~1 b) \: m3 N5 X: Q7 y |