/* called by: entrance ctrl of the object 'track'7 v$ V c/ T% t0 ^; p* a
*/
7 H; ~, t' V$ V' _+ p& s( z/ Nis& @/ v8 X$ u8 u* d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# i: `3 t$ v7 H; Q3 p/ R/ Cdo2 N: n" r8 a- Z8 x/ G) d
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ g: b; y# `. y* g if current = @.Destination -- else return
7 L- j0 ]- T$ g- C) ` then
0 b0 X4 X3 R+ b/ }* g% S @.Destination := void;" ?3 N* ?+ v5 }* s0 m, ^
if @.occupied then6 T/ F Z, B+ W
part := @.cont;
( x- i# [1 M+ @7 [, f c @.transpOrder := void;
+ x/ l& ]$ N4 }5 Z$ ]) X* B3 i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 j K) L- I3 E2 M7 P @,root.eventcontroller.simTime);
% P4 _+ ^$ I& H/ j+ ^. g @.HasOrder := false;
$ H. l, M& x3 m( T5 x k @.DrivingHome := true;8 A% |3 t6 l" F4 n$ X
rgManager.tryToStartTransOrder;
: v! s# E' v8 o2 \ if @.Destination = void1 |* `( L, L& ^4 \) {
then -- no transport order for vehicle @: W( T% e4 M0 @8 V' ~8 C8 y* R
@.Destination :=( E" ]8 v4 f4 a3 E3 Q* i
rgManager.nearestFreeStation(@,track.~);
6 }' {1 \+ |9 ^# I- ] r6 g7 ~ newDirection(@);
) [& \, e5 E& L5 ` {! Y0 b if @.Destination /= void then) x; V" g6 j& G; i. j, v; H+ Z
@.Destination.NumReservation :=
5 j: S! Q2 f0 e' B$ x+ m @.Destination.NumReservation + 1;6 c: R9 d/ ^8 o j" r$ A7 U: C! |6 K; N
end;6 t! {: _8 n( T m4 M
@.CurrIcon := "drivingHome";
' F' R* V( Y3 _; b" a; ^ @.DrivingHome := true;
& f0 y- V9 f. [8 S! c, E end;
* f$ g* \; }& d$ B3 Q8 J0 Y% g) M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 g; h( i9 J$ e3 i, u part := @.transpOrder;) w' B6 u2 X8 ~3 h2 r" ~
part.move(@);-- load part4 m. r+ `; b6 Y" R2 o8 b) S4 @
@.CurrIcon := "load";
% j# [! K$ T! T+ s GlobalDistObj := part.globDestination;: P' d9 z- y4 L7 n% [) ?
assignLObj := rgmanager.rgAssignL;
# w$ C9 J% Z8 Z2 i+ ?8 \0 S8 x4 C: ~' _- C row := assignLObj.getRowNo(GlobalDistObj);, b: s2 A+ @- F; U
if Row = -1 then -- since 70% p! C/ Z8 B- _" f0 Q, q) I7 p
if lan=1 then: }2 X# y' i4 d$ ?% @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; L G3 A0 ]" S* s3 \3 h to_str("in der Andockstation: \"",?.~.name,"\""));
5 o' k1 ~! L$ M9 m$ O else. X3 P( L. X5 t- T2 y& t( C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ Q3 N7 @0 b/ d9 ]( P- W8 _& L( @
to_str("in docking station: \"",?.~.name,"\"")); % s- s# g/ Y" q# W8 w
end;
1 O2 @6 G5 R8 X7 S& Y. o. D6 l else
* m* u1 T2 L1 M @.Destination := assignLObj[1,row];4 u- x% {: x, c+ q& Q& }( y5 B
end;
3 |! R$ e1 w) t% l; F newDirection(@);
( U0 w5 u+ x# t- C4 ]! x3 l @.HasOrder := true;
5 R: \5 r" l. k& M end;$ `- ^7 L: |7 i. |
end;3 t) G# M5 Z' I* \: T
end; -- of the method5 U8 G C) @! b: s- P# O( v
|