/* called by: entrance ctrl of the object 'track'
2 M/ A; L& l& |: l9 d$ C*/( m# z) b4 E9 h
is
$ T, o2 t( j, Q. ?3 ~/ N' j0 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;) h, W/ c4 d9 ?$ O0 H
do% V8 W& ?) [! u1 `2 Z/ ]7 N7 x6 `$ D
Lan := rootfolder.Internal.Tools.AOLlanguage;6 j' `7 j0 b; Y6 B
if current = @.Destination -- else return
% t( Q+ ~0 ~4 R8 ]( l then
; k7 M m: a' ?+ N# Z! ?: [ @.Destination := void;
6 R0 H g0 a1 E5 X( `9 o* q5 E0 k" k if @.occupied then* |4 v0 c" ]) w) Z
part := @.cont;7 u# v+ e( J) s3 I* U0 ]
@.transpOrder := void;
6 J' o$ o2 B2 c2 r2 O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' k0 N) Q$ |# V @,root.eventcontroller.simTime);; q f# V7 s# q) t7 _, Z Y# L' X1 S
@.HasOrder := false;7 l) U% c3 U: j% t
@.DrivingHome := true;
0 o' ~" K" e0 { e" o: u% l4 J3 N& _ rgManager.tryToStartTransOrder;* w8 A! ^6 z* ]' ^: A2 x! l' [
if @.Destination = void& q: x( L/ u: p8 V! M2 O6 X3 m
then -- no transport order for vehicle @: u7 j' O2 A( m" h* ]8 X
@.Destination :=& Z! H; C1 I& Z* A7 S
rgManager.nearestFreeStation(@,track.~);
7 ^0 O; L+ Y* b% S' m) E newDirection(@); ' C" N2 l/ s) F+ }
if @.Destination /= void then. E h2 Q1 c* C' {
@.Destination.NumReservation :=, `9 t6 d* q+ |. M
@.Destination.NumReservation + 1;* {; h: S" Y" k0 n. Q
end;
- z" |* i' J) G& B( `, i/ ~8 `- _ @.CurrIcon := "drivingHome";
0 ?7 }' T4 ?2 a; }) [9 g6 E* u+ V @.DrivingHome := true;
" E0 `2 |% J5 ^3 x end;* P- y: _$ \' y# d5 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 U; t3 A) ~. S' ~3 r
part := @.transpOrder;
2 \( ^% s% x" x. r* j7 k Q, a3 H part.move(@);-- load part
7 w4 v4 V9 j* n. [ @.CurrIcon := "load";
! `2 b2 U$ {( _, X GlobalDistObj := part.globDestination;* A( l7 ?3 {: ~8 Q8 r4 B7 s
assignLObj := rgmanager.rgAssignL;+ k6 K( M+ ?) k1 n2 u
row := assignLObj.getRowNo(GlobalDistObj);
& D; Y/ X$ P' B* o% O if Row = -1 then -- since 70
% e1 ~) {$ F4 `, \* g$ L! F if lan=1 then
9 f5 [1 X' a5 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% L9 N2 D: H% N7 l! O8 }
to_str("in der Andockstation: \"",?.~.name,"\""));: j3 K3 ~6 i: i E8 P# Y& j H) g
else
; }$ n* Y- C3 c# }& b0 L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: p2 h2 c& w" h% G to_str("in docking station: \"",?.~.name,"\"")); 4 ]- z0 t6 j) E h+ M6 A* z
end;
. }6 d/ ^4 \( {- H0 z5 ? else
2 n! E) ^* K! M/ P9 J9 Z @.Destination := assignLObj[1,row];
3 H4 S+ K9 r; C' P! p end; , y9 i" O% E+ p M* W
newDirection(@);
' d' p6 _: M" R2 f @.HasOrder := true;
/ l& o# G: J6 ]4 d* I end;% q8 a& P2 ]" G( h4 r- G3 P+ M
end;
x! S* |* z& \4 d- c" vend; -- of the method
( u) T0 d* D% ]$ N/ ~! d7 V |