/* called by: entrance ctrl of the object 'track'! ?7 I5 U! _% f4 t3 g0 E/ b
*/
$ {" c5 T6 _$ t! M: @! zis
- V1 D) S) O; l% J6 r( w part, GlobalDistObj, assignLObj:object;row,Lan:integer;, ?% @$ P& R/ B# e6 r' i; Z. F5 h
do
9 N3 U" {- L |4 {3 V9 w: m/ Z5 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
1 Z E w o% C( p5 h4 w X0 P if current = @.Destination -- else return
* E* K7 N0 O, F* { then. ]" m: S. B$ d% z; T( A
@.Destination := void;
4 i0 X: w0 f7 O; @7 v4 U if @.occupied then8 P1 ]4 X4 O, l" N$ K
part := @.cont;
' e, \! H. f d6 `) ]3 L @.transpOrder := void;3 L, s7 U0 d1 y# Y) c2 n; T+ E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. X3 |9 t3 L) O3 y, h6 h. F @,root.eventcontroller.simTime);
- G/ ^4 E" Q6 H$ ~7 ^2 k @.HasOrder := false;5 J. M* T* y! s) p
@.DrivingHome := true;' Z! ]1 V* f9 B4 E- P) \0 ^0 r' W
rgManager.tryToStartTransOrder;
: T, p! x5 a0 o9 i* w if @.Destination = void+ ?. c+ b7 y! [# g
then -- no transport order for vehicle @
) q$ W* a- c: D @.Destination :=3 F# r7 B. Q7 M* B4 P
rgManager.nearestFreeStation(@,track.~);
0 M3 }; _5 G' t newDirection(@);
( D' } k \) t% C, ~4 ] if @.Destination /= void then
. l5 G7 L! h# S1 n) G4 i6 ? @.Destination.NumReservation :=
, u+ ]8 k0 w0 ]- R7 B @.Destination.NumReservation + 1;0 C/ t' c, B$ ?7 e* e* ?& D
end;; O) v" `1 ?) }$ E- \6 f p
@.CurrIcon := "drivingHome";
' i+ r% s% B0 b8 F @.DrivingHome := true;; x0 }; A/ F, ?3 |0 G
end;
5 \) x4 k3 G8 D: c& @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 o& x R) _% h9 i q& S part := @.transpOrder;
' G% f5 m& B' c& U0 X9 L part.move(@);-- load part
$ |2 p* }5 {3 L: Z. A. O5 E @.CurrIcon := "load";
3 y& O) ?; m5 V: d U X- h GlobalDistObj := part.globDestination;
* q) ^4 \3 C/ z: L4 D assignLObj := rgmanager.rgAssignL;- G. [: p$ h. x- H# `( y
row := assignLObj.getRowNo(GlobalDistObj);
" f4 D) `6 z$ p' x! T8 }* k7 { if Row = -1 then -- since 70
& g4 X( k- U; g if lan=1 then
7 z6 E! v$ P. ]' g, P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 o9 M9 L6 Y5 n8 n$ W
to_str("in der Andockstation: \"",?.~.name,"\""));
3 Q1 G: t; V D' I else
/ j( q, m& Y$ e) H, A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% F* M4 D1 O7 S4 W' V
to_str("in docking station: \"",?.~.name,"\"")); & Q" V5 p8 W, q+ s8 i) H
end;
: y7 I; @/ d$ R8 s4 V else1 a) ~4 S. ^1 i; D7 ~
@.Destination := assignLObj[1,row];
9 x! R4 X, n0 R end;
, j. E3 @( [, J' L, A newDirection(@);6 `9 I- Y2 C+ _6 W
@.HasOrder := true;) O: d7 }* v8 V' K4 ]' {
end;
8 M) H4 G1 J: T* o/ A end;+ o, s |+ o4 T) b8 G* k7 K
end; -- of the method5 q. U- K% c0 c9 i c. J) s
|