/* called by: entrance ctrl of the object 'track'5 x7 o8 P" X% l% c Z5 J: \
*/
7 M9 g. u2 K" E! A& }2 t: Eis% I5 o! d+ C& w0 c2 ~( e% J! n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 H) p# ?# r; v( {. ~do
& a" u$ X- @4 {' ?! U4 N Lan := rootfolder.Internal.Tools.AOLlanguage;3 Z! T3 j l! b/ f: @. P. {2 b
if current = @.Destination -- else return
* ?0 P2 g" o! b- } then
2 ]' O6 N) M) z2 t+ b5 O @.Destination := void;5 E3 L5 k6 Z* j3 |
if @.occupied then
3 S0 I% n% F$ g) @7 y part := @.cont;: K# i/ U- {: v$ C! L
@.transpOrder := void;) D0 S7 L6 t9 r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 V# w) H' y$ C _' }6 N7 ^
@,root.eventcontroller.simTime);
' t4 Y( ?; c7 X @.HasOrder := false;0 U- m& X7 j0 j, y! K
@.DrivingHome := true;1 q1 d: X# ~3 e$ e( n$ X
rgManager.tryToStartTransOrder;
- [( |& {1 z( I o9 ^; } if @.Destination = void( R N4 d, v1 l3 R; D
then -- no transport order for vehicle @; k1 _! e; u0 Q/ T/ c
@.Destination :=
# a% X# j. N d8 T3 {+ \ rgManager.nearestFreeStation(@,track.~);
( @- g+ s* b1 A( U" { newDirection(@);
( o* x7 U% x: h% V/ @& v; q if @.Destination /= void then
$ P M% V* T, o- @ @.Destination.NumReservation :=
5 n. r1 R6 n' ]) a& w! Z, Q0 S% S @.Destination.NumReservation + 1;
: ?, j {+ {' g0 B1 D7 U end;; `) V7 A: n5 Y0 n7 O: C$ D7 ^
@.CurrIcon := "drivingHome";
9 |* O9 r0 n; E, l2 [4 ~ @.DrivingHome := true;; h, M' W/ v5 N6 W
end;
4 i) l% j2 `' c- h% S1 D else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- r$ G# C& ^; Q* w& T9 Z part := @.transpOrder;+ X& \. i# p. O
part.move(@);-- load part% c& w$ n, r) \! g
@.CurrIcon := "load";! i5 V3 I9 r1 O/ {
GlobalDistObj := part.globDestination;
; [- h; u. J/ y$ `7 o assignLObj := rgmanager.rgAssignL;
, Q J- N: N8 l5 q0 w row := assignLObj.getRowNo(GlobalDistObj);
% `' y) P: g* W if Row = -1 then -- since 70
( }5 }% r0 b7 Z8 g( U if lan=1 then
# I2 G7 q9 R6 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 v k8 B4 s# {) m to_str("in der Andockstation: \"",?.~.name,"\""));
8 j0 d' v B3 ~+ V) L& P. y else
( G$ W: i: ?# |0 _4 p3 L; Z( F& T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' Z, I6 U0 K, j @
to_str("in docking station: \"",?.~.name,"\"")); ; T4 a2 v4 F/ k, U$ u, c1 }8 m
end;
+ U$ u+ i( Q- D3 e: e else
2 z6 H$ H( ]( Q( }% C% H1 @$ W @.Destination := assignLObj[1,row];5 z1 q7 H( U l: c) E- y3 B
end; - n. x$ b a: m N( C* S6 l( V: m
newDirection(@);! r9 P0 l% v0 }) h1 k7 X) \4 N' t
@.HasOrder := true;; o+ k8 S4 P5 Q4 `* V
end;
4 A* l. I' d V. k u4 F/ x end;
8 Z3 R3 J% d, i/ [/ Tend; -- of the method, J& S5 f/ h8 o8 T4 d3 l
|