/* called by: entrance ctrl of the object 'track'
- A! |- k% E W# C0 r! @*/+ T# ^+ W( q0 e2 Q' S
is0 j4 ]$ [4 r; O* i' T$ ?( Q8 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, Z# U1 Z0 j5 N1 [4 x3 ^7 f& }% G
do0 `; E4 g* z0 a5 L0 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
# }: _7 }8 ~4 `: b3 t+ r if current = @.Destination -- else return
! P# V1 Q8 O* t& n" o then
+ D- p2 U$ B! ?5 Y3 I: s @.Destination := void;
- _; i ]# ^1 x& ] if @.occupied then$ I, I6 K& ?1 |$ u2 ~7 ~$ a/ b
part := @.cont;- u& h9 w v+ M3 j- }6 ?
@.transpOrder := void;0 t- c" x x+ v3 S$ k* z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ p( d& \8 ?9 o: F2 i4 Y, N @,root.eventcontroller.simTime);
( @) }8 b" F7 b: ^& r @.HasOrder := false;
* I: v6 |7 j( T$ ~ @.DrivingHome := true;. c' j+ ~- I8 j' x& D' C+ Y2 t) K
rgManager.tryToStartTransOrder;
; V+ s( A% l: O. z: p# E* N9 b if @.Destination = void
* `/ L' u* l* {5 e, {6 U7 i then -- no transport order for vehicle @
# ? q" K2 F2 Z! W @.Destination :=$ M' [7 P7 P; |6 g0 V
rgManager.nearestFreeStation(@,track.~);+ v/ M. R9 @% D
newDirection(@);
: t$ `# b c2 \3 h B if @.Destination /= void then! t5 K# v+ D |% z9 m
@.Destination.NumReservation :=# z6 e( F- i: u J" f% @
@.Destination.NumReservation + 1;
) ?! g6 \4 |- `2 B) k$ H end;# g d5 D& D P; |
@.CurrIcon := "drivingHome";+ E: H7 j9 S* p0 z( ?% Y
@.DrivingHome := true;* O m$ a9 L8 f0 Y" e: h; c
end;- m. J: f: O7 z+ [4 }; V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( P4 X* `$ V1 ?! }+ O4 v
part := @.transpOrder;
% s6 \$ ^9 o( M* D' s/ p part.move(@);-- load part
+ _0 W. T0 Y D6 w" `2 N. u @.CurrIcon := "load";+ S: y3 z+ o! ?# n
GlobalDistObj := part.globDestination;
3 W4 g; `6 b! F9 j assignLObj := rgmanager.rgAssignL;4 G( W5 y2 L! F9 H3 b
row := assignLObj.getRowNo(GlobalDistObj);
6 [" e. {' ]& s4 H2 e if Row = -1 then -- since 70
; z& l m: u! r4 L# m r5 G if lan=1 then
3 g+ T8 y; \- h3 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( U5 l9 F. N* S0 i& z/ Z! p) e! g to_str("in der Andockstation: \"",?.~.name,"\""));5 @" i: T2 n1 J1 M+ A1 `5 P
else. `% X: \6 r+ r6 C# ^: U/ J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' h) c. q: z9 f- K8 R
to_str("in docking station: \"",?.~.name,"\"")); , `/ i$ A! w' v
end;( e0 A# m% Q5 Y( v
else$ J5 K7 ?/ b* H& R- @# c
@.Destination := assignLObj[1,row];
9 H; H2 O F# S" p B+ F end; / m$ ], P3 S, k) _1 \+ _4 U
newDirection(@);
4 j$ O4 e C# w9 Y$ ~$ | @.HasOrder := true;" [7 w7 s0 k, M. K: g" f
end;( A3 v5 F: \/ y) t
end;
1 e/ z: P2 G! Eend; -- of the method# q3 [' M+ X9 R# T7 v8 A, ?
|