/* called by: entrance ctrl of the object 'track'
: f& A3 _4 H6 L/ d/ y*/4 `1 \6 J3 t( E( M5 @
is
- O) N- p4 _ R% I1 q! C part, GlobalDistObj, assignLObj:object;row,Lan:integer;; v; y/ f& u/ F2 S7 R# m5 S5 @* ^" d% k
do& g; f, G- L5 o0 u$ U5 t6 H" i
Lan := rootfolder.Internal.Tools.AOLlanguage;
: q% A0 \2 B# Y# r$ I2 V! D if current = @.Destination -- else return
. m" Z5 e; R6 K9 H4 } then
3 V0 M1 E0 Y, D! ]9 V. Y2 ? @.Destination := void;, s* F7 R5 M6 c3 [( d2 o, _# _
if @.occupied then/ U6 B8 d1 m2 c @4 f# l1 n
part := @.cont;* H2 |1 h& {+ x* n1 i
@.transpOrder := void;
X; d2 v7 {) F+ n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 n. s* g' c! Y( u9 h) W- H& @3 U @,root.eventcontroller.simTime);: T4 A/ ~ y2 k2 }6 F
@.HasOrder := false;' X# p J3 t$ D8 J! B5 Z9 `7 e2 {
@.DrivingHome := true;
; C/ v" ?: ^4 n$ \9 Y7 x1 W* N6 }- a/ i rgManager.tryToStartTransOrder;
k" ]9 l) _9 m) @5 J if @.Destination = void2 G; E3 V: D$ E {# F2 _9 b" N4 }
then -- no transport order for vehicle @) V9 z/ w S" k( _. S
@.Destination :=. h, e$ e% c5 t0 n* \7 d
rgManager.nearestFreeStation(@,track.~);
+ D0 A$ l4 X6 e newDirection(@);
" M$ G5 K- g% k d+ F if @.Destination /= void then
1 n& \! ?# G) w+ Q+ \% q: N @.Destination.NumReservation :=
' B+ k) P# ?9 h7 O& |$ _/ L) | @.Destination.NumReservation + 1;2 Z% B5 }, B, b/ e5 C; K5 d
end;
; z+ d7 }% B+ r4 ?/ M+ r @.CurrIcon := "drivingHome";
- R, L) R g0 T% [ @.DrivingHome := true;
7 _+ q* P% B, E4 B0 \6 U end;7 J, J" j, r$ `4 c1 B6 A9 a5 [9 R5 g$ ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( r8 h; y2 r r& ~% E
part := @.transpOrder;+ d& F. ?2 x% C
part.move(@);-- load part
$ q. x5 o: B8 Y9 j2 }1 a: ? @.CurrIcon := "load";; A2 \& J! j+ y. H) ~) O2 s
GlobalDistObj := part.globDestination;+ |: W, A0 T/ V; m
assignLObj := rgmanager.rgAssignL;3 r9 M) T) O6 |% D& J, P7 u
row := assignLObj.getRowNo(GlobalDistObj);2 G/ b4 `# f4 {2 B( b/ G% [' P' V b
if Row = -1 then -- since 70
3 g+ c& P3 Y2 c if lan=1 then
8 v" f5 {& g0 S! @2 g, A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& m: k) V2 x" K! \/ a4 C to_str("in der Andockstation: \"",?.~.name,"\""));+ c- c" n( t* u! q3 w8 f
else/ w1 M3 N3 F# X- ?* O* `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 y0 c9 z. X. S2 U) E# R+ c
to_str("in docking station: \"",?.~.name,"\"")); , D0 A! [7 o) D0 l8 x- x0 X- Z
end;
& R( E! E9 D- U, t else
- Q6 U* X" k1 w J @.Destination := assignLObj[1,row];
' z1 i* Y% D1 A end;
2 k q/ c V$ g! s! X% k8 s* l newDirection(@);
# X' w% Y+ x: u: V1 e @.HasOrder := true; \( m, E! U6 k: U- u" O3 h
end;
" n# j" ^4 C, [) O* D9 }% [ end;, @$ @" z, |# q" ^4 z
end; -- of the method; l- @/ q# F! o w, C' x
|