/* called by: entrance ctrl of the object 'track'
: l5 L. y2 H. |7 Q1 D- E*/0 ]1 N- p. _! B. y) A+ H" T
is, t8 S) i7 I. O# A* _; P+ }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 N# N* h: l& q1 ~$ I: k% n+ ^ N
do0 m6 B/ i6 p0 C) c J: I
Lan := rootfolder.Internal.Tools.AOLlanguage; P+ M% X& c J; c" a( B9 v( T% y
if current = @.Destination -- else return4 O7 `- {8 e. X
then
" o) ]7 g( O2 X/ H8 q @.Destination := void;9 t% Q4 v- U6 ^- i5 ]
if @.occupied then
3 N& o# k7 b) |9 k3 N- ` part := @.cont;) Y! o6 T* h1 a. {
@.transpOrder := void;
2 U& P8 n! q+ D5 C! T+ E8 [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ p" L& R0 b' J& u7 L @,root.eventcontroller.simTime);
8 a$ O, w; e8 M& L( z$ E4 O @.HasOrder := false;8 K2 q! Y' H/ z M
@.DrivingHome := true;
- p/ b- G/ i; W7 v: V( f rgManager.tryToStartTransOrder;
( {& c& s; U- D! L D ^+ _) a if @.Destination = void7 R+ C" v. w7 Q7 @+ h( O& K
then -- no transport order for vehicle @
9 {* O5 G e! l @.Destination :=
$ r0 D3 ]2 G" b! ^. r rgManager.nearestFreeStation(@,track.~);
, Z. _! a% ^7 f) i! ?. |( t0 F newDirection(@); ) O% _, z3 v6 o. B9 `3 U" X3 P4 S
if @.Destination /= void then0 |# c1 M1 P9 \) _
@.Destination.NumReservation :=
. ?5 Y* G+ g# t4 u% K$ H3 G @.Destination.NumReservation + 1;
7 h; }8 z9 @) r( t) H' E n end;
- v6 i3 b7 d" ] @.CurrIcon := "drivingHome";& s2 _" R7 g) d! F1 J) u
@.DrivingHome := true;6 L7 `) L* {$ e$ R. E0 H
end;
' X/ ]2 o8 p0 H" S( {% M# P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# d3 Q; B- t" V6 Q part := @.transpOrder;! W/ J6 E& p; r" c" ~
part.move(@);-- load part7 y* H6 `' ?: l- N
@.CurrIcon := "load";4 X" u) }$ d, \$ H6 v
GlobalDistObj := part.globDestination;$ ]2 E2 @) _) B* t5 ]
assignLObj := rgmanager.rgAssignL;
}- O- M: M6 e5 { row := assignLObj.getRowNo(GlobalDistObj);
9 D; z6 G5 |, [, j if Row = -1 then -- since 70
) P( K+ Y/ y1 I8 A- e( f- K if lan=1 then$ v3 q, q4 E: E" |0 C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; F+ h* f! z" y
to_str("in der Andockstation: \"",?.~.name,"\""));
- a# g3 m* P a& v7 I3 |; a else
! S. x$ J' Q% I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( R+ I$ U* z. C$ s3 P: V7 u& x to_str("in docking station: \"",?.~.name,"\""));
9 ]2 a7 j. K! a3 o* [ end;+ F% I! p0 \7 T( J
else7 R7 B. y3 o5 \3 c
@.Destination := assignLObj[1,row];
j$ n. a; v6 t. x* a end;
N" _ Q. ]# e# ] newDirection(@);
. t8 ^- j) z; w9 c7 t. i* C# C @.HasOrder := true;( z. m7 p+ N3 t+ s
end;
/ ^3 l- m2 S/ s& t1 Y, z7 L end;
& o0 C& ? r: U' |* T: S( wend; -- of the method
) _9 `9 w% p, }- \- K8 c" K |