/* called by: entrance ctrl of the object 'track'/ \0 G+ H9 x' {6 R& l
*/* u. P+ q$ w- t: A2 f" n+ Z J
is2 I1 @9 D- W8 D; v7 O" |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 O9 T( r- T0 B$ [+ k0 \
do: [% m. P: I: p4 u+ Y
Lan := rootfolder.Internal.Tools.AOLlanguage;/ d, D! C( \# [; Y; w( o1 a/ W
if current = @.Destination -- else return
+ r- [6 p, u6 H) J; Z! ` then" h3 `- U) a: P& G
@.Destination := void;
9 h, w( b* x1 n& C! R, } if @.occupied then0 X) [ t3 I( \6 _- t( p
part := @.cont;8 z5 W+ _; Q& b9 I' e- c# H6 P; F
@.transpOrder := void;1 c! m7 F3 [) ^- {% s8 R! ~: e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 k3 w' M) a' m0 ` ^1 ]0 W @,root.eventcontroller.simTime);$ l; g( j6 U, R1 N/ y3 m
@.HasOrder := false;: Y; K/ z2 [+ v0 I6 m$ _6 V! e3 r
@.DrivingHome := true;0 b( P; B8 W4 b6 }. R5 o$ ?* `
rgManager.tryToStartTransOrder;- m+ N" h' |# i, H$ S7 `
if @.Destination = void f, u l/ w6 t6 d! i
then -- no transport order for vehicle @& O5 U& t1 T/ f5 m( Z- G, f, C# ^
@.Destination :=7 K9 w4 [1 N- v6 ?/ ?
rgManager.nearestFreeStation(@,track.~);
9 X' z2 L2 _& Q/ q* B+ @ newDirection(@);
; X9 h! h$ K! r# B if @.Destination /= void then
' M. m: C: P3 ?$ i3 e @.Destination.NumReservation :=/ u7 ~! g! J0 E4 C% _
@.Destination.NumReservation + 1;
- e0 }' N2 B1 m# m8 i o9 U( V5 w end;
9 i$ Y4 Q {( b; a9 ^/ H/ `4 O, ~ @.CurrIcon := "drivingHome";
) K, Q. G! ?2 G* ~ @.DrivingHome := true;
1 ~7 G2 S) ~) ] end;6 Q* T: b# t; u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! `7 k: K% B$ u, ]" {( { part := @.transpOrder;
$ P) m9 `* f/ j7 x part.move(@);-- load part
7 q5 @7 g4 \9 P8 F( E- }, [2 x @.CurrIcon := "load";) N6 K8 ]& [: s
GlobalDistObj := part.globDestination;, I% M$ V, a. F3 P8 n% Z# f- q
assignLObj := rgmanager.rgAssignL;
! _: r; l) v( e& n1 D4 g row := assignLObj.getRowNo(GlobalDistObj);
4 X4 \ c9 u2 k) f& r% M' l' f if Row = -1 then -- since 70
$ m5 H: T6 G! n0 t3 T, t if lan=1 then
" ~7 F1 U- I* w% g% ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) E4 n* }% R( N2 H to_str("in der Andockstation: \"",?.~.name,"\""));
( K3 h- m5 l; Q else8 n" d1 X" x6 I/ a1 j- T& P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," a. c2 r. n9 B4 v0 R6 t3 a- P D
to_str("in docking station: \"",?.~.name,"\"")); % A1 I0 s4 b/ P, ?5 a9 i0 e/ _6 @
end;) y, u+ B8 B" K3 q& _
else
v" t6 q# ]$ f# P4 A: l8 D @.Destination := assignLObj[1,row];% {: L' Z; L5 I( E7 E
end; 3 f/ }7 T9 B% ~3 n% m. b
newDirection(@);
; M: ]; V% A+ p7 h! ~- c3 [" O @.HasOrder := true;3 x7 X9 W; P4 ]$ a+ W, p
end;
. n6 O- |) z5 G0 v* b" B end;
" r8 z( }) R- Aend; -- of the method
9 } e) M1 s9 Y+ J4 z. }, O- V( s7 n' G |