/* called by: entrance ctrl of the object 'track'
" i7 a3 Z8 x: }. _* N*/
4 i+ c0 `2 a5 {0 |+ m5 x( Gis4 P9 k1 p0 n" @8 m# i: V( U0 M9 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 E- Z2 W& c- q Ldo
! k+ n0 [5 t( |+ m& v5 _3 [7 P Lan := rootfolder.Internal.Tools.AOLlanguage;
6 H( f4 g1 l/ w8 V( d# Z+ w5 | if current = @.Destination -- else return
4 _2 t% I, \" k# o; c$ G; W# Q then
) `3 ]8 c/ }* f7 { @.Destination := void;
: M+ }! d3 `) k7 y6 k i4 b9 b4 F if @.occupied then
% r2 i! o5 ]5 U part := @.cont;
* `! \3 W! p% i/ W$ f: J7 E* l# [ @.transpOrder := void;& n- ^, Y# T( S' n$ n+ p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( \0 {3 E( n8 i- ~. Y, t @,root.eventcontroller.simTime);9 C2 R9 n4 ?$ @! O/ f7 i, f, Q
@.HasOrder := false;
# P* w" w+ k1 E4 w0 a @.DrivingHome := true;: ?3 d* {* a+ k; ~) G* c
rgManager.tryToStartTransOrder;8 F/ G/ e2 K( t& f6 v3 |7 w
if @.Destination = void5 h0 q0 G( T0 H5 p) R/ B
then -- no transport order for vehicle @8 C6 G* S) y: |
@.Destination :=
$ q( s2 F/ D. K rgManager.nearestFreeStation(@,track.~);
% R$ x, m' ?. I9 ~7 [' I newDirection(@); - E7 U! d$ N$ U6 k; s
if @.Destination /= void then5 Y) p C4 g) ^2 m
@.Destination.NumReservation :=& p' ?& G/ O1 z7 N: P8 [, b
@.Destination.NumReservation + 1;6 g2 Y) C: h! L1 C
end;
$ X. l6 W, h0 r @.CurrIcon := "drivingHome";
, R1 s+ m; i; D8 [( d2 w @.DrivingHome := true;
. M5 T, V( a4 _# n9 i! j end;. O6 l# H8 ~ e- G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 p/ B! w. j. s# ]7 u) i i E part := @.transpOrder;3 W) B1 K; u/ @8 g) @( s
part.move(@);-- load part& f; q4 }3 o+ X' X* a
@.CurrIcon := "load";, J; p( ^# g3 c
GlobalDistObj := part.globDestination;
+ _! C4 e9 [( F4 L- B assignLObj := rgmanager.rgAssignL;7 Y& X5 D. E9 o4 V$ N( Q
row := assignLObj.getRowNo(GlobalDistObj);" D( R U2 p( `7 u6 Q3 U4 f
if Row = -1 then -- since 70
% P! ~# j8 z: n0 ^+ P/ n1 \( m if lan=1 then( K: Z; A. h. ?$ e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), L* m: M/ Q8 R- ~! G c
to_str("in der Andockstation: \"",?.~.name,"\""));- t& t3 m f( {' t" R) O) I0 B9 G
else
3 I* E* a, @% j! V! K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 r7 a8 P& n0 P2 {# X. ^
to_str("in docking station: \"",?.~.name,"\"")); . n. a$ P0 B8 `: `, ^* C3 Q7 P
end;
( z m# v. F7 c) r else% H8 P( B3 I7 q) H8 F
@.Destination := assignLObj[1,row];
9 E/ ]4 E: m$ C8 f end;
( C- ?" w+ P/ w( K# t/ ~ newDirection(@);
4 S, A- B6 r+ d4 i' Y8 e8 m @.HasOrder := true;" y8 K7 G4 V9 M- e/ l' H9 S/ y8 o
end;
7 {# c0 k( u3 r7 s+ C end;
# h r; B, c6 ]6 B3 J! hend; -- of the method. T( A5 `; E6 ]
|