/* called by: entrance ctrl of the object 'track'
* ?: y8 W. ?$ L z( e* w* V% J }*/
- {. N/ ]2 t& f- Tis
! ?# P, P/ k o2 B, [8 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;. Z7 x& n6 U; W+ E
do
6 A. j o& \, Z$ R9 U' Y; }2 N- F Lan := rootfolder.Internal.Tools.AOLlanguage;
1 Q4 n" x7 j5 _+ Q0 t if current = @.Destination -- else return% t- t5 ^, n2 q* q6 I9 O& M
then
# G$ U6 _2 K& B* S- ? @.Destination := void;+ X) _0 F$ P) q3 t. R" t% @0 t
if @.occupied then: T+ ]; @3 d1 e6 v2 `
part := @.cont;
/ y1 X+ K# F1 @1 d/ C' L @.transpOrder := void;
% o4 o% F# h1 N/ `0 P8 i4 z, @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, j( X. s7 v$ e+ J
@,root.eventcontroller.simTime);
. Z0 K( M0 o: U+ y3 ]+ j$ _8 a @.HasOrder := false;7 O! L, e6 ?( z& c6 c7 ^
@.DrivingHome := true;, \7 b' }5 H K; S# P" T$ T8 L8 J
rgManager.tryToStartTransOrder;9 {) k, W R1 \$ o2 g
if @.Destination = void4 p: L3 M! h2 P% A- m
then -- no transport order for vehicle @
( m$ L, N. n% z: q' M @.Destination :=
% A2 l) \, b: S' j% q rgManager.nearestFreeStation(@,track.~);, z$ ~7 @7 R$ V) P0 ^9 N# ?5 c
newDirection(@); 7 R" U" k: e2 q3 X+ P" R$ z5 Y% d: H
if @.Destination /= void then
' o% E: g; K2 J, y/ e: J& [" V6 u @.Destination.NumReservation :=
( e; }& J4 ]! \" j: X" S @.Destination.NumReservation + 1;
& M9 N1 _# |- h8 }! j end;( Q/ S: [6 f/ N6 `7 s3 a6 x: ~$ ?
@.CurrIcon := "drivingHome";
, p: N$ E. i" E @.DrivingHome := true;
$ j. H2 K6 h* D q8 f% b4 N end;
, s- g+ B% d9 R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 b8 b/ |+ |5 g4 q4 V part := @.transpOrder;
) ]$ t4 C$ _9 q- Q part.move(@);-- load part
% J6 i6 \% V3 n( q4 N$ _ @.CurrIcon := "load";$ U, |, e3 G J4 B; l: L
GlobalDistObj := part.globDestination;/ U4 T: b2 D" _) n9 R( X
assignLObj := rgmanager.rgAssignL;
# `* c* b) X5 M0 P$ I row := assignLObj.getRowNo(GlobalDistObj);/ N- M4 d, w* b0 V! j
if Row = -1 then -- since 70
" M+ K, a2 \# y: x( h# N' r* A! _ if lan=1 then- ~# k! G; ~2 B) `" O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
B2 y. {" A; O& T+ W: P" K& k+ q to_str("in der Andockstation: \"",?.~.name,"\""));: Z* X; A, ]- P* q2 K/ q/ J2 @
else) b- ^. F& `0 Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 T! v4 \5 g: c* P) z
to_str("in docking station: \"",?.~.name,"\"")); * X! [' k7 ]; N
end;; Y2 B) k4 t" c8 H0 n8 r5 z4 L8 Q$ |
else. ^. H0 h& c/ W5 w( q
@.Destination := assignLObj[1,row];
/ L! t, k f9 P0 |: N end; ; }/ f! ~* E; }2 {% C! y+ s) {
newDirection(@);: z: W: ~# s/ P+ U+ t/ q' D
@.HasOrder := true;
3 l3 o2 Z3 H1 @0 C, v end;% l& v/ M( l; R0 H3 T- H! ]" E( r
end;1 u0 n0 d6 s6 y
end; -- of the method5 W% v1 Q' @) R% m1 _
|