/* called by: entrance ctrl of the object 'track'
$ h4 S- y+ S; A1 |*/2 w- n T3 V5 D. ]0 K" H
is5 i s- U5 F! K. ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. u' f+ Y; L$ ~9 p. ~5 m: b+ Ado( g! y& l4 Z8 ~7 h7 f
Lan := rootfolder.Internal.Tools.AOLlanguage;( t- i! \1 {+ o# L; r, P! X0 s
if current = @.Destination -- else return2 v0 P0 e8 P. L& x" Q( i
then) Q0 b' X# g$ u( C
@.Destination := void;
9 F9 {' r$ _/ k& |' b" w" ? if @.occupied then8 r+ ]& a% f; m6 T1 v# E- z
part := @.cont;, o) }) z8 e# s( B z
@.transpOrder := void;! ^3 X H% {4 K5 q2 M& Q; i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% B! t6 R" V5 _2 i) a @,root.eventcontroller.simTime);
) @5 N, g6 t h+ B2 g. G! C9 ^0 L @.HasOrder := false;1 i3 _. d3 J1 \* {, H2 ?
@.DrivingHome := true;
* p% M2 h$ c) Q/ [7 ?! D O rgManager.tryToStartTransOrder;
# j- Y, b1 t/ F. i3 J" @ if @.Destination = void; D3 e4 m3 S2 y+ C- ] u% Z
then -- no transport order for vehicle @0 {; h6 |; w2 l% p8 v; z
@.Destination :=
2 M1 m7 z& @0 r1 B( E/ b/ j rgManager.nearestFreeStation(@,track.~);
0 H" P! s9 g0 v; A2 h) a1 V: Y newDirection(@);
" A" w( q( C3 L+ [; C* c if @.Destination /= void then7 U$ x" F! m7 B9 ]2 H& [
@.Destination.NumReservation :=
$ X; V% F+ X5 T; E; F9 } @.Destination.NumReservation + 1;" P: M' D% w, L
end;+ T2 r4 @% |5 E* }- Y7 S
@.CurrIcon := "drivingHome";
4 b6 N# A7 N) g, J0 ^& P" h @.DrivingHome := true;( A/ l Y9 a4 `' S0 H
end;9 D% X# @' h6 _5 W! {+ V. d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Q7 ~. y8 d3 s8 c" s# H! N! i part := @.transpOrder;
% }8 M$ B/ n, \/ x3 @; c* r part.move(@);-- load part
" r0 Y6 I7 e4 i) e; D* R @.CurrIcon := "load";& X* c3 } o; H9 p
GlobalDistObj := part.globDestination;
; [9 g( A( s3 J1 | assignLObj := rgmanager.rgAssignL;0 b" o( R0 Q$ W: R5 `: x1 {1 n
row := assignLObj.getRowNo(GlobalDistObj);- f) {/ ?+ W8 s# S+ I' u
if Row = -1 then -- since 70
8 _2 X5 L9 e. w9 q. L0 D6 T if lan=1 then+ ]& q$ u- M: O( {# W( F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. L8 h6 t9 P/ f
to_str("in der Andockstation: \"",?.~.name,"\""));. H- L, j# ^! u, X+ u- S1 j
else; k& r2 e+ c% ]( x0 s) e" f: H" F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 Q! j" b) }5 S6 ?' [
to_str("in docking station: \"",?.~.name,"\""));
6 n3 |+ C2 U! O; c end;! y/ M) k8 c% S1 n1 U$ p: i+ U
else' `1 b6 a. ~1 K4 J, `
@.Destination := assignLObj[1,row];, }- F# J6 E' Y# j; F7 T1 r# e
end;
! N8 \$ k" Y" X! L' D' J newDirection(@);
1 L3 S: x' L0 ]5 G @.HasOrder := true;
+ c: d* e9 r- M end;
3 L2 m7 F# Y9 F* K: n end;
: {1 x% X9 U; W B; f- Dend; -- of the method K6 O+ ~! t( e* s% s4 [
|