/* called by: entrance ctrl of the object 'track'. [0 n5 E \2 W5 I% t
*/
4 \' x5 x d3 z7 x1 D# Xis) g8 ~4 K" n; j5 R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& q8 K# ?: {+ }7 | \7 m2 Fdo& [2 _( u+ W# r* A0 M
Lan := rootfolder.Internal.Tools.AOLlanguage;
% t* ?* h* M0 Z8 E3 _* i if current = @.Destination -- else return* j% [8 k6 Y3 Q1 W5 _ i! o
then T- b" `2 {- Q, E' z5 P' e+ I
@.Destination := void;! @# o4 z/ Q/ b0 {- b/ s
if @.occupied then
, m8 a- K- A. _$ {% p& K0 S* H part := @.cont;! E% t! Z* L0 V" }3 ?9 U
@.transpOrder := void;4 V9 a% ~8 s2 R, @* D3 B1 v" ~/ P `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 X/ P J2 z' y @,root.eventcontroller.simTime);
9 u7 S% r3 Z! N* O @.HasOrder := false;2 L( Y) h/ q+ @
@.DrivingHome := true;8 K D& ]! l3 X
rgManager.tryToStartTransOrder;
e7 ?: J1 p& Z0 Z0 q& [ if @.Destination = void
Y1 L6 W+ t: ?1 K" l6 h3 n then -- no transport order for vehicle @! G) A1 U6 W, w* ~" g
@.Destination :=9 V+ B& A4 c4 j f; i
rgManager.nearestFreeStation(@,track.~);
0 j- C4 O8 s! W4 C) D newDirection(@); ' i( `$ N7 X+ @" @" O, r3 U
if @.Destination /= void then! o% X$ K; E0 _$ m
@.Destination.NumReservation :=
( c# {7 n$ n! r/ V; n7 @ @.Destination.NumReservation + 1;
) H0 j/ a) M' p3 c9 r8 Q0 W) v' _5 a end;. o6 Q w; F; m) }% f' x
@.CurrIcon := "drivingHome";
7 X" L" {3 o5 b8 m9 k. m2 H @.DrivingHome := true;
$ M5 a/ S/ X# D) \7 H! A! _9 t5 Y0 _/ R end;# L) K- }+ l* ]8 z X/ Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 } F) m! r6 r
part := @.transpOrder;
6 w- _& c* h. d part.move(@);-- load part/ y! m' o" ]; [" R) l: e8 ?
@.CurrIcon := "load";
. F7 z, _! r( y4 k( `7 b GlobalDistObj := part.globDestination;
8 @# [8 }8 N2 z, ]5 X/ t5 p! V assignLObj := rgmanager.rgAssignL;9 M8 z$ c* k/ R/ Z7 R5 W/ s
row := assignLObj.getRowNo(GlobalDistObj);* j$ J6 F5 c9 `9 g! Q Q& z# t z7 s
if Row = -1 then -- since 70$ g/ V O2 h% X1 [& p- m
if lan=1 then7 o5 g v6 H8 m4 w7 F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 i% B) U1 y$ t% n3 @# q$ I* L: ~2 g
to_str("in der Andockstation: \"",?.~.name,"\""));
! K7 [% N* v0 u! G" ?/ g else
7 g/ h" i( Y( d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 f" v8 L# l6 R D5 f to_str("in docking station: \"",?.~.name,"\"")); ?1 l- h c1 T4 C
end;' `$ n" c$ f2 f- Z
else
* v; n3 [8 c+ P @, c @.Destination := assignLObj[1,row];8 \: K6 b6 w- b3 ~+ l3 |$ a
end;
8 m1 a; V- ~* w, H: i newDirection(@);$ x% z2 {% R4 I( ?) ]* B4 N2 ~
@.HasOrder := true;
9 ^" c0 z' n0 _- s end;
# H; [" ?7 J( F0 {* F4 @3 Y4 z& h1 { end;
( i6 m8 }0 {1 k% K) t# ]end; -- of the method8 K6 Y5 P7 }9 f6 Y: X
|