/* called by: entrance ctrl of the object 'track'' K! g0 i c2 T& c' x5 P
*/
5 i3 A8 b) I# x5 u8 eis7 t6 e& k8 h) }" R' t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! b" \5 B2 u/ R# N/ E1 d
do. N {1 N; k2 {/ z
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 X0 o6 S- Q- I* C2 c' x" |- L, M if current = @.Destination -- else return
) o! F/ o/ J/ Y% A then
0 q# c! \/ V2 @+ U$ s Q; K @.Destination := void;- Q; A o; w0 f% y5 f( O
if @.occupied then
d5 f! q t0 P+ q part := @.cont;2 p6 ^7 Q+ L- U
@.transpOrder := void;
. R, h% Y, K6 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( t1 \. \- H1 e$ A @,root.eventcontroller.simTime);. c5 L5 B+ p. S) }4 A | k
@.HasOrder := false;
+ O: @4 @7 _. r& f& N @.DrivingHome := true;3 O+ \6 I3 p$ b5 O8 m
rgManager.tryToStartTransOrder;' N" [- ^5 z4 ?1 g0 e9 t
if @.Destination = void
$ i6 y% _# [( V( b6 B% ] then -- no transport order for vehicle @& n) m* b9 v4 V5 C& g
@.Destination :=+ m8 M: n# [) M5 p) ]! |- C
rgManager.nearestFreeStation(@,track.~);; i5 g& b3 Q1 Z6 k Z* }
newDirection(@);
- ~$ l; t; |7 t if @.Destination /= void then. r4 N1 o+ Q1 a f$ ` F
@.Destination.NumReservation :=8 b: {! }# v/ L! q
@.Destination.NumReservation + 1;
" w) B3 H4 ^, x end;5 k" M( F' ^( B9 i( Y
@.CurrIcon := "drivingHome";7 F- d: _9 i/ g1 o
@.DrivingHome := true;
6 ?: }% g" Q* Y. V9 Z- ~ o end;: f+ D4 b! a8 O0 L, k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ y+ T+ M" |- w. v part := @.transpOrder;& d9 E' L: l4 `, R: J6 A
part.move(@);-- load part
+ b2 n' W; Q# a8 [7 Y @.CurrIcon := "load";* l5 p V; e8 @# E4 s4 a# L5 E) g( N
GlobalDistObj := part.globDestination;5 M5 F, p) p, J9 j5 @* c( y
assignLObj := rgmanager.rgAssignL;5 E7 O9 n2 g" `, T) s. ^: {
row := assignLObj.getRowNo(GlobalDistObj);2 K( ~ n9 ` P1 r9 ~" t" c
if Row = -1 then -- since 70
n4 }$ {5 z& Z2 t& l if lan=1 then
& B0 G- c3 L W9 y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: h+ j$ a# K ]. ?& D/ n
to_str("in der Andockstation: \"",?.~.name,"\""));* `5 z7 h0 M( r- q
else
, U0 l4 S3 m3 k! o B; A! y6 C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 L% a* y# d; t1 [
to_str("in docking station: \"",?.~.name,"\""));
8 P6 Q- [; W, ` [* k end;3 D, W9 j7 u. A4 j. s5 K/ o: \
else
8 w+ h7 @- H* n. Y @.Destination := assignLObj[1,row];: g( z% L- s5 H
end;
2 u$ Y4 k V* H* v newDirection(@);" \: _" i' a( X
@.HasOrder := true;' q* o( ~4 C0 d6 |* U0 l
end;
& U* J- b% A5 |. K, E end;1 h9 l/ _& |9 z1 I9 h
end; -- of the method
4 {5 y% _% r0 Z' p' C! c7 x+ ~* { |