/* called by: entrance ctrl of the object 'track'
( p" ?) y6 ~* h9 ~: Q, Y*/
, ~1 s" A" n" ~ h; b2 Tis/ v9 i1 p e( C' @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; L: f- n l/ Qdo3 Y) v) E9 {# x! H- {7 |" O& H! V
Lan := rootfolder.Internal.Tools.AOLlanguage;6 U9 a# S7 m, U
if current = @.Destination -- else return
: T5 e" ]6 ^! J% \7 U6 I then; y! A; K' F ?. |, q7 |
@.Destination := void;
8 X- O# _" s( v- L/ E& Z5 ]* r if @.occupied then
5 C* ]; }" E2 K part := @.cont;
# y; B9 {/ |0 G9 | j @.transpOrder := void;, J& S* }" z% G9 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 ?8 @7 @# N: o) o% p
@,root.eventcontroller.simTime);
' Z4 d1 q+ E. d/ x @.HasOrder := false;
8 k0 ?+ a- [! }1 ] @.DrivingHome := true;
\2 g8 m& @9 H1 c rgManager.tryToStartTransOrder;
- X* b- e7 F; s) y9 Z if @.Destination = void
( u5 |+ G3 Q3 P2 E then -- no transport order for vehicle @% J" M7 o9 k* \6 R. C
@.Destination :=: _7 q8 { l4 {; W G
rgManager.nearestFreeStation(@,track.~);: d: [7 |. ?' i4 L+ B) C
newDirection(@);
# c; s% Q8 }6 |5 n4 D; ` if @.Destination /= void then* i j/ X7 j7 j( J! c5 \8 x, o
@.Destination.NumReservation :=
+ a' V/ V! ~8 l3 ]$ Q @.Destination.NumReservation + 1;
, `1 q( r2 t2 o2 j, C. t end;
, Z. Y" E* L6 x ^ @.CurrIcon := "drivingHome";: W4 q; v$ }& [" A8 _ `1 y
@.DrivingHome := true;8 X* c% o" C6 h8 _# s: {
end;6 C9 t' `, Q$ i. F2 o3 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. S! c- S* M# t# E$ ?
part := @.transpOrder;# h* M) T9 @* n2 v. q# [( j3 H( t
part.move(@);-- load part# L& X* z) {- |: J5 c5 P9 j7 |
@.CurrIcon := "load";! f3 ?( V# Y( c. I; o, W
GlobalDistObj := part.globDestination;
' U/ w' _9 _; O& A2 j assignLObj := rgmanager.rgAssignL;7 C V5 s, W* n% ^3 e
row := assignLObj.getRowNo(GlobalDistObj);: D) p! }5 g, u+ P
if Row = -1 then -- since 70
1 B4 E' c j" m8 \$ F2 L! m if lan=1 then) ^* t* q3 r, N' G B1 S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, g# g( i7 Y: W8 Y" P
to_str("in der Andockstation: \"",?.~.name,"\""));
" M& ?7 f; O3 }. \; r else
! }8 O4 G; _- S" l6 R0 P& [, w3 b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 t8 T0 L* v7 z- }. V& L! h+ v
to_str("in docking station: \"",?.~.name,"\""));
7 h1 \8 f( u" D5 R0 O end;
* |4 M3 h3 b( }; f1 |* g% v& r else
1 K* D7 w7 L' ^0 } @.Destination := assignLObj[1,row];
! ^$ ?' z" J, |* N7 Q end;
8 n) o6 o$ ]: H! H( T newDirection(@);
1 H) p2 H: E- M' b @.HasOrder := true;
" h0 y0 @4 j9 P" H# O& M end;
; U- Y3 u3 _+ E; O e; k& f end;
# R9 O q0 q: Dend; -- of the method0 R" |3 d0 a1 J M) L/ c$ J
|