/* called by: entrance ctrl of the object 'track'
- }/ D8 `5 u) J0 @*/2 e4 R1 |0 Q! t2 Z# F
is. d5 q; g3 s) o3 z8 V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' o U# N- s/ p; a! A ]# \do
& Y+ M" `2 u3 ~- A! E1 V$ s Lan := rootfolder.Internal.Tools.AOLlanguage;
. A$ o; u0 |1 q/ N if current = @.Destination -- else return: w0 m) ^) `0 v1 W# A- ]: `
then
/ `6 `4 R+ P3 U @.Destination := void;( }! `8 {% n" Q4 h! q+ ~/ H# U
if @.occupied then
) K, j9 ^& Y3 w/ ^, w* d6 J part := @.cont;# N* N" j) H9 R' g+ W
@.transpOrder := void;2 B7 ^* W7 R% Z/ G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 N( n+ u6 l* T' n0 i2 j @,root.eventcontroller.simTime);5 K# A# l% y/ }3 l7 k) L' z
@.HasOrder := false;
5 t1 i5 a% N5 _2 f/ } @.DrivingHome := true;. W5 K/ O3 x4 L$ Q2 y# g. G
rgManager.tryToStartTransOrder;- b' W# F: V( w! K" I3 f
if @.Destination = void
8 n6 k! O0 J w2 X6 w7 l then -- no transport order for vehicle @
5 C/ r3 E/ p. O" ~+ N @.Destination :=6 V4 @2 U9 [8 B' w' }" U
rgManager.nearestFreeStation(@,track.~);
" n" U8 r( s# e( i5 O newDirection(@); 5 P$ s" v! `, u9 I( t
if @.Destination /= void then4 i) M: S4 p! L" I
@.Destination.NumReservation :=# M7 R5 s. f3 A# @' l0 z+ R
@.Destination.NumReservation + 1;3 `9 D: Z/ S7 d
end;
- A4 @' a! n# j @( m7 g" q& Q' r/ G @.CurrIcon := "drivingHome";
( m6 f0 C' `" J5 m+ O( H @.DrivingHome := true;: ^) l5 |9 {5 g( A5 J
end;
. C, v0 m; W' s4 M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 d w! O( o | part := @.transpOrder;
% F7 V# V* \* Z+ Z part.move(@);-- load part
5 ]% I/ m4 ^ I: r5 x @.CurrIcon := "load";
: G" L7 I5 d( `$ B3 m" s GlobalDistObj := part.globDestination;
7 e( F9 c& F- D) k+ T8 Y; ~6 E) m assignLObj := rgmanager.rgAssignL;
2 F9 v n; B7 ?1 ?7 A; s& u4 T' J; s row := assignLObj.getRowNo(GlobalDistObj);; X) X* B# }, E9 ?- R: K% `( q" e: V
if Row = -1 then -- since 70
9 X H( P9 o3 V9 V& b" s* s if lan=1 then- k4 O7 Q1 C- u! {6 \# G4 I. Q# O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: b: ]; c! i( e o. W9 y# }
to_str("in der Andockstation: \"",?.~.name,"\""));+ X) p3 a( j5 `( @5 @- g. h
else
8 z. e$ K3 W: c. p3 o3 Z% @3 n6 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; v# z! O# i& C' z6 `
to_str("in docking station: \"",?.~.name,"\""));
. `4 j4 T. C/ ?3 C( R7 p end;& ^$ @7 l) G& k- i0 ?4 L
else
$ o& o/ Q2 t% m4 u# z @.Destination := assignLObj[1,row];
3 V; h! q: q" S2 h' X end;
/ U% S, {* ]* R. @. Q* z newDirection(@);# E J/ ?, G9 b. k! o$ O
@.HasOrder := true;
, x5 t! c! f/ z& O5 a5 g end;; L- e$ `" d0 n) ]* y+ S
end;, n! x' ^' p8 x6 o* H# S1 G
end; -- of the method
# A5 k5 [1 y4 c8 u- W7 T/ B |