/* called by: entrance ctrl of the object 'track'( @ s p7 W. q) l6 ? h8 s
*/
S2 c4 ^/ T& X# b8 E. u3 t! jis
3 I& p6 S* i& \5 N" _$ B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* O: q* J5 r% L, c {" O( Ydo
5 |4 b$ }3 N6 E$ ]; V Lan := rootfolder.Internal.Tools.AOLlanguage;; }# T1 L8 a+ ~4 s9 ~! U4 m
if current = @.Destination -- else return
; W4 f) Y2 D4 U9 z then& W; B" N1 D; G- o+ n4 D7 K* v
@.Destination := void;
6 ^8 P$ r% k" @" F7 r$ o0 V if @.occupied then
' P1 s$ r# L3 [% B% V! [/ ]" W part := @.cont;7 t. g$ f/ |$ V7 K6 [
@.transpOrder := void;) T5 F0 U$ X5 l2 e# G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 a8 U- `5 I! F$ V/ x+ e0 q @,root.eventcontroller.simTime);4 a V0 X! D5 W" o5 w
@.HasOrder := false;
# D6 Z! } S8 E, O @.DrivingHome := true;) T( O% O. k) M9 X3 e
rgManager.tryToStartTransOrder;- `+ J. D" g% K+ g
if @.Destination = void
; v+ v4 C1 |4 D1 o. p9 }1 b9 m then -- no transport order for vehicle @# v" I% U5 o+ S& @+ T( B
@.Destination :=
* \' u( n" ?& p- T9 g% y rgManager.nearestFreeStation(@,track.~);- @1 w) R- k+ t- W; L
newDirection(@);
& w4 b8 ^1 l+ ?7 P2 c! q: A- ~# d if @.Destination /= void then9 Y/ `; F1 i; x5 O
@.Destination.NumReservation :=
2 Z3 h6 R6 O0 P- f2 X7 b1 P @.Destination.NumReservation + 1;
; T1 B7 C6 F" c$ y end;
4 |* f& \% p' L, G7 I @.CurrIcon := "drivingHome";9 C" H$ Z7 n- t
@.DrivingHome := true;
' n# f" H/ u* S end;
% s. D% ]! W' I4 H& b a0 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 M5 i6 ~) P: r) f/ h- L
part := @.transpOrder;$ a' T7 }. o! t) o ` f" T& F
part.move(@);-- load part
- N" G8 E5 Q& k4 X @.CurrIcon := "load";: A1 M* M1 ~; m @8 S
GlobalDistObj := part.globDestination;
" j- c8 w7 i4 ^6 U assignLObj := rgmanager.rgAssignL;" X$ c% w" q" }, v- w
row := assignLObj.getRowNo(GlobalDistObj);- c" G% y8 ~% p/ V4 l# v; P
if Row = -1 then -- since 704 ?9 d* E- o3 P' L
if lan=1 then
. S) n! P3 C3 |" d. \3 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* b( ~! ?. O6 L) ~
to_str("in der Andockstation: \"",?.~.name,"\""));
" p K* I0 i/ C4 e, [. T else
# A! x' V2 a& J! ^7 }! G- V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; @1 @9 H* Q- Q" P1 z H to_str("in docking station: \"",?.~.name,"\"")); 1 B4 P" {; D- ^% m- N/ e3 u1 s
end;1 b4 p/ i- |: N6 M6 q p. |
else
# ^8 c6 H- c$ u- T @.Destination := assignLObj[1,row];
! e' F9 R7 H' G8 g4 a2 V! s2 s* W M end; 0 J% t$ I+ i7 }# O' n
newDirection(@);0 o* `* R( F5 y/ [% G% M6 W
@.HasOrder := true;2 Q% X" _( ]8 t+ w& k
end;+ i5 w7 `& N8 p+ i3 c7 m4 T/ J1 R0 k
end;
, G: M3 \3 }1 u4 N) Send; -- of the method$ R1 i1 _/ u r" ^8 Y
|