/* called by: entrance ctrl of the object 'track'
5 _8 N, m, S; X+ v0 w; m7 C*/
y7 ?# @* U4 lis
: s' x! F& I7 r4 m5 P# q& \% ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 b& K; }7 E8 Z* r6 T: X) Jdo" Z) m: ], ^+ W/ R' H
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 h2 @' i* x; m2 q4 T if current = @.Destination -- else return. J* d$ o5 P! N/ W8 l( D
then
$ B0 p) L; s1 t' `( w8 Q @.Destination := void;% f) m) @: T; v; H
if @.occupied then; ?, Z# X5 {( q7 p
part := @.cont;# E3 I1 O; \# T- }
@.transpOrder := void;
( }( U" u& I1 |7 K: I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 h% c3 ^0 q& q
@,root.eventcontroller.simTime);
p; {$ X @+ U; U" f @.HasOrder := false;
# [/ o" J5 W7 |" r2 L @.DrivingHome := true;( b* C1 k2 E( R& O$ N/ d/ e! W8 `; r" k
rgManager.tryToStartTransOrder;$ @8 P% f7 ?3 ^, \
if @.Destination = void
- i6 |! [& o R' `8 b( t2 C* B then -- no transport order for vehicle @0 N' U5 K2 |/ J/ q* |8 A4 G
@.Destination :=& ?8 M: r: ?/ S
rgManager.nearestFreeStation(@,track.~);
, u0 c/ k8 \( P* h' | newDirection(@);
$ h: P9 ?& H# N0 Q' P if @.Destination /= void then
8 i3 X! s$ E* Q- M @.Destination.NumReservation :=4 b" f, N9 @( I, ]! g
@.Destination.NumReservation + 1;# C5 d; G2 }% W% k, @6 D0 W6 N
end;5 _" d9 @% ~8 h
@.CurrIcon := "drivingHome";
- a( t9 l {' l, b* ]3 _ @.DrivingHome := true;
0 s, J" F/ ~7 M- v; f+ a end;
5 {" ^# L; G: l5 r0 q; y- C5 R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# z. V/ a* U+ s; X part := @.transpOrder;
8 F9 l1 X5 K: o4 o9 P3 ^ part.move(@);-- load part
2 b0 g! }0 l3 ? @.CurrIcon := "load";
9 X) @2 X# Q5 i GlobalDistObj := part.globDestination;
4 g7 a% {1 O; ^! a# T/ V assignLObj := rgmanager.rgAssignL;
6 z3 Z1 g% `5 w" L/ J; w+ Y0 y8 W3 P row := assignLObj.getRowNo(GlobalDistObj);
4 F8 ?8 Y: ~8 b if Row = -1 then -- since 702 e0 T, V5 ~2 n$ @; ?5 D9 R9 H! n
if lan=1 then* ~( Q; G, f1 o+ L' U; T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* ?1 h7 ?0 d, }) v$ P1 W, N to_str("in der Andockstation: \"",?.~.name,"\""));
2 F" R0 A/ Q: e9 J* Q- K, [ else5 y& l" b6 a3 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* X% `3 I1 g6 s5 j+ {! `( U
to_str("in docking station: \"",?.~.name,"\"")); 9 I4 y- ]! O2 q+ l2 E+ `
end;
! l* \: B( Q* M, l/ ?. y! J" n else
4 g0 w! F {# X* k) o5 H @.Destination := assignLObj[1,row];
7 e2 @. f3 O& ]# u: v4 j" Z2 h end; ) U! [- G# L8 D' g' b J/ e, s9 Q
newDirection(@);% m0 T8 U; v" n3 _( k/ |+ z: J
@.HasOrder := true;
e; y8 x8 f+ ~7 | end;* {# i9 I6 V$ L5 Q: [ C. x
end;8 r- \' m- `* U* Z
end; -- of the method( p# i" m6 X" ?) O/ r
|