/* called by: entrance ctrl of the object 'track'
! I9 M- d" C+ C/ L# i/ v*/# a. S* E" T6 B; n. h; T8 u; G
is
9 u# F: ^1 c+ Z# l: ?4 r M5 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 W3 k2 C) r. F+ S9 Tdo
; W4 Q. W( A0 h% c Lan := rootfolder.Internal.Tools.AOLlanguage;$ W8 L) ~- H0 v) S3 L5 v
if current = @.Destination -- else return
" p" V i# F4 W. t4 U then( p& C5 w4 `; u* q
@.Destination := void;0 E" L4 x6 a$ z& Q5 F$ @3 L
if @.occupied then" H9 u9 p9 H8 p$ D# e$ ]
part := @.cont;
8 R$ b8 x) g2 z+ k& W @.transpOrder := void;) P- _- _% ?! U1 L: j* S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( H- ]4 B5 ]/ B* k0 G: Y, p3 }; E
@,root.eventcontroller.simTime);
7 H. h, b' j: `- ~( q @.HasOrder := false;
' r$ r2 {; @: o. D. ~+ Y, l4 f0 S @.DrivingHome := true;
) I2 F9 E) b+ y( o( q" K rgManager.tryToStartTransOrder;
* P# K5 @; h: ]( H if @.Destination = void! |( Q5 h4 z' N: y% m2 h
then -- no transport order for vehicle @$ n2 Z) P5 y) H% }; ^2 M/ H
@.Destination :=( B& V! v) y# ^6 x9 g6 |
rgManager.nearestFreeStation(@,track.~);9 w# F* v$ W9 s
newDirection(@);
- |' _6 }4 b9 i: B if @.Destination /= void then6 b: g$ o( J: [9 Q7 z
@.Destination.NumReservation :=
5 \# b4 D1 E/ s9 Y Y @.Destination.NumReservation + 1;
' @: u2 W7 Z0 Z' ?- C( N& B3 W end;
- d8 L- J2 V! Z: e @.CurrIcon := "drivingHome";
/ ~: u+ z8 O, B @.DrivingHome := true;+ p6 l- N7 ]+ b4 c! H+ k( [; h; i
end;
' i" z# `/ k! N else -- the vehicle @ is empty, both vehicle and part are in the same dock station! J4 D2 k8 J& |" r$ |
part := @.transpOrder;
' |5 o6 {5 `4 J7 i% Z h. g- ^ part.move(@);-- load part
2 D( M4 G/ K, p: I- c2 u& B8 x4 _ @.CurrIcon := "load";
5 H$ X: Q5 c* G# \9 T1 f0 A GlobalDistObj := part.globDestination;1 o7 i% x5 Q* g
assignLObj := rgmanager.rgAssignL;
# \; L# e9 v6 q% a row := assignLObj.getRowNo(GlobalDistObj);
% O% @. C( b+ r if Row = -1 then -- since 70
* B" J/ ?7 I/ {+ G+ W if lan=1 then
# d* M: j) q' L6 ^& Y" e1 r) Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 L& s0 h* {) f/ k& p
to_str("in der Andockstation: \"",?.~.name,"\""));
# c2 ]" D y# |8 Y! B% \3 `* o% b else i, ?$ }- y$ c. d$ U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' u9 \8 K# [8 r& |- i
to_str("in docking station: \"",?.~.name,"\""));
& U9 V2 H( X: q2 Q& r2 g( O end;$ q5 e/ s1 G6 v2 Y% y
else% O" v0 ?" l* J7 |8 E* i- s
@.Destination := assignLObj[1,row];
% f0 ?& C9 d! O2 B& |3 I end;
$ z3 t1 t I$ x; ` z newDirection(@);
' V+ P- K8 [ I, ^/ t0 [9 W/ F @.HasOrder := true;1 F( A, b- M& U2 B% v
end;, S! d* Z7 H- j5 P
end;
3 ~% y# w) X" }2 U2 lend; -- of the method$ \/ z9 I2 A" T @9 ^$ a& A
|