/* called by: entrance ctrl of the object 'track'7 p1 R; C8 C( C% q& o+ K
*/) L, s. ]8 S1 E/ Z; s
is. e+ Z S& @/ s c+ g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! c) E- ^8 O4 y
do C% g& z, ~: z' U; [% y. i. c& u
Lan := rootfolder.Internal.Tools.AOLlanguage;
, ?2 A% M0 \% T( a" d U if current = @.Destination -- else return& S8 W% b, v/ I
then
5 W- M, |" r+ d @.Destination := void;
, f& D/ w! p ]) w if @.occupied then2 |$ N& J7 |6 Y* u) T) e
part := @.cont;. c7 r! @1 P4 V$ q
@.transpOrder := void;% O! t G, D- b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," z8 `( I+ h% S g0 b
@,root.eventcontroller.simTime);( X$ o! O$ @7 _9 X0 T X) T
@.HasOrder := false;
6 S- ]4 E4 Z( e @.DrivingHome := true;- k }3 n+ n5 Y2 N+ ^, n6 N3 Q3 s
rgManager.tryToStartTransOrder; M6 n+ n4 I( {' f
if @.Destination = void
4 C2 C% I) t7 f3 \0 L% Q) O$ w3 u then -- no transport order for vehicle @
4 g$ @, K) ?1 w! l+ w @.Destination := {$ d" R. D& s* u# j3 p, ]
rgManager.nearestFreeStation(@,track.~);
3 j x+ m V% Y- ~. A" D4 L newDirection(@); 6 U8 x u J2 u. U5 o4 h4 e r8 h
if @.Destination /= void then, a! [1 q3 B# x0 h% _: ?; q/ R. t
@.Destination.NumReservation :=) R; M& a- m8 w7 k/ X/ F
@.Destination.NumReservation + 1;
0 x& `9 ^2 U$ M8 |+ ]% O end;
! D8 b0 T) v% N6 a7 h/ l$ o @.CurrIcon := "drivingHome";; f4 N2 a8 Y x, d5 f5 O7 k
@.DrivingHome := true;
/ a8 l+ P# x+ b3 | end;. T+ t l" h# ^. M# @/ W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! n: ^' Z+ P0 H! N( R: K& P9 { part := @.transpOrder;2 B+ L/ A7 J, C0 I7 z# w( u2 y
part.move(@);-- load part6 |' g) ?9 u. G+ B/ k. N
@.CurrIcon := "load";. D& K) ~+ A9 J6 u: ]
GlobalDistObj := part.globDestination;
4 r8 q0 q ~; e6 j+ e9 o assignLObj := rgmanager.rgAssignL;
, r9 b O v% d6 ?5 j row := assignLObj.getRowNo(GlobalDistObj);
$ b: W! L. s. t* \ if Row = -1 then -- since 70/ U0 v N& W; l# N/ L% `
if lan=1 then
3 b: _' F- Q& b2 [* X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; G' U: x3 @8 p9 ` to_str("in der Andockstation: \"",?.~.name,"\""));
- [1 |0 P3 j' p# w) B, L& C else
% P" x5 ?1 k5 O: u: H' D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; q2 i+ K, J2 ~* |/ o2 X$ Q
to_str("in docking station: \"",?.~.name,"\""));
8 W: k: B* q( ?1 E9 ?$ H end;
: R; J) g" y- B! {7 ~% n N else
9 V' ]3 U7 O, w- P( x @.Destination := assignLObj[1,row];
( |) z. D+ ] X2 l5 c$ A end;
4 ^+ H0 S, y' ^0 I2 y# Q1 I0 o newDirection(@);
' b( W- {" W2 ^% h2 j. E @.HasOrder := true; ^& C+ b3 R$ o, b* D/ W9 \7 j
end;
* a- Y1 M) f1 }) u end;
2 t$ s' G8 ? Z$ {) p# Rend; -- of the method
% t- ?5 ]) n- t2 d |