/* called by: entrance ctrl of the object 'track'
+ G8 w" {8 e0 q4 a*// I& ^2 o5 I; o
is
x- U" K0 F1 m/ V6 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;" x6 |) V) t) G6 Z7 y
do
$ o+ o+ W ?3 ]& n0 c' w Lan := rootfolder.Internal.Tools.AOLlanguage;- N+ f' K, G5 r5 x
if current = @.Destination -- else return
! A) D/ [0 P% P& E. A then
8 Z& P0 [) L; b9 y0 ^; ] @.Destination := void;2 U- q* s: p$ {- Z1 E/ M" x" N& J0 s
if @.occupied then
& C; ]( ~4 t4 f6 g7 L part := @.cont;- U% b5 K& @& t3 k5 K4 F" w
@.transpOrder := void;. j& n; W1 h1 c; E, A8 n1 ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% o* v4 ^# M5 _4 \ @,root.eventcontroller.simTime);2 v2 T5 K' |1 X& B' t0 b& r
@.HasOrder := false;
' g6 D8 z7 D9 a% t7 \9 D# R: Z @.DrivingHome := true;2 L7 Z) ^/ |% i6 X* \: w# d
rgManager.tryToStartTransOrder;' [* l9 j3 P `) R- l* ^- e
if @.Destination = void
7 L& X; M) ?5 R/ A then -- no transport order for vehicle @( a2 V7 u }, d; [+ p2 J( V
@.Destination :=
& K8 @$ I' f o* J rgManager.nearestFreeStation(@,track.~);
7 ^6 b$ }& R6 T* ~( b/ B1 j newDirection(@); * [8 w- }# c! u# e/ U8 f1 p
if @.Destination /= void then5 N3 C4 S% _7 K( P5 h
@.Destination.NumReservation :=+ G4 I, n$ x1 j2 F, D1 x; A2 Q
@.Destination.NumReservation + 1;' c: V0 n- G/ Z- u! k6 N! t
end;
# j; P6 J) V; Z J/ l: w @.CurrIcon := "drivingHome";) m5 n7 P$ m% L; s
@.DrivingHome := true;
+ `* \2 D- N# b0 {' ?! f1 E end;" N( y9 G: _3 f( k8 X2 T, g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) p8 W8 C8 a. _3 U$ Y% ]3 ^ part := @.transpOrder;* g( n9 ] K3 E3 y) G/ l7 {
part.move(@);-- load part
1 r/ f$ B) A7 a2 T2 Q# s @.CurrIcon := "load";3 ~+ t, S. x, s* H: A/ l
GlobalDistObj := part.globDestination;
) F' i. P" s$ ]; e1 J. U, H assignLObj := rgmanager.rgAssignL;
0 v3 K4 r u$ `2 ], ` row := assignLObj.getRowNo(GlobalDistObj);/ w2 E# \8 C5 D' ]. | u4 _6 y# ]+ P
if Row = -1 then -- since 70
8 e4 I7 A, K$ B+ u if lan=1 then# D- {7 R( f9 w* m, @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, c: ?1 d% D- w- l7 W& k to_str("in der Andockstation: \"",?.~.name,"\""));9 t/ Y3 w7 z1 o$ U. ^3 l; n* N
else
" V% W; U g) v" y9 M' H" ]* H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' d+ k q; R4 {' @2 O7 \4 ^ to_str("in docking station: \"",?.~.name,"\"")); , w8 q1 i, O, ~' O7 e
end;& k9 A( R3 z5 R4 w
else
* k1 n O9 a$ j2 C/ L' {" u @.Destination := assignLObj[1,row];; u4 u& Q0 r9 S: @# e1 A
end; 2 [3 W9 o' v- [0 H
newDirection(@);
l7 U- ?! ]- t) D @.HasOrder := true;6 M o6 e9 ^+ g$ P" r' G2 R
end;, G- z0 h, ~# i
end;: U9 ]! r- X2 a5 l$ E. K
end; -- of the method8 c( s# X0 K5 N T
|