/* called by: entrance ctrl of the object 'track'
4 }: |( |! l1 R9 _; V8 t4 x*/
- i8 h$ l3 N. O7 W6 `3 Yis% O# t# `; t$ l C9 S1 q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 C8 @* o ~1 r( ~4 [, b; Sdo7 T6 e! F: u5 Q7 k8 q
Lan := rootfolder.Internal.Tools.AOLlanguage;
; J, D! N% j+ M1 l; \ if current = @.Destination -- else return
0 f( D3 [/ c3 P9 k- }- F! f then
2 m2 C& n6 A# F. r, @! O @.Destination := void;( h* H$ h8 d7 J) j' g
if @.occupied then
0 Q; |1 S2 I/ i1 w( ?& T5 f part := @.cont;1 e' `5 q8 Z6 S; C
@.transpOrder := void;
) Q2 m$ w( [) x+ Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ V* i r& R) |+ g* o
@,root.eventcontroller.simTime);/ Y$ T8 B, a" @7 }0 K
@.HasOrder := false;, @0 V5 C7 T0 t$ B* f
@.DrivingHome := true;/ A2 T% R( y% h- L% w1 C1 e L3 \4 B: }
rgManager.tryToStartTransOrder;2 M% ] U2 d5 |3 \, u4 A# _7 C
if @.Destination = void
0 z3 O0 U! i [ then -- no transport order for vehicle @
8 P0 V( L7 w0 m+ U, r: i/ A @.Destination :=! A) T! p/ ?5 q$ W% C
rgManager.nearestFreeStation(@,track.~);
) @+ ^5 e+ n; Y newDirection(@); * u/ h2 I c; r2 I/ o4 _
if @.Destination /= void then, Z9 M' K8 r; O
@.Destination.NumReservation :=/ k) R3 W8 q* S# L1 Z) Y
@.Destination.NumReservation + 1;5 t- J+ i( F' M3 W8 S G
end;
; j, G/ W# x: L, M: | @.CurrIcon := "drivingHome";) |, [+ l6 [* \5 \1 `5 g$ V5 H8 Q
@.DrivingHome := true;3 V, L" G0 d' m9 M3 ~5 k
end;
: H# _, G) x3 _( Q. u ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 S, z- X4 f& F+ |: i# c$ L0 `
part := @.transpOrder;
0 _, [- D5 F5 t% U- z ]- R# u part.move(@);-- load part. M( X _2 ^+ P; q5 R2 h7 u
@.CurrIcon := "load";
& E4 v3 C- t3 _. k# S4 t( V X7 ] GlobalDistObj := part.globDestination;& l# ~8 M" U) f$ c
assignLObj := rgmanager.rgAssignL;! p# d" o8 ?: V$ j* Q
row := assignLObj.getRowNo(GlobalDistObj); K4 \2 }& @, y: e2 L# z% D
if Row = -1 then -- since 70
1 @/ a. P* l6 Q if lan=1 then. v8 g, B/ H7 S" B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& u: }$ b% y7 g+ R) M) Z t% }7 a8 s9 \ to_str("in der Andockstation: \"",?.~.name,"\""));
7 g% P; K. }( H- ^ s8 A7 N else
" ~1 e# A- b& s" S: [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, M6 K% r! e' _1 a to_str("in docking station: \"",?.~.name,"\""));
Z! ?: y" `. d, M' \ end;, @1 {: @- z7 }0 ^
else
# c/ P! v$ }* H, O- S$ R @.Destination := assignLObj[1,row];
! r) _9 p- N/ v/ U" Z end; 6 g- q8 R6 I X7 I
newDirection(@);9 F! @9 Z j5 s8 `+ r
@.HasOrder := true;) ?$ Y5 k7 `! l# u+ I+ }/ d
end;
1 V& C5 s' U9 ~! E end;
6 Q, G0 s1 ]& e; x1 hend; -- of the method
1 R+ c& V* X# C6 b" D |