/* called by: entrance ctrl of the object 'track'
; F6 L `' q9 t*/, m4 m5 Y3 J/ `4 N- j0 S
is" _4 v& p: |' T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" X; W; p) k9 tdo
1 \ F/ }5 S& p5 A; C$ `; v9 r Lan := rootfolder.Internal.Tools.AOLlanguage;( Q; v- K% m' i& a$ I0 A \8 m4 U! W
if current = @.Destination -- else return
; O ?: }" Z3 m* a then
) \. n$ x# x f @.Destination := void;
* d& q- x( N% P. u if @.occupied then; w# q# A3 U2 k2 l1 C' j9 b
part := @.cont;
: z) E/ S9 q- t @.transpOrder := void;
) o0 L* w- @( S H e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- |( M/ I. ?- q! n& z( b( G8 d; y
@,root.eventcontroller.simTime);
, h6 @" \4 F3 K- A% M8 t @.HasOrder := false;7 q. m/ E: @% ~, N- `. p
@.DrivingHome := true;
( B( _+ e. b9 q0 M rgManager.tryToStartTransOrder;
- s2 i# t" [" U" H# a if @.Destination = void( g3 _$ a" ]: j6 F0 W j& f
then -- no transport order for vehicle @! H# X; I& ?# i0 p. e
@.Destination :=3 W! `+ q( p# g& b) u
rgManager.nearestFreeStation(@,track.~);
( a T$ A' v2 j; r newDirection(@); 4 o8 K/ V/ e2 ~) ~9 t" e1 X& L7 ^
if @.Destination /= void then3 o3 h! M) @4 J+ U8 x; w( i5 g
@.Destination.NumReservation :=
$ a/ ]+ Q$ q7 {7 Z6 ^7 R! W @.Destination.NumReservation + 1;3 c4 l& z U( [# C$ _
end;8 R. o7 F. E9 g5 X. `5 G, V+ I
@.CurrIcon := "drivingHome";
. J7 |$ W3 s5 n3 r) I& F4 C @.DrivingHome := true; n9 o9 f" L- D/ B
end;
% }6 H9 }1 r# f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 {( X# \$ c0 z% \* b- b% c" z part := @.transpOrder;
1 g2 j& t ?* A) q part.move(@);-- load part
) y6 U# j) j$ m- ?4 E% v, v @.CurrIcon := "load";, y) I2 a4 ]' i8 l
GlobalDistObj := part.globDestination;+ {: k; l, t% f, h
assignLObj := rgmanager.rgAssignL;
\8 L+ Z/ L1 s% P4 n3 x row := assignLObj.getRowNo(GlobalDistObj);
' @: A4 H( p2 Q# D if Row = -1 then -- since 70
! J7 q, l# L- r$ _4 y; ? if lan=1 then { W9 v, y8 ~9 C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 K- m1 o- s8 g# G
to_str("in der Andockstation: \"",?.~.name,"\""));
8 J! }: ^( \$ K2 e" m else/ B% `, r2 s; E* f) Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# \6 b3 C! J( T# R to_str("in docking station: \"",?.~.name,"\"")); * g% w4 X' n/ G5 j- v$ Z: d8 Z
end;
' e- i! _7 K4 \2 _8 P8 W3 R' I. j else( [4 u& Y$ ]0 w
@.Destination := assignLObj[1,row];5 l- j- f8 j( F& e( Y/ A: l
end;
: p! J0 r1 ~% S- |5 v newDirection(@);, `: E+ v; j8 J% [, x
@.HasOrder := true; l1 b$ E4 f8 N. E8 Q- G9 Z
end;( e- x8 G- E( [! F$ m U
end;" d% ~: @$ c/ V
end; -- of the method8 U6 a2 ^. i7 r4 }5 `
|