/* called by: entrance ctrl of the object 'track'
8 j5 W1 K, M$ |; E( \4 i*/
% \) y8 H/ V H# J# d5 W5 r3 Eis) g; c' n7 }1 ^. P! |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 H8 R; [! ~! [1 y \
do9 ?* [ \" X2 S8 [
Lan := rootfolder.Internal.Tools.AOLlanguage;3 `7 h2 ^/ c8 x' |1 J3 E
if current = @.Destination -- else return5 T+ ]1 L" `1 C a0 o, Y
then
0 e& e- a4 Z' Q8 `. y @.Destination := void;2 v- c9 W3 _9 A0 y- |2 ~; ?
if @.occupied then) x& c5 X% C- H2 p
part := @.cont;! x+ B8 N4 L4 U! N
@.transpOrder := void;# r1 U9 ?+ \( Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! {4 h: `, V2 U# T @,root.eventcontroller.simTime);* x f* I5 v( Q. m" L
@.HasOrder := false;
1 x' l/ l1 x' G- P% a/ W5 S @.DrivingHome := true;: C2 a# r6 s. w4 E
rgManager.tryToStartTransOrder;+ d' Y' o! i" P8 }5 q0 ~# i0 S
if @.Destination = void; y( \$ N' y+ q' @
then -- no transport order for vehicle @2 X8 B; X+ e4 u5 t. E0 Q
@.Destination :=9 `. D J; m7 M6 p8 k4 ~' A
rgManager.nearestFreeStation(@,track.~);) A e3 E) v k3 X' n- g
newDirection(@);
+ y1 I& \) r+ H: K0 E0 r+ v if @.Destination /= void then
( o& K8 `8 J2 c9 e2 p$ d$ n @.Destination.NumReservation :=8 Y" _0 N1 b! r$ Y, R7 y
@.Destination.NumReservation + 1;
, f0 k8 u6 s5 a% [- G Y end;
+ j' C! ?. f2 I, Y @.CurrIcon := "drivingHome";8 D; r U9 r. {# O7 q4 {- v( o0 k1 g0 c
@.DrivingHome := true;: r" D- K# b& I& Q' O
end;9 d( n/ ]! s! z6 f+ R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 s+ D8 v t9 n part := @.transpOrder;3 z2 n/ k5 d0 M" H1 _
part.move(@);-- load part+ e t' b7 o& c J3 S: z
@.CurrIcon := "load";7 F0 m4 P; r, Y F& b4 `5 X, z7 }& ~
GlobalDistObj := part.globDestination;" [2 V2 g% Z9 T3 P# z2 F& F& ~8 M
assignLObj := rgmanager.rgAssignL;
, t4 d; l- J+ q6 D$ ]% h; y6 m row := assignLObj.getRowNo(GlobalDistObj);* ?( ~6 }1 C- G
if Row = -1 then -- since 70$ V- h i9 m; \! _1 \, |8 r
if lan=1 then6 R& e. y3 V' W0 q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
M& D" S; I2 d. {/ r( I to_str("in der Andockstation: \"",?.~.name,"\""));
9 k* o0 s q' N K" y4 d/ B else
% R7 x! Z: k$ f5 Q' z+ ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 H% E! V/ Q5 z8 {9 v
to_str("in docking station: \"",?.~.name,"\"")); ( `. T8 L2 d9 Y" z
end;" i2 I+ _" j% l8 ]
else
" c3 T' w& a/ X' o @.Destination := assignLObj[1,row];
& q6 ~. ^/ B! Q* p8 t; A end; . a, R; ?+ G6 Y" _) o( P7 F
newDirection(@);3 q: o& b) E1 N
@.HasOrder := true;+ G9 l) I( J8 b* b
end;. R8 D" O3 l1 Q+ l1 ^! ]
end;
( W& B7 a% a9 u! Send; -- of the method/ U* Q& o: R* B& E" M
|