/* called by: entrance ctrl of the object 'track'
+ F1 m' d& l8 U# g*/) p' ~- A9 f" i- }9 y$ |) ?( o9 h0 S
is
. s: M, T; n2 F" v3 J+ }3 C& |: ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 o0 u! }' R5 jdo4 H, a7 ^8 U E1 |* ^+ w
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ B1 P G/ a2 A* g7 B if current = @.Destination -- else return/ u/ d4 F+ e# ]" Z; O
then5 H! ?" m2 P% D7 d* }
@.Destination := void;
: r/ K! ~( D# n+ z if @.occupied then$ i: E9 C' A' m" I( X( B- p
part := @.cont;1 X( U4 F+ o5 Y: M' ?
@.transpOrder := void;% K' [. z ^% V1 [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, H8 |3 Q- Y: ~ @,root.eventcontroller.simTime);% U3 d* E7 B( M2 @! ~2 u
@.HasOrder := false;0 K5 k5 ^$ f# o- e0 Q
@.DrivingHome := true;- U- ?3 w( e2 a% l' B( e+ T
rgManager.tryToStartTransOrder;6 Z- Z. q: ?* X9 r" |* [7 S) @
if @.Destination = void
+ D8 ]+ A: j- r2 z! R0 c& w then -- no transport order for vehicle @2 j6 ^6 V8 g* M7 Q/ z4 b
@.Destination :=
" e# m7 B/ j4 \) o3 P rgManager.nearestFreeStation(@,track.~);. `: P5 o8 V5 M& R& k
newDirection(@);
( G5 D0 }, ~ `, x$ W+ ?. v if @.Destination /= void then
6 y8 ^/ |! F/ @2 W @.Destination.NumReservation :=
0 q% ?6 h$ [' A% I @.Destination.NumReservation + 1;
% E) h: ]$ t+ D% w/ k end;/ S- ~5 T, V3 r w
@.CurrIcon := "drivingHome";
: s8 w% [+ L: e$ g( i }; o+ n @.DrivingHome := true;. O6 t1 U; ] Y
end;- I$ u( f- T( N# Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ t u- w& E' I: P8 g" D3 {5 Y
part := @.transpOrder;
% e @- z" w- @! L' @& r part.move(@);-- load part
9 Y) g: {% a! G$ B0 d5 P4 m @.CurrIcon := "load";; J, L" C4 Y+ S
GlobalDistObj := part.globDestination;
) z5 _* r5 q2 {* S assignLObj := rgmanager.rgAssignL;4 Z1 m6 q2 s' S6 y5 a( M/ j
row := assignLObj.getRowNo(GlobalDistObj);/ m0 [% P% X6 k2 F6 q) D2 u
if Row = -1 then -- since 70( ^, M: Z! N/ M" m( w
if lan=1 then
3 Z6 B% O4 K F$ _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," N# H1 J8 j/ E% G
to_str("in der Andockstation: \"",?.~.name,"\""));5 I" y# j' |; P: N
else% W7 b; J# z6 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, p( I$ P, M! ^7 h+ r0 Z) { to_str("in docking station: \"",?.~.name,"\"")); 3 {8 x% w R* Z8 k3 y4 R, p
end;" r5 M0 }" x' @* ~0 w$ G
else
+ N! M1 r$ M0 w5 l! B5 U @.Destination := assignLObj[1,row];
! M/ n1 k! @/ p2 t# D1 v end; 3 W+ ^8 k, C) q
newDirection(@);
8 d* Z6 V" S( p4 |9 n5 x @.HasOrder := true;
) f1 M/ l8 y1 Z: R end;
- W" o8 _1 y4 _: r end;
+ g* V9 Q& _" H% P$ X2 z; _# gend; -- of the method- q% w* N0 W9 |9 F7 r
|