/* called by: entrance ctrl of the object 'track'
* r5 P0 L+ w* v; D G6 L' D d) l*/
1 @* N) E5 K9 Vis
N; d, v$ Q% O3 g part, GlobalDistObj, assignLObj:object;row,Lan:integer;
j3 V; J u7 N, J' s D/ T( _1 T4 ido7 e2 Z! K Z8 N/ G( f% Q' Z
Lan := rootfolder.Internal.Tools.AOLlanguage;7 E+ _" v4 z$ a! S
if current = @.Destination -- else return
+ A/ K9 X1 R; J. J then
/ `" i6 E3 a2 g( s0 t8 V @.Destination := void;+ L2 M6 u# T( Z- \4 Z
if @.occupied then
. r. Z2 E4 N2 @2 u4 i, r part := @.cont;
' O6 ]( @ U6 p! k! U8 Y @.transpOrder := void;
6 ^' m7 i, r$ e" e; t8 n$ ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," I0 y2 Z: S6 Q6 G
@,root.eventcontroller.simTime);- M* V4 {5 R2 i/ R
@.HasOrder := false;6 l9 m, ^( p. E
@.DrivingHome := true;: K( v0 E9 m8 y% m# R% I% m, o
rgManager.tryToStartTransOrder;/ a, o" ~1 ]7 P; t9 X
if @.Destination = void5 |7 E+ }( y9 P9 d
then -- no transport order for vehicle @
# t6 S% U1 m+ i @.Destination :=0 `) Q) [# x4 k. F4 p
rgManager.nearestFreeStation(@,track.~);
, Z. X+ o: p# O" ~ ~5 E* h8 F6 y newDirection(@);
/ ~8 O9 ~% p) v% V if @.Destination /= void then* c9 V4 }7 q1 R2 O
@.Destination.NumReservation :=. h! B# z) W4 p7 ]* m& X; H4 Z
@.Destination.NumReservation + 1;
4 N3 q- k' n" l& m end;
! ]- w$ o8 h. V4 r U @.CurrIcon := "drivingHome";
7 B; y5 X4 k9 |! c; }, q# o @.DrivingHome := true;5 L! W% J, S4 U' s. e* T
end;
+ d, ?# w5 D. n: ~/ U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. }" P! t4 j% T8 {( t8 [( c part := @.transpOrder;
% C/ l7 ~9 ` v3 z/ V! t; _2 K part.move(@);-- load part }1 m! [- e0 y5 }2 p6 X$ P" e& L# k
@.CurrIcon := "load";
2 O4 h/ t0 b# K# m f GlobalDistObj := part.globDestination;
, e- X, M7 T9 C assignLObj := rgmanager.rgAssignL;1 l7 a! R9 x( h% p3 g0 {8 k
row := assignLObj.getRowNo(GlobalDistObj);1 }% B: c+ I% k0 Q" G" k
if Row = -1 then -- since 706 L' C/ c: r. T* `
if lan=1 then
# B0 g- o V$ g6 P$ H8 J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) E( c. Z$ T. N+ S$ B% a8 Z
to_str("in der Andockstation: \"",?.~.name,"\""));
7 V. r8 @; U* b: P% D: J: t6 h) m else
$ a$ P: L( r V( U1 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- F! {: T% ?* g: |2 e$ v, i to_str("in docking station: \"",?.~.name,"\"")); ( E5 Y) s9 ^! e6 n# S( B
end;. V1 Z' J+ t) @2 L* j. w' u4 Z- w
else/ p8 t' m& {# O' j/ P5 {
@.Destination := assignLObj[1,row];. o7 D% P, q+ S( B
end;
u% r: V) @( M) y# Q3 P7 g newDirection(@);
& {; z! V- U# M @.HasOrder := true;# `9 U1 i: b$ D( E" t/ P9 D
end;
: c9 M: Y- M! \! _& _& t7 J7 t/ u end;# z: A5 Z* h* R
end; -- of the method4 ~, `) z) s- }
|