/* called by: entrance ctrl of the object 'track' T: U7 B& U( ?( l
*/% R) h: V" Q4 g/ s
is2 g4 v3 T4 |( p& F# u4 d; Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( `: P1 ?) r; t$ tdo
- O2 }$ s5 t! g8 Z/ C( `4 }3 c7 K Lan := rootfolder.Internal.Tools.AOLlanguage;+ c+ X$ ?( {7 U- T9 e
if current = @.Destination -- else return, Q+ _( E* x7 K' F' B" J
then
5 e0 r) F( q$ W/ y, a, v# e @.Destination := void;
" v8 p+ s& @! w+ p if @.occupied then: q; V4 [$ _$ y% m
part := @.cont;
* N/ H6 P2 ^- G( C$ ^2 T @.transpOrder := void;
( ?4 T; D( ?1 v9 E- i8 w; J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, G5 T4 Q9 R. { @,root.eventcontroller.simTime);
* K9 a* z% g+ Y, d9 E: |4 [# M, z @.HasOrder := false;
0 W6 \" j5 v. R4 H @.DrivingHome := true;( M4 p0 g! [. p& j: y' b8 \7 h
rgManager.tryToStartTransOrder;* r- D' h; ^! f3 P! U
if @.Destination = void
( F4 V' {: j& d* P1 ^, K, a then -- no transport order for vehicle @
4 h3 u- T. C6 x8 J* \: ^ @.Destination :=/ s) b8 A) G2 F: I) M( {
rgManager.nearestFreeStation(@,track.~);. L: @/ i( [# c- _7 D9 I1 Y- L
newDirection(@); ! x Y7 `0 K( X
if @.Destination /= void then0 D' S+ O" \3 d" }$ a& g9 o% {
@.Destination.NumReservation :=- r3 J t+ a3 `
@.Destination.NumReservation + 1;. H1 J$ ^/ c( \8 B; t: n3 P K
end;, K& i0 t+ _ Y" h9 x
@.CurrIcon := "drivingHome";2 H& b3 X8 S8 g' }- h8 q( g
@.DrivingHome := true;
: v$ I/ E8 y! o9 Z3 ] end;/ ~- l4 A- P" b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 G- s! ]" F0 F6 | part := @.transpOrder;% L9 E8 `8 c, D1 m* [
part.move(@);-- load part
\$ A7 N" d s0 F @.CurrIcon := "load";
* l# @# a% p2 ]$ N4 Y9 i GlobalDistObj := part.globDestination;
! R* ]5 o1 s& L3 Q# r. G assignLObj := rgmanager.rgAssignL;- E/ X9 F2 w: b' s
row := assignLObj.getRowNo(GlobalDistObj);
h4 ~# \- ?( y# p% H6 J) u# k+ x if Row = -1 then -- since 70 W1 Y2 K2 ~$ F' i* E9 m
if lan=1 then
" x3 u$ F( O8 [7 T3 y4 E/ }% @$ { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 w' k' ?/ j; U4 P8 H/ f; T
to_str("in der Andockstation: \"",?.~.name,"\""));
: i$ E5 n" \9 j6 K else- Q5 O; q# {5 A8 y" p5 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% C G1 P6 e+ e5 Y9 S; f' I
to_str("in docking station: \"",?.~.name,"\""));
; W1 L% c- K0 C5 h: m end;
" P* _. }( b, x B: n3 D/ q7 e else! t2 @) j# L& M7 v4 T9 K! t, A. n
@.Destination := assignLObj[1,row];8 a2 M. E: B8 q7 Y" a+ J# P
end; ( U0 ?) k" w; r( O# A2 v
newDirection(@);
& K1 V# ^: K- E) ^* I @.HasOrder := true;
5 X H( \4 Y6 U' s& H) ^7 X1 C end;
+ L! V( \6 t, y9 h$ i end;0 s5 d8 W3 E$ l: y) c( e1 k
end; -- of the method2 M$ n3 m- J! k
|