/* called by: entrance ctrl of the object 'track'
3 D, [2 c$ |' q* G*/
5 R, m; G/ B2 m g* y2 P' c' Ris4 k- o( A% f+ _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ ?0 ^* h* U$ |. \: f. V+ k# W7 C
do
" m/ i* g, F, b& @& \: Q8 l# u/ ? Lan := rootfolder.Internal.Tools.AOLlanguage;
) Z1 i# l1 ~# M/ p if current = @.Destination -- else return; W( ]+ ?$ i* V) E- u+ a8 t7 W. g$ d
then
' k% D! I# L6 O" }* W! D; d @.Destination := void;& Q4 l' t! e( C" I! F
if @.occupied then
0 W- ], E$ J+ s t# [! u part := @.cont;
1 d1 ?& E N8 X @.transpOrder := void;
# o- j* d7 V: Z$ {$ U5 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 H( L# H0 u( m8 r3 z, a, ^" g1 }5 h @,root.eventcontroller.simTime);
* I* C. ^+ j% M! ] @.HasOrder := false;
$ q8 E0 M) X3 A3 }7 ^# M* b @.DrivingHome := true;
k: _ B+ S: R; U rgManager.tryToStartTransOrder;% E1 e$ Q, M. \9 a( l
if @.Destination = void
. S7 z; @% x2 t! p; X then -- no transport order for vehicle @
; I& b: B- G; Y6 w& K @.Destination :=' B% a0 Q; F* [' S
rgManager.nearestFreeStation(@,track.~);6 z8 a* y- a0 N& P [! _6 l
newDirection(@); ' e0 U1 d$ v4 w7 B
if @.Destination /= void then, a6 a4 b2 _! R8 I
@.Destination.NumReservation :=: C! e1 q6 \* W. L/ e6 G
@.Destination.NumReservation + 1;# H. Y# w& {, J/ u0 |) W
end;, G- M$ S, x5 L5 `7 L8 y% }
@.CurrIcon := "drivingHome";$ ~" j+ {* H: D1 ^/ ]
@.DrivingHome := true;" a: T) ~+ w& m9 _( |8 ?' G T
end;
9 r9 G5 g5 L: o% m1 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station; Y$ E0 ^; }( x9 T6 Q% E5 a
part := @.transpOrder;4 H# M% L3 P$ v/ r Y j. ~
part.move(@);-- load part
) I$ ?! |2 W' o' e% t7 q- p2 u/ z @.CurrIcon := "load";
5 a( q6 A, f% {3 \3 V9 z/ Y' ] GlobalDistObj := part.globDestination;
" `* l6 H0 [* Y1 A6 _ assignLObj := rgmanager.rgAssignL;# @" \! k# T$ K( Y: ~$ `& s) q& O, {
row := assignLObj.getRowNo(GlobalDistObj);8 \, Q' ^% o- p$ x
if Row = -1 then -- since 70
4 a% N1 W3 G8 y: Q( k if lan=1 then
0 y( R; X0 i: X/ f/ ?( j9 @# | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 G6 x3 K' @4 r% {" |3 q6 \3 M
to_str("in der Andockstation: \"",?.~.name,"\""));: Q k( B# u) l, E7 h
else
6 Y) b! B P2 ^' h, \9 n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 @2 g# x( H$ \$ K+ c: J* h. F to_str("in docking station: \"",?.~.name,"\"")); ' P! `" I% U' z$ I' @ M
end;
1 @' n6 d/ R4 v8 P2 ^! Z1 I' I else
* ^( G* g" S; @8 ~6 o! l- s @.Destination := assignLObj[1,row];5 h" A' u; O" G X/ |) o
end;
! D* ~3 g* Y0 k" J$ c( h4 d I% E! x% B newDirection(@);. i: {3 ^' P9 Q
@.HasOrder := true;
+ h* T6 J: [9 M- |1 {& [ end;
0 w2 |0 _. t" o: M end;
4 z, u5 P% `8 X h0 U; @end; -- of the method
3 z+ Z6 J W% O: a/ J# I1 b |