/* called by: entrance ctrl of the object 'track'
7 L' N- u" R6 K6 }: T" A6 Y9 r*/. D3 R% E7 }4 [0 E: i3 b1 \
is5 M( Z" ^. Z4 \ `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 e* n5 a# ]- _8 |+ \
do5 H/ R3 X7 @4 Z$ F) E- _0 t, R
Lan := rootfolder.Internal.Tools.AOLlanguage;
# T( s0 X! f6 K5 M7 r if current = @.Destination -- else return
' Q* @8 G k* Z ~0 I, G2 n then/ f: }% q0 [3 `8 V, b5 Z. d
@.Destination := void;
, e! O x% w X5 `7 t2 t$ } if @.occupied then% {) X8 d* J7 ]/ w/ F; _% g1 R
part := @.cont;
0 j Q' F. [* N) [$ y# t @.transpOrder := void;
8 \8 \, m( Y# K- l7 {; w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, |+ c9 P; f5 q) M2 o9 g
@,root.eventcontroller.simTime);" u6 A6 w' k/ }
@.HasOrder := false;5 t- Z3 x8 D' g- G- R
@.DrivingHome := true;
3 C8 G# G' }3 T, [* U' f rgManager.tryToStartTransOrder;
/ v0 x, k" ?7 y+ R if @.Destination = void/ F4 a" d, Z( q. S+ m* i
then -- no transport order for vehicle @
+ V. Q! g5 J+ e% {7 `- k2 A) p8 [ @.Destination :=
& \2 x& U. ~5 r! y# [ rgManager.nearestFreeStation(@,track.~);
* i3 {3 Z+ K* o N newDirection(@); % Q3 j+ [" E3 h
if @.Destination /= void then/ ?5 S' x" f" [
@.Destination.NumReservation :=
+ {+ ^9 R/ Y8 l, C( | @.Destination.NumReservation + 1;& B( |: W3 k W. f% T) h& q. a
end;
5 A0 k% J$ g& V3 W6 Z @.CurrIcon := "drivingHome";. L r$ L3 m5 k0 f% p' u$ O
@.DrivingHome := true;
" N2 b) l7 v# y m% C- w, _3 w end;( F" ]' k5 V3 k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, [5 I7 s3 e) Y3 c part := @.transpOrder;
1 P! K% Q" b& i8 l3 f part.move(@);-- load part5 ~9 |. f" t% E; T H( j' L
@.CurrIcon := "load";
s/ c# ^% d) n, o- c: X9 x _ GlobalDistObj := part.globDestination;( z) G; c. V- Q. |/ u2 K
assignLObj := rgmanager.rgAssignL;
( w3 Y5 x; K" C row := assignLObj.getRowNo(GlobalDistObj);
+ h, }5 K& F# I3 _1 n# X4 G if Row = -1 then -- since 70
s" R( n* j) |- K2 P if lan=1 then
: d6 [4 X, d9 c. [8 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
]7 m8 N7 ~0 Y9 S7 p to_str("in der Andockstation: \"",?.~.name,"\""));. T, X& }" R! [5 a! l- |
else8 V% O/ O) r2 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. g! [) l1 z6 E
to_str("in docking station: \"",?.~.name,"\"")); ! V) F' l) c6 @, z
end;; ~4 z+ \7 _1 {# ^+ [$ h9 H
else1 n$ E J( f, M- _, i( v
@.Destination := assignLObj[1,row];6 Z$ p8 x# }+ w* k: \4 ^
end; 7 X$ p4 y, K" [& |8 m. O& |
newDirection(@);. m' {/ r- v U. l! q/ `( G8 K
@.HasOrder := true;
; a% [! E2 L4 W8 ? end;
3 \% @! @. J" ~) I* k3 t/ B o8 @ end;
7 i2 t$ R( P' ]end; -- of the method" P7 y2 f9 G* c. Y: ]6 F# w
|