/* called by: entrance ctrl of the object 'track'
3 n8 T: @8 V& E$ L*/
- Y* F6 k0 [# Lis, { C- K; m' `$ G2 E, s7 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, C6 S1 l# r# k
do, b B5 c' v; G8 {" @
Lan := rootfolder.Internal.Tools.AOLlanguage;4 K% i- a/ L6 F0 Y
if current = @.Destination -- else return
: Y6 H1 B3 T1 a then4 I, s# z, Z% f7 t, R9 l# X) t
@.Destination := void;% A! S* j* H5 ~! e
if @.occupied then2 E, ^' z, B7 L& Z
part := @.cont;* c" J4 E$ x) ~8 d3 m8 R
@.transpOrder := void;3 U+ C5 o) W |2 ]' Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 T8 w8 R' m! j5 q @,root.eventcontroller.simTime);
$ F5 Q, L y. e; M) t) X" N5 ? @.HasOrder := false;
4 R+ I0 O# O% V" J7 I; R# R, K" U @.DrivingHome := true;) _/ h, J% j, H
rgManager.tryToStartTransOrder;( c1 E% d/ | M$ Q
if @.Destination = void- L# M2 i) ?# p9 _
then -- no transport order for vehicle @
. a% P$ S2 ~' Z& X: I2 l @.Destination :=2 B* v, j; I5 a8 `: [: Z
rgManager.nearestFreeStation(@,track.~);4 g- b# b3 r+ p" j Z$ h
newDirection(@); 3 p4 i% H& ^+ X# @) [" \
if @.Destination /= void then
' j9 f4 v4 c+ p7 B( y& {" K ? @.Destination.NumReservation :=0 \& D. A' [- l( k- `' t9 C
@.Destination.NumReservation + 1;( g$ F$ s% h G
end;, |3 h" j b0 v3 e( L! @! F
@.CurrIcon := "drivingHome";
. f- X. F7 L+ X2 N" R4 K+ m7 g+ F @.DrivingHome := true;
! o1 I1 X! }- c5 X- J$ i7 j4 n end;. X% x- E# y. {. ^' [# ~* g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 w" v0 A" b- Y! a1 j part := @.transpOrder;: `+ P# V- }. l9 x) `
part.move(@);-- load part9 |$ U- e/ A2 g0 T! d8 f
@.CurrIcon := "load";
$ } o! v' E6 F% U. a* e GlobalDistObj := part.globDestination;5 L( K; m7 A3 k4 i% L9 V( \
assignLObj := rgmanager.rgAssignL;( C* u! G3 h2 j( X) t4 e+ H
row := assignLObj.getRowNo(GlobalDistObj);3 r9 @- J7 _) C3 o' n! s: [& X
if Row = -1 then -- since 706 Y8 `; V4 e" U2 h8 g& o1 U, C! W
if lan=1 then
7 O1 ~% }$ j$ n' j5 ^1 g. O# O* h1 A" g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 D9 U/ O% B" Q0 ]( |1 P
to_str("in der Andockstation: \"",?.~.name,"\""));7 y, x& r, x; v1 N- {
else
5 r, S, O2 t% I% i) \$ J N4 E1 i6 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. R% ~5 s7 ~, ^ F! v0 ` to_str("in docking station: \"",?.~.name,"\"")); + m7 v4 ?5 ~* r. q( C+ L" P" {* C# [
end;; |. B8 z* Z* D3 g* L" F- }( Y- W
else3 `' j; M7 E# ?5 I
@.Destination := assignLObj[1,row];
4 ^: v- n8 H* { end; ! J. i! {) Y4 _. f
newDirection(@);
, b: e1 Y1 b# D# |! X @.HasOrder := true;+ t2 ?' ^1 T" z/ Q8 ]+ z+ R
end;3 U6 ]2 a& z$ X/ a! F
end;
% |6 y5 W4 A6 z% W, Fend; -- of the method; M+ z6 q6 @5 g8 ^/ y
|