/* called by: entrance ctrl of the object 'track'
9 L* C6 V, {- i9 f*/7 B! v+ U, ?8 c* {( ~6 y4 Z
is2 R7 X8 l0 P2 u) p& W+ R* \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 [" b. C& l& B1 g9 q s0 [; Mdo, z6 {# @& S P7 V% z
Lan := rootfolder.Internal.Tools.AOLlanguage;6 |4 T& T5 n; `% A
if current = @.Destination -- else return6 j- m7 q0 J$ }3 A2 o1 [* V( l
then
& I: M, s( ^! x. E# }& { @.Destination := void;
# o& n ~8 a) c" g- m if @.occupied then) S4 E2 A3 [0 @" Q4 e" _
part := @.cont;
4 `6 Q3 ]' n2 @6 V& E @.transpOrder := void;) P" X2 B0 [: ?7 ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 H( u0 f) a$ s @,root.eventcontroller.simTime);
$ c9 k6 w0 Q2 q6 m' p @.HasOrder := false;
8 s2 w5 u/ S" H) \2 D6 | @.DrivingHome := true;
: o' v; O- i& l# i; |4 G3 U rgManager.tryToStartTransOrder;8 G% u" ?7 e# c5 d3 P. `4 c6 N
if @.Destination = void- i- t$ | c! g
then -- no transport order for vehicle @& D* |- |, `2 L+ ^
@.Destination :=* b$ Z3 ~5 g& x y
rgManager.nearestFreeStation(@,track.~);
' ^1 Z4 f/ \ E" n" Z newDirection(@);
. t4 x# i/ C$ a7 ~4 t! C s if @.Destination /= void then
6 z) h1 p" x4 j2 |9 A5 M @.Destination.NumReservation :=+ V9 `) m' _3 [5 i- |% Y/ g# D, s' Y
@.Destination.NumReservation + 1;6 d% S$ @% M0 ]2 v
end;) Q, G. t/ p/ H
@.CurrIcon := "drivingHome";' a& p) x$ B) K8 p2 g9 K
@.DrivingHome := true;
- V" y9 B5 o) J2 W- Z G end;
4 ~; |( e& P9 q2 h/ N9 ~) F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; s# v; Z9 A, K B& w+ R$ b part := @.transpOrder;
1 T @8 m3 T9 O9 k/ O& \ part.move(@);-- load part
% y% [9 }/ t; }: b. x @.CurrIcon := "load";; R d- X9 C4 Z3 b
GlobalDistObj := part.globDestination;) y8 M* c& d5 R5 K- _; C" h0 r
assignLObj := rgmanager.rgAssignL;8 x% r# [" `1 f7 U" t
row := assignLObj.getRowNo(GlobalDistObj);. a; l3 c& C6 t* ?. {
if Row = -1 then -- since 70
' j: E- o8 ^6 x- G; c. _ if lan=1 then. q& X( C- K4 }! f S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, u8 s2 ^3 y% m to_str("in der Andockstation: \"",?.~.name,"\""));3 a! Y+ u* E/ p; r% J
else
2 p0 q5 ]6 c8 w/ E; ?4 p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," h' x$ p6 y3 p0 U4 _! z
to_str("in docking station: \"",?.~.name,"\"")); 9 F4 j% r! L- b* x; t
end;
& G5 w9 w* ?% Q, u else
. [* }7 h# _8 O# N; a7 e- Y) A6 N @.Destination := assignLObj[1,row];0 T# e5 @ Z% q, V) u8 f
end; " B" B5 s* B2 S7 N t( w
newDirection(@);- c) z) F q$ `' a S
@.HasOrder := true;
7 H, }9 v. ^' F {1 A/ [ end;
, r0 d+ s3 e, l2 p% V- k end;
+ k; A, j1 L! Eend; -- of the method8 H' [ r; S2 z( `' i
|