/* called by: entrance ctrl of the object 'track'' t) e- Y6 _: i+ r
*/. X9 y. ]# {3 f6 u
is( t; e2 w0 B* u/ m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 {& o, D7 l6 j5 Q/ X# I @
do
# L( D+ J. H- |3 G Lan := rootfolder.Internal.Tools.AOLlanguage;
6 P# \( s- |6 Z0 ^3 X if current = @.Destination -- else return1 o! u6 j$ ]5 B0 N0 t
then: r1 g. {5 p: r
@.Destination := void;4 P j& d8 H% F" v
if @.occupied then! C2 E5 D7 ^; f- B( G) D* @
part := @.cont; ]% ~' x8 x# A) |6 e; v( ^6 j9 _
@.transpOrder := void;
% L7 ?# G2 D4 |! _8 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" s z @. W l @,root.eventcontroller.simTime);9 ]+ X$ J5 [6 l& P
@.HasOrder := false;
$ R! t/ Z( @1 D8 H) w7 n: h @.DrivingHome := true;
, H1 b% q: [8 b6 @1 w rgManager.tryToStartTransOrder;
% s) D! z! @: ^) ]) V4 J if @.Destination = void
& F. h; z7 |- J7 R then -- no transport order for vehicle @
9 `7 R* E% C: T9 { @.Destination :=
' ^/ b, t, i& Z2 F" S2 ~. x9 z rgManager.nearestFreeStation(@,track.~);7 t4 s. j; p6 D v0 [1 C
newDirection(@);
2 t* B) |8 Z' u8 x9 \ if @.Destination /= void then6 s: H( g0 k0 ~6 O
@.Destination.NumReservation :=
( N/ m) q: ?4 _/ m/ Y @.Destination.NumReservation + 1;
% p$ G9 K* ?9 l' T9 j+ [( ~ end;% e: @! n2 E: y" T* s
@.CurrIcon := "drivingHome";
6 U" X) q& r! q7 u# I @.DrivingHome := true;
. V4 ?% l# ~$ u4 C7 ^$ U( h end;+ s5 n* C5 X7 l/ x% f$ q+ X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! h, L8 y" P7 R0 t6 V5 `2 X
part := @.transpOrder;
) x& L$ M" j% G; r part.move(@);-- load part
% v4 h9 h8 V8 ` @.CurrIcon := "load";, C$ M0 l6 u5 v1 s7 W
GlobalDistObj := part.globDestination;+ ~# a P# O4 O6 X. j
assignLObj := rgmanager.rgAssignL;% k5 h( g, o' G$ q/ v7 B
row := assignLObj.getRowNo(GlobalDistObj);2 u* H5 D) b0 Q4 A* ^9 i
if Row = -1 then -- since 70! l6 \ l1 x. U
if lan=1 then
1 w+ D7 L4 y( F/ u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- u: Y5 Q6 @2 [- K' `
to_str("in der Andockstation: \"",?.~.name,"\""));
. u! Q& g Q: g3 H$ j4 F' i else6 [0 @3 E8 a. x+ @6 V( g& z4 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- F) w' p- p% L/ u to_str("in docking station: \"",?.~.name,"\""));
6 p7 m3 g4 T0 {) _1 f- P end;
2 G, ]: e4 M9 m' g+ G else# z3 h7 W( b0 Z! C4 W$ } C
@.Destination := assignLObj[1,row];% [: k( Q4 o0 z, U* q2 g0 m3 p% z
end; + Y0 [1 F: K. M' _3 L# p( Q' }) }
newDirection(@);
* D( y: v& w! A. I* f) q1 s) Q$ ` @.HasOrder := true;
9 a% w, Q K1 Z+ g9 E end;
0 F" M% {2 Z5 F1 F end;
$ m7 ~. p! D7 n8 m0 C6 oend; -- of the method
6 U5 t" J8 E! @& y& x) T' @ |