/* called by: entrance ctrl of the object 'track'
q' ?0 p8 o+ n% J9 q4 L m2 @2 `) \*/
2 k7 R4 U) ?: k2 @0 p* z1 qis
3 C9 z; {. ]( G* ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;; z2 O$ S, W; r' B0 o; }
do2 L8 T+ {% ?* L
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 H8 T& S" F; H: t1 E3 O& s4 ` if current = @.Destination -- else return m2 Q- z% k: u- S# d% \0 n
then6 c7 C* E0 a3 E3 ?6 B9 g
@.Destination := void;
( C0 t4 B& j6 K: j/ M- z- n if @.occupied then
- P; Y+ e* `7 h5 _5 E8 a2 H part := @.cont;6 y3 R0 m3 [( {$ o/ `1 u/ @" L" _8 W
@.transpOrder := void;9 v4 S6 T5 ^7 n/ c: K: b: v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 {6 E9 U. c2 i0 f
@,root.eventcontroller.simTime);. ]7 N% b6 x0 n6 C* P& b8 j
@.HasOrder := false;
; U/ u8 U. h* ]% z/ z5 X+ @& S @.DrivingHome := true;
+ D. A$ S" |. Y+ l6 ]- m5 z rgManager.tryToStartTransOrder;
1 J$ M, i# [# {2 g1 U7 ] if @.Destination = void
2 a2 Z$ Z i3 [- j8 a then -- no transport order for vehicle @4 i5 ]! ~( k, Y1 d, u) S
@.Destination :=
$ i# z- t- @# }6 N3 x6 t rgManager.nearestFreeStation(@,track.~); k5 |: | o% P9 j9 o8 k% F
newDirection(@);
2 j+ M' M# ?) u2 p7 b& {" s/ W if @.Destination /= void then
6 f* o/ y" I! m' m6 u% K$ u ^ @.Destination.NumReservation :=
% c1 R, ?; B& O9 K* ^# k, d @.Destination.NumReservation + 1;. t5 y& F9 \' N- E+ B0 u- V
end;
, T; }0 ?* h, e8 g3 }, a7 x+ _" k @.CurrIcon := "drivingHome";
. z4 l# q$ I5 C4 f* z$ W- D @.DrivingHome := true;' I8 w5 c; y' `% ?% X
end;
4 M( h( h$ p/ a( R9 L3 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station: x+ h z/ ?1 m/ D* [
part := @.transpOrder;- q* q! V) n* T( N8 ~
part.move(@);-- load part
) ?; W- y' D' w9 b4 M0 x @.CurrIcon := "load";
$ u3 t) _- K& ]7 G' r* Y# ~ GlobalDistObj := part.globDestination;
+ E' A7 g' X- ~( j- k assignLObj := rgmanager.rgAssignL;( J# g$ i# n! V4 w) l0 ?
row := assignLObj.getRowNo(GlobalDistObj);. F3 |$ n, D* A8 M* Y8 @
if Row = -1 then -- since 70; n1 X+ s( s; q1 i/ B( T4 r
if lan=1 then
/ l7 n8 Z9 a: R9 b* n7 l( D4 b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 M7 ~- t! }! c
to_str("in der Andockstation: \"",?.~.name,"\""));
* l' D% O+ l* ^* ]8 L else* ]; \' T, {' A) q. `4 N5 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, @4 Y+ S( W6 c) ?" s0 s9 J6 k. c7 e to_str("in docking station: \"",?.~.name,"\""));
2 v1 x0 }3 } [, m5 I end;2 D. v/ r: S* x4 i X4 W+ `
else
; S' ~8 d& q% P$ R @.Destination := assignLObj[1,row];0 ]% y: g/ ~2 R+ v5 \
end;
/ O% B- `1 |7 G" k$ j/ E newDirection(@);
! B7 j! `$ Z3 }+ a7 l @.HasOrder := true;
0 @2 y: _ t1 d end;- r' r5 C" T- W( s8 B7 _9 z- T
end;# L: d9 Z: G* Q; g+ l0 `3 W9 E9 e- E& _
end; -- of the method, N; L3 _0 ]- ^/ u
|