/* called by: entrance ctrl of the object 'track'
1 c' i9 ^0 |( i; u+ k- W*/9 d T3 }% W: h0 d( D3 ~" X
is6 }' h" {3 e% b0 a$ K5 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) {+ Q9 }0 W+ x% u0 {do" f, @) u/ r! {: ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 ~/ ~3 C/ P% `: _( h if current = @.Destination -- else return
# r1 ?8 A" v9 D/ } then/ i" `0 F3 p7 v# }, g. W& [8 x
@.Destination := void;
6 l) i8 j; Y* V* N if @.occupied then
7 c# M" R6 _/ Q& O part := @.cont;
; S9 V" Q* g4 o8 A1 b+ b @.transpOrder := void;7 @4 ?/ j/ W* I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 W8 q5 |; w; R4 {9 |% C @,root.eventcontroller.simTime);
7 _. ?$ Y+ W& M# I' o @.HasOrder := false;
& D; L6 p# W) { @.DrivingHome := true;$ h8 a0 _3 Y1 h5 s
rgManager.tryToStartTransOrder;- \ S7 ~; L9 O7 S7 R2 x
if @.Destination = void( E) V8 y$ M7 q y) K3 }$ R
then -- no transport order for vehicle @
4 l$ x9 r5 p/ s+ a5 f+ e @.Destination :=
@3 @+ |: p9 D6 }7 F rgManager.nearestFreeStation(@,track.~); |7 h9 C) R) ^
newDirection(@);
4 e E' |5 p$ \ if @.Destination /= void then; x3 w9 i- Z) H* J3 A+ f, M+ a
@.Destination.NumReservation :=
* C8 [/ U0 k( p. u z @.Destination.NumReservation + 1; A7 Q) ^" ~+ Y3 q
end;1 H/ n6 w" v$ {0 V g0 J
@.CurrIcon := "drivingHome";- C: \/ c& O3 {, U2 t- O
@.DrivingHome := true;
+ {1 V7 q% H& k7 y( S0 y end;3 p; A1 {' q. d: L# Q3 q8 R9 m5 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ R# z& b& C4 _5 [
part := @.transpOrder;
& { G4 G0 ?2 a v5 k part.move(@);-- load part
. \" Q0 c% v( }# @+ ` @.CurrIcon := "load";
$ x1 i4 Y3 Z9 u! _& D8 @' g1 L GlobalDistObj := part.globDestination; C6 c5 x# N1 R% Y0 `) S
assignLObj := rgmanager.rgAssignL;$ L) ]$ Q/ K8 I. u1 i3 ~
row := assignLObj.getRowNo(GlobalDistObj);9 J' A8 \5 W; U P p4 z9 r6 F6 S
if Row = -1 then -- since 709 ]! C+ ]( W1 I" M1 f$ V Z& Y D7 A
if lan=1 then$ m+ L) g6 }7 ~: {! ~0 ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& t/ Q* v% r5 R1 k/ w to_str("in der Andockstation: \"",?.~.name,"\""));
5 K' @! S& b, Y X else J% q- A+ y) X( l+ u- P0 b6 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& V) f/ D- o% A, I# _+ B to_str("in docking station: \"",?.~.name,"\"")); # d# v2 l$ Y. G% `
end;
/ U3 ~" v+ k4 {" `" y5 H0 U else" P' e3 B& C' g0 A3 E& R5 Y
@.Destination := assignLObj[1,row];8 M+ v' D5 b6 z% Z7 `0 o
end; 5 _: F: m& ]! w% @5 \( H; Z$ u) [5 S
newDirection(@);
( p3 H: m- ]% S4 T @.HasOrder := true;
* p6 t# ^8 i/ a- q6 \$ E" G. u5 z3 z" n end;; G, \. o( [( k
end;8 q8 ~8 Q) ~1 t" v8 T% H t
end; -- of the method& l: r) Z" [9 Y( ^
|