/* called by: entrance ctrl of the object 'track'9 c) B% A6 y$ Y1 j" j% r% e5 F
*/' d2 q7 X) l1 H7 z4 h; w! O. Q
is7 v) o$ F, ~$ Q3 k7 @' i
part, GlobalDistObj, assignLObj:object;row,Lan:integer; C# n# L" s8 B$ Z
do: H& q J* L1 C2 ~. @" D
Lan := rootfolder.Internal.Tools.AOLlanguage;5 @" w$ D/ p% i
if current = @.Destination -- else return
% G: U& l G+ n then
; @: ^% v# W2 p9 q @.Destination := void;% [/ Q. R3 ^& j) r
if @.occupied then
' Q7 |5 M# S K2 U) z6 P part := @.cont;5 B, t; A, O; w) B' r9 A/ ~
@.transpOrder := void;) s" |* w1 G# V& ?# P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- e x1 V5 ], P( A# _ @,root.eventcontroller.simTime);
/ |5 N6 x" O& Q8 @+ ]+ E: d @.HasOrder := false;" g5 H# D/ `1 I: F) q* _3 h
@.DrivingHome := true;
& x! |8 e4 c. R, @1 U rgManager.tryToStartTransOrder;
. ^1 x9 D! A/ n" c- j' N6 c9 W% U if @.Destination = void' o; A% h6 d% c
then -- no transport order for vehicle @
# V5 i {3 W% z0 w, a7 q. {( E @.Destination :=
4 f; g9 c/ A# V! d6 P rgManager.nearestFreeStation(@,track.~); v/ U8 E, t7 l
newDirection(@); + f3 E8 k6 w$ d3 H$ l9 P8 M5 i
if @.Destination /= void then
+ @9 L |! M5 [" ]% V. \6 I/ [2 [& T, B @.Destination.NumReservation :=/ s7 m" y, g" |2 e7 r$ V$ n
@.Destination.NumReservation + 1;! @' _/ e" y, e/ J }3 Y
end;
( p; H B9 P* P$ r& U @.CurrIcon := "drivingHome";7 ]$ d! S; Q% \6 T
@.DrivingHome := true;
4 z8 L: Z9 ?5 s; z4 ~ end;
- B, L8 N; u8 M. L% f9 t3 ?* S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' ?: z; r# D" u2 s `, R part := @.transpOrder;* ~! ]/ t: N) u7 ~
part.move(@);-- load part) J4 \9 u5 T+ a+ F) `
@.CurrIcon := "load";
5 U: a. p4 ? p( M GlobalDistObj := part.globDestination;
# k! o" _5 P7 v5 ~8 R+ W8 x" @8 b assignLObj := rgmanager.rgAssignL;
4 `) z1 E- V# \; {( J% R row := assignLObj.getRowNo(GlobalDistObj);1 o% ]$ e" {& D: D" W
if Row = -1 then -- since 706 e% S8 e: _* `2 V8 a
if lan=1 then9 ^* J K5 h! M$ {1 m: T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 \% Q5 Y$ j0 l' @& ^ to_str("in der Andockstation: \"",?.~.name,"\""));* w1 o, L( k) y" \, S. T6 Q& a; }, S& j
else q# r p& ~/ [" a* l/ s S- G1 o0 G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 z" I1 P" r6 |" E/ r
to_str("in docking station: \"",?.~.name,"\"")); ( n( D4 G W! m1 p2 {1 z$ o) K
end;
% m3 e8 G T0 v. c/ B, h else
6 T- L* v4 Z0 N( ^3 t: @/ x, o V @.Destination := assignLObj[1,row];- A9 P8 f! W5 S) n8 p4 v" y
end; % }! S% L' Y/ x( ?
newDirection(@);: b) `4 ^8 C3 a) ?' T( ?4 x0 ^0 j& [
@.HasOrder := true;+ y& |6 z+ ~% x* p/ Y
end;' ~+ Y3 w5 E% p
end;! ]8 Z$ _7 G# }
end; -- of the method& M) c) n( @, }% N+ ~/ i: R
|