/* called by: entrance ctrl of the object 'track', U; @) f& ?. D$ S% ]& E
*/8 A( o% H7 U( g4 R+ Q0 ]
is: }+ \( |! b1 Q9 ^1 t7 Z0 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, j; `; E6 s ~4 M b$ H" Zdo
2 z% x5 T5 S2 `/ ~& P# Z Lan := rootfolder.Internal.Tools.AOLlanguage;, u9 e5 \5 ^" T
if current = @.Destination -- else return3 W$ S8 ? ~# A U
then
2 f6 q/ s5 H; x3 \/ p" n @.Destination := void;/ Y7 R: x, }9 Q; D
if @.occupied then
; Y% u- @7 x6 l' \- H- s5 G part := @.cont;
% N7 k$ Z4 ]* g @.transpOrder := void;
! @0 [+ l) _# V) W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ s( U& D, ?9 G* z9 Q5 \, V7 d
@,root.eventcontroller.simTime);
0 s5 M! T0 s* s @.HasOrder := false;" x8 E" N$ s, @- q+ z: t* i
@.DrivingHome := true;
7 H8 Y* v4 _+ L" `( w2 J rgManager.tryToStartTransOrder;7 J8 [8 n9 u0 F9 J
if @.Destination = void
5 V/ E1 ]4 x4 j then -- no transport order for vehicle @! U- H, w/ D+ I1 k+ g( k5 T
@.Destination :=
8 M1 {( t6 ]0 o& U7 ]8 G$ `" j2 V rgManager.nearestFreeStation(@,track.~);
, |8 m1 a+ M0 | newDirection(@); 2 o: h6 D: b4 z& J* Q. e
if @.Destination /= void then$ F: B& ^ ~" f$ W% x1 N
@.Destination.NumReservation :=
$ V8 s1 E3 @2 N( Z9 K @.Destination.NumReservation + 1;4 `2 O% x$ I# v! j; i
end;
+ E: E% ^# K4 @/ {' n @.CurrIcon := "drivingHome";
1 A6 i" F: g' }5 s! V @.DrivingHome := true;3 Z" x4 Z: ]8 _$ g
end;) h# W$ W+ ^0 L% i% s% H5 D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% w- S' }" J0 t8 {* k+ A; p0 d, A part := @.transpOrder;& u& a6 y* u7 w
part.move(@);-- load part5 U- ?0 `* |* b6 q& G
@.CurrIcon := "load";
7 d! s8 H+ d5 H- d( C' L/ k GlobalDistObj := part.globDestination;
. `6 [, [' t( h assignLObj := rgmanager.rgAssignL;
- ?5 i. A$ R' N) a0 M, f+ @ row := assignLObj.getRowNo(GlobalDistObj);
( l- Q0 S/ E) _" |) l if Row = -1 then -- since 70
- m7 E' [6 V3 `4 g! S7 y if lan=1 then" F, C6 V4 U% d% z G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ M2 Z5 V: k; S: G
to_str("in der Andockstation: \"",?.~.name,"\""));
; P! }9 h ^. r4 j& g6 t else
5 v7 m8 l) z9 b% m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! r7 d6 q/ R2 M7 R, a- A
to_str("in docking station: \"",?.~.name,"\"")); : R0 y2 t. Q( J
end;; Q/ g: O* D; h8 g/ ]
else( V& k/ }; w" `3 B0 V; B) N
@.Destination := assignLObj[1,row];( B# d6 B: D( Q: U
end; 6 S5 n2 z/ U* l
newDirection(@);
9 e: z( M1 h$ O" @- g @.HasOrder := true;
$ F- a- M' }6 O$ t, V0 t end;# D( I t) P$ M
end;
2 S; C8 d6 K) e, R7 w- v }3 `9 a0 send; -- of the method+ `' }. V9 c# h3 D1 {4 g* l& Z
|