/* called by: entrance ctrl of the object 'track'
6 |- o1 M9 V% N+ g; E% x2 G*/, g2 q& ]. J5 S
is- a1 ~+ h7 Z6 Q+ H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 f- C$ q, Q0 Wdo' [! D, _% w6 ~8 x; [, J9 X# }: d! ^
Lan := rootfolder.Internal.Tools.AOLlanguage;" H% c2 r8 K0 n8 h+ }2 P P6 F8 b
if current = @.Destination -- else return0 F& E/ ~2 e: _0 p" S$ g
then# G3 T7 b7 A. k! d- @
@.Destination := void;( y) M6 e7 ~7 ~1 Z) q! ]
if @.occupied then
/ v1 I: m) Z! B# I part := @.cont; o: c# f L# }
@.transpOrder := void;
. `, d, T, ?7 W! Y/ X7 Q( J2 o) o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 h' o; c A3 X @,root.eventcontroller.simTime);
& O/ ^6 L# n# y. Z- Z4 P @.HasOrder := false;3 q9 U$ r: O/ n9 B0 ]8 I
@.DrivingHome := true;! B2 |; ^ h4 O4 H9 { V
rgManager.tryToStartTransOrder;0 N! G& W$ v6 Q
if @.Destination = void
& w8 E- ^& i! k. f. A/ e2 A then -- no transport order for vehicle @
/ C; M) f, m" i% b @.Destination :=4 A; B$ c8 x- [' z" z4 E& H% h
rgManager.nearestFreeStation(@,track.~);/ j+ {4 B% C0 n5 G* `4 u# H- F" U
newDirection(@);
6 ?+ N- {$ G) T* S% Q if @.Destination /= void then4 e j) U% h* {5 y- i) b
@.Destination.NumReservation :=
- H3 y4 J ?" q) k @" r @.Destination.NumReservation + 1;
' S0 X P; t. |$ Z3 H8 j( A/ Q end;6 ~/ o0 p8 d3 G! C4 m' r& p
@.CurrIcon := "drivingHome";1 M% ~+ U6 d# O1 I7 f+ A) U
@.DrivingHome := true;1 R- R, `% @9 B; a* @9 l" f
end;& i5 x/ N1 i) a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% c# x, f$ Y- |# R2 a
part := @.transpOrder;3 m) Q/ h& `) Z( e( W
part.move(@);-- load part) }: p8 N. M% d/ j) b5 f
@.CurrIcon := "load";
: F, T+ J1 p9 V3 ?5 p$ `2 ^ GlobalDistObj := part.globDestination;# {$ D4 E+ N9 F% O5 b
assignLObj := rgmanager.rgAssignL;
6 g5 M) d) Q" {/ Z$ y, O; ?- \/ \" D row := assignLObj.getRowNo(GlobalDistObj);) H1 C& e# s+ u8 E
if Row = -1 then -- since 706 a! f) B( ^; G( p/ \
if lan=1 then
% r* B" U' z4 j- t. x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: s; G2 h& C* m7 w3 I" ?
to_str("in der Andockstation: \"",?.~.name,"\""));
$ c3 Z" S; u& [% H4 o5 E3 @; O else
# K0 a9 ~! s8 S$ E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) h) l2 [/ u: @4 R to_str("in docking station: \"",?.~.name,"\"")); # l% N7 X0 A( N: G) N- F/ _$ e
end;
5 K+ O% s0 o/ P3 f) G% z6 [) P' w else2 X% K3 o f C1 C3 f
@.Destination := assignLObj[1,row];
+ h- Y- Y* p- A& } end; ' H5 U8 e; F# M/ _$ z" c2 R
newDirection(@);
/ J+ Y" I6 \0 v- V% h& g8 C @.HasOrder := true;
, A4 c' B3 ^5 }% _ P8 ]' S end;9 @; E, ?" S1 S2 |3 G8 b# U# H) E
end; c- l/ p) G/ {% x! X" ]
end; -- of the method
3 t I5 {3 f; c& U" J7 ~ |