/* called by: entrance ctrl of the object 'track'
0 T3 {/ c$ m: R*/* G3 n/ t' W1 Y3 P, t
is
7 w1 }4 p2 a8 S7 W4 _8 I$ e, ^2 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ Y4 l' [( c. @1 d
do
' J# z4 U5 f' {0 J% [5 H/ J Lan := rootfolder.Internal.Tools.AOLlanguage;
: m! u5 T. d2 u- r if current = @.Destination -- else return
4 A9 @$ L) W) X8 y then
* K U; F! `( g9 }* A" N @.Destination := void;# L: t' n2 ?4 |3 K. d4 I
if @.occupied then7 g# N o$ g: X# t8 ?
part := @.cont;
% U# q4 t! ]1 { @.transpOrder := void;, f7 u& g+ ~% n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! t N8 X- T9 r9 i( Y& y @,root.eventcontroller.simTime);
8 R6 P5 a# x1 K0 W% }7 V5 l @.HasOrder := false;% f- P- @1 E/ [! t( z' T+ i
@.DrivingHome := true;4 F; F: s$ A0 ~( R, b
rgManager.tryToStartTransOrder;
+ Z0 X" P$ i" Y& G4 `' H/ { if @.Destination = void
( t! [3 k* O+ D' D. C5 { then -- no transport order for vehicle @
+ G9 \: z: l: } @.Destination :=7 Y# _" L7 ~* I5 w! D" d2 x. m! k8 g
rgManager.nearestFreeStation(@,track.~);
, B. L. ?/ g+ P, W7 w K+ Z. P newDirection(@);
% |/ T2 C& Y- F4 w% u' G2 U& @ if @.Destination /= void then1 F) t' U$ Z& {% I4 w) C
@.Destination.NumReservation :=" E0 ~8 N g% G) q }
@.Destination.NumReservation + 1;0 ^' W/ K" M, |) b2 v
end;
. w! E1 t1 }& q @.CurrIcon := "drivingHome";
) M% V* i# K ~+ K @.DrivingHome := true;+ {% _8 ^7 [, }7 m, _6 x. V- @
end;
+ | z$ e+ S. X3 E6 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station) m/ a; g1 |/ h$ \- I
part := @.transpOrder;) ~( O: K) ^' T9 w
part.move(@);-- load part
# G2 {0 R5 r8 t$ P8 X @.CurrIcon := "load";- b/ u! s+ C: E8 @, ?- A
GlobalDistObj := part.globDestination;& Q' H- U3 \ ?! E. W+ A/ s# e. `" y
assignLObj := rgmanager.rgAssignL;
: F x C7 U$ O row := assignLObj.getRowNo(GlobalDistObj);
+ v. d+ R* E8 L! }4 g& o if Row = -1 then -- since 70
3 ]+ Q! L& t) _8 Y4 r if lan=1 then' p2 C0 J6 P1 j8 K# H" b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 a2 v3 m: N4 c* w" m& o! S" L4 M
to_str("in der Andockstation: \"",?.~.name,"\""));# Q7 |1 u. a. e
else- H% M: S, m/ k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ f6 u* g& K, D4 w7 X# v
to_str("in docking station: \"",?.~.name,"\""));
1 r h7 \" O/ V0 H9 H end;
0 ?1 m/ I# T) l, P5 P) P+ E5 i1 D else
. j/ M( V) c% B. v, J3 | @.Destination := assignLObj[1,row];' u0 m% Q6 {, ?
end;
* i) G3 T7 E& B/ }0 b6 j newDirection(@);
. `2 t3 a1 J9 X @.HasOrder := true;* R# s& O+ ~" B+ K; F3 s
end;9 ]( e- W$ K2 J- Y5 x* n
end;
, M7 l" j$ g5 `' B. E+ Zend; -- of the method
: I8 _5 t$ M# q* i! W8 O |