/* called by: entrance ctrl of the object 'track'# h& Q8 @; ^* D: a
*/# o% g( |7 U6 V7 \' F
is
- |, r9 g: B1 f1 R, T j1 O) s. |% D part, GlobalDistObj, assignLObj:object;row,Lan:integer;, Z/ w( B5 J# y; Z" [3 g
do
2 I; l( c6 u. o Lan := rootfolder.Internal.Tools.AOLlanguage;8 t7 u! d4 N& Y$ Q* ]# k9 Y
if current = @.Destination -- else return: H) E- g/ I- v
then
2 O: a9 ~3 C' C: B: k( S3 g @.Destination := void;
- N7 h7 }$ J' `0 n; J$ u* W if @.occupied then
1 c: E# w5 p! h part := @.cont;
" ^4 W: U; K; q" @ @.transpOrder := void;
+ H: D7 d8 _4 I' i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! W; [! u# H* K+ [3 X! f0 t3 S" F @,root.eventcontroller.simTime);- M; T+ I3 ^6 H1 P+ z; d
@.HasOrder := false;
6 w/ v/ |- i6 @' p/ X2 T+ c @.DrivingHome := true;
3 f$ h [& V& g/ b6 v$ `: s& c rgManager.tryToStartTransOrder;) {- g3 e' W) p6 Z L
if @.Destination = void
: U r6 g& Y- u, d7 s# U* B then -- no transport order for vehicle @, E3 _- \+ W3 ]* V x7 c0 M/ v: u
@.Destination :=& J: b% @% F% }" V+ `; h5 g
rgManager.nearestFreeStation(@,track.~);& d% {: u6 Q# j1 n
newDirection(@); / Q4 F: f- ~, Q7 S% C
if @.Destination /= void then
3 } Q" {- g u2 W! G( s& w @.Destination.NumReservation :=8 W3 a. m' J6 ]; ~7 n8 x
@.Destination.NumReservation + 1;8 j- Z; j9 g8 o. y* W7 g
end;2 J0 q2 |+ [" ]9 d9 O
@.CurrIcon := "drivingHome";: C' ?% S! c0 r) }/ ~
@.DrivingHome := true;1 g _* K- V3 e5 ?( F* @& H+ U7 T
end;
* r4 U I9 G+ v) J4 @ z; q# K else -- the vehicle @ is empty, both vehicle and part are in the same dock station& V* [. q3 {1 ]5 _# f/ }9 c
part := @.transpOrder;1 D I9 n/ o6 K
part.move(@);-- load part
) ^9 M+ E. c: I- _; _ @.CurrIcon := "load";- v( U( x, b! X2 a: }( @
GlobalDistObj := part.globDestination;
- o2 n2 A: ]9 s q) s% q3 r assignLObj := rgmanager.rgAssignL;
( J- I$ O* ~; [5 q! h! L row := assignLObj.getRowNo(GlobalDistObj);6 R$ I+ k% I* [
if Row = -1 then -- since 70
5 ?: T9 G7 Z. f4 p if lan=1 then
( F' C: A/ I& R+ U1 F1 O3 u& \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 h; u6 Z2 v- o0 k$ S" g8 V2 H
to_str("in der Andockstation: \"",?.~.name,"\""));
) ^7 S. c7 t' [% o3 A& a" | else0 j1 q( g* \+ |- c- ?" @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 F2 o7 w' H/ f3 v
to_str("in docking station: \"",?.~.name,"\"")); # D T1 B* ^% d2 r1 M1 {
end;
& |9 ^% w6 K" s* k3 u7 ~; G else
% ?2 d4 B0 I( W @.Destination := assignLObj[1,row];
8 }% N- }" @/ M2 ?0 ~" v end;
?3 _- O+ l- l6 q& A/ R( [ newDirection(@);- C( v& o% y8 N7 |; X1 c
@.HasOrder := true;
, t* }+ s+ u; d# n end;
' e- T6 x. Q% ^ q( e L end;
% W# p2 A' ?: ^- Q8 o& o+ u9 x; s. Gend; -- of the method# w4 X8 {( R6 C t, k# ]1 O/ x' H# f
|