/* called by: entrance ctrl of the object 'track'6 K+ p: ~' l' G- r# i
*/5 g! ~3 P, A7 N, z$ j6 P& |0 x! s
is& c# n" F# W' R/ k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 J% h- N) [ gdo
/ s. W( L, I: r/ Q: ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
9 G) @% R" `1 V1 _7 Q# E if current = @.Destination -- else return2 J+ ^# y9 k t
then( ^# g n. Q) L& l
@.Destination := void;
3 s6 T! x8 ]* Q) ]0 h$ o if @.occupied then2 F* ^ O5 Z! K3 V
part := @.cont;% X' ` }; @) W, C2 P1 M8 Y
@.transpOrder := void;5 ], `+ T# C0 g1 O8 V3 L# S! D! q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, i; u! I* _1 z6 A2 F, a
@,root.eventcontroller.simTime);
4 S M ~% P5 d0 R( ? @.HasOrder := false;6 l0 W+ Y1 T/ R( n
@.DrivingHome := true;" p/ _7 g3 J! x0 s: x2 e' x- ^1 \
rgManager.tryToStartTransOrder;
! `( o' B! h- q# m# }8 r if @.Destination = void1 V, i" e! s5 u% E( }7 S* h6 W
then -- no transport order for vehicle @
; r4 W- [/ G# a/ x5 g% a! a+ A0 @% R @.Destination :=
# f( ?& q* {) l* `7 T7 G rgManager.nearestFreeStation(@,track.~);9 F' u3 K6 X _- L. Y
newDirection(@);
3 p$ L# m' g! G# V if @.Destination /= void then
y( e+ n7 i, t/ `/ |% X @.Destination.NumReservation :=9 P V3 c& l. K
@.Destination.NumReservation + 1;( B3 _* T" W; L
end;
, r$ D' L4 A; F @.CurrIcon := "drivingHome";
; u% t, {5 Z* g: a! B @.DrivingHome := true;. K+ @+ G0 \7 Q, ]. o* P! f
end;
0 y; S: h/ [0 i0 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 w7 V/ n# F, h% d8 |+ O
part := @.transpOrder;( N, C& M3 K$ @+ G
part.move(@);-- load part
3 A* x* ~6 K* G, O! { @.CurrIcon := "load";( l# x- O, M$ y' F5 j' L6 C2 I( N
GlobalDistObj := part.globDestination;4 O" M! p( X& O1 P8 A2 C
assignLObj := rgmanager.rgAssignL;8 w6 u) M7 \! H; o0 Q
row := assignLObj.getRowNo(GlobalDistObj);
2 y+ @; l m7 u if Row = -1 then -- since 70
0 D! @! l$ K) b( t! w% o if lan=1 then: R+ _, J/ Y% T/ R3 e/ S: P* Y, K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& X- j. @, N& D" X8 v5 ~/ R/ d- r1 @7 ` to_str("in der Andockstation: \"",?.~.name,"\""));
7 {' B9 m0 {* |9 j- a! @" p2 k9 E2 A) ]1 g6 o else) ?2 }, t/ [% R- _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% v5 s5 l; S7 g" C" l to_str("in docking station: \"",?.~.name,"\"")); 3 @& P+ v$ z; {' W; }1 m, l: I- i
end;
+ B0 [( L f6 C2 y else
5 P" d8 I! b3 c @.Destination := assignLObj[1,row];
( F$ V; d$ ?: a4 K' \6 H end; 5 S# `% s5 p% K$ U) v% T0 ?
newDirection(@);
2 ^+ s# l+ `% | @.HasOrder := true;. U6 P* [* G( N& @$ `) M4 R; g
end;% A5 A; t& J' L, y9 u& s+ w
end;$ G+ B( C( B% M
end; -- of the method, u7 g" |8 B8 r2 G2 i5 R
|