/* called by: entrance ctrl of the object 'track'3 `. U$ u9 P! Z+ h( A) u# w
*/
: W( O f* W$ i7 }+ fis! T9 \( s2 A0 k* J0 Q5 p4 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 r* T# C# d# m$ @/ `
do2 `5 h7 Z3 j% _; @4 ?( u4 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 Q5 P" c6 F* t& v if current = @.Destination -- else return
, d7 p1 }5 `" Z' M6 H( K then
, @; |! \9 ~5 |! U1 \3 g @.Destination := void;4 G. T% u F+ |$ Q. j& V
if @.occupied then' k; D1 m. N: ^+ ^6 Z5 y! T
part := @.cont;( ?: Z8 T$ `" T/ {* s
@.transpOrder := void;
' D: ~2 k0 A/ f! \: z# Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' M- s$ W+ Y) b& ` @,root.eventcontroller.simTime);& `( i. a2 c3 O
@.HasOrder := false;
@' Y& m6 e3 a1 q @.DrivingHome := true;' h/ G& p- p/ Z# i
rgManager.tryToStartTransOrder;6 Y4 Q' F1 t, j7 c: C0 D. D+ Y: j
if @.Destination = void. a- K& ~+ s1 Z( X% c; ^; ^- p3 z
then -- no transport order for vehicle @
6 G# K. ^6 A2 U9 ~ @.Destination :=+ j0 Z7 B j) R q5 J9 F8 f
rgManager.nearestFreeStation(@,track.~);
. I% }* c3 T* n; R1 ^4 \ newDirection(@); $ b; \; t' G/ ?
if @.Destination /= void then
9 b% A, g/ e& D' h) Q8 Q @.Destination.NumReservation :=$ i8 L" ?7 s6 J$ u, r& W' h4 Z
@.Destination.NumReservation + 1;
' n: p& K6 m* ^7 H* q end;
3 S4 V$ p- i/ T$ }4 G4 d. O# J @.CurrIcon := "drivingHome";
6 c: o" V: r! e' { @.DrivingHome := true;4 l' e8 R& h2 e$ F% v# C0 p
end;
- j- L$ e5 B. X6 Y3 c4 p( ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 `% u9 x. b E: E6 X( C part := @.transpOrder;! c' n O, x- }5 y3 |! U! N) n3 X
part.move(@);-- load part
6 c/ @+ r, G2 ? v8 F% x @.CurrIcon := "load";
* L: l; z. J- Z3 y u" _ GlobalDistObj := part.globDestination;" f2 h2 i% J& K5 o6 }$ g3 T: J
assignLObj := rgmanager.rgAssignL;
! @! a" H- I$ W row := assignLObj.getRowNo(GlobalDistObj);
7 M1 c: L9 J8 O, _! a$ Q2 Y% q if Row = -1 then -- since 709 e) O2 k4 @8 R6 @
if lan=1 then2 i7 y1 O# G! O+ F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 O+ B$ [8 R4 n! C% D to_str("in der Andockstation: \"",?.~.name,"\""));1 l5 D$ L$ z1 q. g( u
else
8 p8 f l: ]; c2 f+ o$ u* d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& V) P' s) n2 D+ l to_str("in docking station: \"",?.~.name,"\""));
; i8 E5 f; c" l8 O end;
2 V% T4 W! [) n7 ], @5 T. | else
$ G# L0 m" C( m! F# a1 G( G5 ?1 r3 n @.Destination := assignLObj[1,row];
; h$ L# O0 ?8 f; v" M! \1 m end; 7 X" b7 L* m' R" J0 w) s4 b
newDirection(@);/ t# a- q8 n+ A* _' c4 r: i" {# l! c; k
@.HasOrder := true;
W9 C- |) e! x. ~( Y' w end;4 n c: N/ h' O& C( r
end;
" D4 b! s% |& j3 i% g+ jend; -- of the method
1 \1 n+ x- o$ X4 Q% Y/ N |