/* called by: entrance ctrl of the object 'track'$ d ?# y* B' G* E! M1 d
*/ v2 i0 _7 Q# |" R
is
2 h/ J4 o6 h$ t part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 y, I* P' b: `! P6 a4 r) q/ R* Z
do+ |6 j: _- K. ^2 _
Lan := rootfolder.Internal.Tools.AOLlanguage;. x- n; x/ ]) Y7 n2 h0 V5 A4 a
if current = @.Destination -- else return
7 v& t, h( p9 H a/ ? then
7 f' G# R a7 H4 e @.Destination := void;
: `4 T% v- z" D2 i8 _$ @ if @.occupied then
9 l$ `5 b: B' X, L, \. h part := @.cont;4 a2 P7 j' L# @# E% D6 z
@.transpOrder := void; _2 K; C0 U t! K. J6 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* g7 s1 M( `4 J, | U @,root.eventcontroller.simTime);% [" E; t7 e+ X3 f& o# R
@.HasOrder := false;* |. l0 Y( ]+ Q) r- f* ~
@.DrivingHome := true;
& \8 }! E8 F+ x rgManager.tryToStartTransOrder;% X) u& g5 P/ X% m+ o
if @.Destination = void+ S- S: m- t5 ?8 |
then -- no transport order for vehicle @$ O% |3 r! S) ~0 g
@.Destination :=
% L, f: U h6 r4 n$ l( g$ ^1 N5 k5 E rgManager.nearestFreeStation(@,track.~);8 o" f9 f& X) S; j/ N
newDirection(@); 3 N$ B- j: V2 y" s
if @.Destination /= void then0 U8 s/ q. l1 C. u3 t8 R
@.Destination.NumReservation :=
* J! C# @, G- R* D" G# ?6 m @.Destination.NumReservation + 1;
a; h1 s0 I" V# {6 M% j& K end;
1 I% H6 l" m8 [, V/ _9 ~8 H" j9 q6 w @.CurrIcon := "drivingHome";; J* A% q& P0 o Q0 j3 ]0 A
@.DrivingHome := true;
5 r) q" |, X+ c2 Z" E end;
% V9 x7 G+ y! m* L* D# I1 R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 @, g, q0 l2 e# j3 N part := @.transpOrder;
. `4 f( c" x2 _/ e$ T part.move(@);-- load part
; D. ^* g7 C& A" l @.CurrIcon := "load";7 {9 \3 D4 p/ s, u" D% }0 n. u
GlobalDistObj := part.globDestination;' H9 T) L( u+ k; ^& P2 Z) Y
assignLObj := rgmanager.rgAssignL;4 B0 a( ^, R* g$ C2 i
row := assignLObj.getRowNo(GlobalDistObj);' g, u& R) m4 s: X) I9 \9 j
if Row = -1 then -- since 704 E; E8 `( m( O! s2 T
if lan=1 then$ ~& }! N( V2 a' G8 `9 H: ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 s3 ]& V; r2 e! w to_str("in der Andockstation: \"",?.~.name,"\""));
) [/ J7 F. a9 h, M" x. r else; V9 X- m9 `9 `, I, N0 t2 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( ]9 ]. T5 k, S* F+ e! {
to_str("in docking station: \"",?.~.name,"\"")); M5 k$ N& C! b. g8 D/ @8 C
end;
# V: y5 l3 [9 ]; Q else# @" i% `. `7 z0 X0 j
@.Destination := assignLObj[1,row];9 g3 V9 a! Q% d4 y+ C
end; . U# U+ F) j0 e9 [1 C1 A
newDirection(@);
V8 l. s1 `6 F8 J) g! G( y @.HasOrder := true;
, O+ t- A$ c$ H: {$ e* y1 U V( v end;1 ?! L4 m+ \- G6 g r
end;
+ y, S' d3 k% p% ~" Xend; -- of the method
/ G9 [% x) X: o. `9 Z |