/* called by: entrance ctrl of the object 'track': r5 I! S* {+ B4 i
*/1 j" \; n; ]/ A
is. d3 f, b! m* `7 m) h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 p3 D- `8 c" Q5 x7 t# u8 Z/ c% S8 Y
do
$ T+ a6 t/ p C( G& t Lan := rootfolder.Internal.Tools.AOLlanguage;$ i x0 d [$ v: d
if current = @.Destination -- else return
: p4 T1 `4 z, q9 @; L then
7 c9 {- t2 u( `9 r5 E" y2 |% q @.Destination := void;
. T& S0 |" D3 W4 w7 q$ w# S if @.occupied then
5 N0 E$ K/ P3 b part := @.cont;
. Q2 ^! e+ S X, o$ r. `* m @.transpOrder := void;) d0 Z- S6 X' j8 ^4 @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 X/ I- `! m. L% v @,root.eventcontroller.simTime);+ d& B5 \. z* e
@.HasOrder := false;4 T) R! G7 s3 H% L, `: g- [
@.DrivingHome := true;+ J/ r5 O& b- P/ t0 k
rgManager.tryToStartTransOrder;& v3 M$ T+ c9 s& F, v( x4 y3 B2 ]* Z
if @.Destination = void
4 G: _3 I7 y% e8 b0 D then -- no transport order for vehicle @* S0 m3 Q( X; s3 e8 t$ D
@.Destination :=
8 n9 A: l+ C7 d+ k N rgManager.nearestFreeStation(@,track.~);4 ^, T: {. \3 f& ^6 D7 G; N6 m
newDirection(@);
7 v' L( t7 d% D- t- X# b% z if @.Destination /= void then
+ ~( C2 k% L5 Q$ { @.Destination.NumReservation :=
) B1 P+ E3 T4 h- H @.Destination.NumReservation + 1;
) U$ l& R! e4 h- Z4 j+ Q end;' j- m' n% N# K' l |4 e, e: f
@.CurrIcon := "drivingHome";
: i8 L: a8 r e1 Z/ u, l5 l @.DrivingHome := true;
5 w; K- J, L" K! O end;
" {$ O6 A/ W% G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 b3 j/ K+ ?# ~) V( V, O$ o part := @.transpOrder;
. a; o$ W, m3 ^; z' N" t part.move(@);-- load part
) ]5 W% h! E3 z/ ?1 G; O @.CurrIcon := "load";. ]0 i7 D: r) ]1 e/ U
GlobalDistObj := part.globDestination;, G, k4 B/ \" U+ v, w2 K
assignLObj := rgmanager.rgAssignL;
8 p0 I/ f4 w! c0 s# s row := assignLObj.getRowNo(GlobalDistObj);0 ^( C1 \- Z& R. v. x
if Row = -1 then -- since 709 M1 ~/ d; [ U0 I& C4 n
if lan=1 then( ?1 J* c# V; g8 e6 e6 J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# `+ i" d7 N5 R! y
to_str("in der Andockstation: \"",?.~.name,"\""));
- F" O* P7 D9 p# U) W9 s" K else
, n; L+ O: A3 G, j% @! T! N! z% A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
K5 { I9 s7 u1 A" a. A/ n to_str("in docking station: \"",?.~.name,"\"")); ! G6 E' U& r. u8 e8 d
end;
" Y9 R) J8 K! `5 W' K/ f else
9 T2 b5 m* I o$ [" U* O @.Destination := assignLObj[1,row];. i. ?* w3 V R- V- x& V
end; 5 \* F1 |* h* X
newDirection(@);
: t+ ?+ S: t- x: ~+ e @.HasOrder := true;0 `" y# H* [2 \, J
end;' {& w* X) f% s* O# P$ x" b- v
end;
$ Q' M% C. a, ` tend; -- of the method
/ @% @0 @4 |6 H H1 ]8 K: n |