/* called by: entrance ctrl of the object 'track'2 u: x" e4 G+ Z/ y* n) F
*/5 x( G1 K$ b+ s
is6 G( j* m( q- L8 x! [, @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ m A7 i7 O) Rdo
: [" w: n* q/ G$ G$ D( K Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Y* G' C4 {7 B8 b! ^- T3 f if current = @.Destination -- else return; H$ B% L! Q; v8 J( f7 \: ~
then2 w4 R0 I" b1 K9 A9 n( b$ q1 q/ n
@.Destination := void;& {% p; F h8 W
if @.occupied then
! L+ u. y' P" R- W i Y$ L9 q. _& G part := @.cont;0 z* U& U0 H, S+ f
@.transpOrder := void;; I- Y" Y+ O* v. D: u+ k- Z# m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( C/ r6 Y# Z8 [8 l @,root.eventcontroller.simTime);6 d+ E9 S( o( {# _9 n* M
@.HasOrder := false;% l7 G) G9 [/ V8 a
@.DrivingHome := true;2 I! u# _ P u$ }7 d
rgManager.tryToStartTransOrder;
# N) E: ] F" b1 c if @.Destination = void5 q- T$ {$ O i
then -- no transport order for vehicle @. O' l2 E) v- m Z
@.Destination :=
" s1 X+ t& D- Y: A rgManager.nearestFreeStation(@,track.~);
6 M5 s# A% ]- E; {! O! ]9 O newDirection(@);
; w9 ?4 p& r; {0 ~ if @.Destination /= void then5 S$ F/ W, a8 b+ h9 ^6 p# B8 z3 P9 V
@.Destination.NumReservation :=
4 K/ @4 U7 X# J9 K @.Destination.NumReservation + 1;
; J+ @$ T7 m" }: m6 | end;7 b2 [% I( Y- u: m4 Q1 G
@.CurrIcon := "drivingHome";
4 m: C& N' n1 ^ [, u: M @.DrivingHome := true;
( @( w4 m& ^1 n% J* o# f end;' N' F( [1 S5 X ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, v: L+ N' I. s# \4 V W part := @.transpOrder;7 ` b# f: Q. b. z5 ]9 W# I, @
part.move(@);-- load part# U$ D1 u/ k; ]! T; |( ~- a
@.CurrIcon := "load";6 ]3 Y' P$ B3 `( Y- E% ]# \% Q9 k" ]# W$ \
GlobalDistObj := part.globDestination;
8 O3 f) I/ `: k7 M$ y' } assignLObj := rgmanager.rgAssignL;
9 [8 c8 g! ]3 @4 x: J2 v4 w+ O row := assignLObj.getRowNo(GlobalDistObj);
; _! n3 u$ `: w( R0 t7 e) Y if Row = -1 then -- since 70, U# V6 A/ |; Y- o8 i5 ^* Z, G
if lan=1 then
; _: D$ C& l$ X1 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 L, w* p2 I: O2 y$ @( j" j# M0 K9 i
to_str("in der Andockstation: \"",?.~.name,"\""));' ~% d$ w1 F& P" h; b8 U
else
' i1 T- B+ [" ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' Y+ i0 F6 K3 J9 S to_str("in docking station: \"",?.~.name,"\"")); + f( W2 g1 i# N% P y
end;# J3 H. @4 D$ L* m" q
else
, o7 N1 ?- l- V& _ @.Destination := assignLObj[1,row];/ L1 j, ^9 R& e4 E1 O/ S
end; 1 d6 }" A/ l, j" n
newDirection(@);
1 S( Q; Q G% q4 e @.HasOrder := true;
- C6 N; y) X6 A. L end;
7 |+ L1 Z7 Q1 t5 I$ o end;: s$ p! w. M, h. Y9 X" z$ ^
end; -- of the method+ y: T" B& M8 L* @: x4 |7 k- Q5 f
|