/* called by: entrance ctrl of the object 'track'
8 ?1 a3 R4 {- g) w0 V' @2 L*/
& ^7 f+ R% R4 h/ ris0 ?- ~) D+ S6 o: Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; s5 `, H2 u2 T/ s" Sdo
, P: x# m3 u: t* z: v' @/ I Lan := rootfolder.Internal.Tools.AOLlanguage;
$ F6 j* n0 n8 U: A. } if current = @.Destination -- else return
# {& `$ F, H$ m$ P- U6 J& t* H# K# W then
/ m+ [+ i- I! G, ] @.Destination := void;* q% b1 ]0 t. A: i. A
if @.occupied then7 @1 G( Q1 _8 {
part := @.cont;
7 _6 E7 p) ]# G( t @.transpOrder := void;
/ B# u0 e: q7 G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: W$ E- T- V! f# J @,root.eventcontroller.simTime);3 w0 `7 f- R0 v' j4 B; X
@.HasOrder := false;
7 U9 D5 R- p1 @/ \: W1 V! Y @.DrivingHome := true;
G& K9 s) q- t rgManager.tryToStartTransOrder;
! N) E' w: `) a if @.Destination = void0 p v. ]2 u1 l# v; f
then -- no transport order for vehicle @* x3 u# M) L6 i1 ]9 Y: `
@.Destination :=
" n* G' q3 V4 \4 d# v9 Q. z rgManager.nearestFreeStation(@,track.~);
' e" q. E* ?/ Q' T newDirection(@); ! T5 i5 Z. N3 d. h% E" r' X9 ?
if @.Destination /= void then' o7 N, ?$ g% N$ A E' b
@.Destination.NumReservation :=' J' F. R4 E) H4 S$ Z" |
@.Destination.NumReservation + 1;
* }4 g+ _ n1 R end;
% F0 L1 g8 O+ A, A1 t9 q: P) F @.CurrIcon := "drivingHome";+ G" `( D0 q* t& A$ b
@.DrivingHome := true;
/ L& L# P3 K6 |& G end;
1 N: c8 g! _" N- C7 V: }6 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: A! r. F5 E" C1 y& b! T. Y& t9 h part := @.transpOrder;
) z7 I: g7 C# s3 l* w% j4 V6 r( j part.move(@);-- load part7 L; e6 O3 A! c) ^4 o( D
@.CurrIcon := "load";5 f9 q5 e8 u* n; ^& N# S9 \; t
GlobalDistObj := part.globDestination;
' }( ? U0 n6 x0 a assignLObj := rgmanager.rgAssignL;
% @5 f1 u6 o. @! \: H row := assignLObj.getRowNo(GlobalDistObj);
& ?" m2 B. C$ I+ z; c if Row = -1 then -- since 707 S7 U! L% E1 _% R" o
if lan=1 then
! Y, X- L8 v7 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' n; [9 O t3 B$ c" ~. t1 f to_str("in der Andockstation: \"",?.~.name,"\""));
6 e3 ?" Z8 i6 A) W' Q6 d, N else
, @6 A/ G. a* J! Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) h# |: e( L2 X" M+ w. V
to_str("in docking station: \"",?.~.name,"\"")); % s) ~& @ P) B1 e$ O9 X6 N. i
end;3 }+ z' k4 Y8 w7 o9 w: {4 l8 U0 p
else
9 x$ f$ Q1 {1 Q1 A- j% } @.Destination := assignLObj[1,row];
8 V# A# H% C/ k( q. w( J2 N [* l) u end; : A. y3 K2 L# N' L; L
newDirection(@);
v4 P" T2 u, a* W/ d W7 K @.HasOrder := true;+ ?& g# a2 Z) o Q8 T
end;
8 @9 I, E/ S# A, E( G( k0 G! P2 T end;+ k2 _) x U% X
end; -- of the method: X8 G5 Y1 A' r, e
|