/* called by: entrance ctrl of the object 'track'
6 X+ s7 Q: f4 Y1 A4 Q0 [3 h' @*// ^8 W/ L7 z+ ] b( K% Z
is
/ Z: R$ J. N* d/ f$ Z5 ^6 k# t4 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 K: h- }* ~ @& Z: n$ Wdo
: v5 i3 w$ ~. H# _( @1 b# B1 f Lan := rootfolder.Internal.Tools.AOLlanguage;. G& f% y% J+ {, M" W
if current = @.Destination -- else return
' s$ G* f$ K8 I2 A then2 Z7 M! O; p( o# I; O
@.Destination := void;9 Y! F# r- s6 D Q1 e+ K r& N' g
if @.occupied then
1 e0 w6 {' V8 r part := @.cont;! j4 j0 P+ f& u
@.transpOrder := void;/ \: k; w! l/ _7 d: c3 c3 K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 ?$ E0 L2 ]! i3 i
@,root.eventcontroller.simTime);
' k: F$ B# t5 F7 o6 K4 Z1 l @.HasOrder := false;
3 \2 j* T. [! ?! i. n* _0 |$ K$ w! P" T% I @.DrivingHome := true;
( G& v4 Z$ k0 b" K7 w rgManager.tryToStartTransOrder;9 r* f7 y9 C( z. g
if @.Destination = void
+ P* a# T( k! G% n% n' @ j0 O then -- no transport order for vehicle @! J5 U, ^: J: a. M/ e7 y
@.Destination :=
' b6 L5 _. j: R9 E rgManager.nearestFreeStation(@,track.~);
9 M1 |2 O* _3 t* K/ o" ]3 L9 K newDirection(@); 4 P7 V/ J. W/ ^4 W: V. @- F
if @.Destination /= void then6 e# ^! [4 G, [
@.Destination.NumReservation :=
! t, Y5 a/ G% |9 N1 @0 O @.Destination.NumReservation + 1;* y4 }, B1 G* a- G p6 q5 H* K& a: e
end;
- I/ P* ^8 C- z. Q7 f! Z& y @.CurrIcon := "drivingHome";
' S- N% p1 x6 C3 O3 t) N6 n. q) F @.DrivingHome := true;2 f; ]8 t% H$ g# i# L: ~1 g" X
end;
# ?: L% I6 B7 _" h: w else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 }) {9 [! @: L
part := @.transpOrder;
3 f6 H' ]$ z \9 z part.move(@);-- load part1 N2 B! m# P. s
@.CurrIcon := "load";. \- a) v$ {" q$ ~. t
GlobalDistObj := part.globDestination;
/ q, t2 j; b! y6 F7 H" M assignLObj := rgmanager.rgAssignL;
) l7 r! l$ P4 b& @ row := assignLObj.getRowNo(GlobalDistObj);
% L8 I- E# ~9 a# E2 ]2 k3 Z E. o4 c if Row = -1 then -- since 70
8 e% k# Q6 R" _+ r+ h2 {7 Z if lan=1 then
5 Z4 \, z" W c0 b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% {" U3 v) `; i- P/ ^/ w3 [
to_str("in der Andockstation: \"",?.~.name,"\""));5 L1 F3 g2 U% R
else$ A- N6 e+ e$ b; @( X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' x ?$ M8 i; X- t# z/ w
to_str("in docking station: \"",?.~.name,"\""));
$ A4 A$ j! c. o Z end;; @" Z9 Y k5 E. K
else% Z: U2 ?% } M1 D: q- h
@.Destination := assignLObj[1,row];+ P. Y& C+ q: X( U1 ?3 s
end; ) g# K# `1 I( H1 A
newDirection(@);
5 G& l- h, Q$ c' C @.HasOrder := true;& L% G6 p' m$ w: K! R) p3 H8 r0 s
end;
; e9 n- i1 m4 T* G( V [! j( N; f end;
! ?5 x: [; I8 l; M$ Fend; -- of the method0 e& d2 f; ?+ J: b
|