/* called by: entrance ctrl of the object 'track'" P0 i! D5 S0 m+ k! Q! ?
*/" q' W: R8 N) O8 o) L
is
5 A9 O- D: A, R6 w+ l$ x. M0 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;& L; s) F/ G8 Z; f# y6 G3 k1 C
do
# w& w2 l) S+ J: p Lan := rootfolder.Internal.Tools.AOLlanguage;) r% H0 M4 |5 H) M: C
if current = @.Destination -- else return
) a6 B$ h: Z' ?) S4 M3 ? then
2 o/ S) e5 P$ V! M4 I) f @.Destination := void;
* ^9 I: l7 S2 l0 t" O if @.occupied then
$ [( r' N B( N) p- l2 a3 x* Z part := @.cont;
6 P; y/ s4 |+ T" y% i @.transpOrder := void;
- l( I. ^$ O! O2 y8 C. a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, n: ^8 ~' B0 Q @,root.eventcontroller.simTime);
$ \& w! S: b7 s @.HasOrder := false;8 I# P: N# i. W' X- u4 ]7 A
@.DrivingHome := true;& h" z3 J" i, R) j% g
rgManager.tryToStartTransOrder;
) ~# d, c# A8 t& l1 J2 f" f) U if @.Destination = void* X& Q2 R0 N' Z0 h
then -- no transport order for vehicle @4 g! F- n$ N9 S& \6 n" |; N/ a
@.Destination :=) |! e" f* o4 `% C
rgManager.nearestFreeStation(@,track.~);! W# M P( J k" n- d
newDirection(@);
5 `7 G; ?& z2 C& B% ^ if @.Destination /= void then
0 P/ ~9 r0 j! A3 q" X/ s @.Destination.NumReservation :=, t% m4 n) V7 }* {
@.Destination.NumReservation + 1;3 \! f) @$ y' l$ {
end;
5 q M* [; K y6 X, E @.CurrIcon := "drivingHome";
R/ Z. [0 c+ e! @' w. I+ J @.DrivingHome := true;
. Z# b* z8 V) U( m- z9 l end;
6 r0 V4 |6 W ~' T3 l7 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station: O. N: c* j0 }
part := @.transpOrder;
+ I1 M3 }; R; s3 p, N2 } part.move(@);-- load part
- y' w( @' L/ p# L, f! n) G' a @.CurrIcon := "load";! d( W# h! T8 t
GlobalDistObj := part.globDestination;8 M, t- w% o; G, A* c
assignLObj := rgmanager.rgAssignL;
7 ]0 M/ V4 d' b J& h& b5 s8 D row := assignLObj.getRowNo(GlobalDistObj);
' z- q/ U$ e4 z if Row = -1 then -- since 702 B- N. A# i C" @4 I
if lan=1 then
; H0 c; T! q3 }* V0 ~: v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 {$ d. W0 a& a. y
to_str("in der Andockstation: \"",?.~.name,"\""));4 v, K/ O' B$ y; c0 h: u9 u$ U
else2 M" p A/ G6 I/ {5 G( R/ q6 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; Q7 ` v+ N. v( A# |
to_str("in docking station: \"",?.~.name,"\"")); 0 h. @) u O' S+ W( r& G) g5 l. X
end;
2 X) ]& m- ?- b: M* w else) m% v# t2 h. U) K1 w
@.Destination := assignLObj[1,row];2 c2 V* b. F# ?. L
end;
7 n" |9 b- t* F newDirection(@);/ |; f" K6 r' ~1 d. d: t
@.HasOrder := true;
( a( @$ W* v. _: I: i; V+ K- G$ ?5 { end;
7 ~, j' r3 x( c" E! K$ v; E end;+ J0 U, I9 H, |
end; -- of the method
# K* T3 c6 y" O- |' a. b( h |