/* called by: entrance ctrl of the object 'track'" e: @2 F. k: G* M1 S& M
*/7 V" ` ] C3 G; P) X
is& ?0 I7 Q$ C1 y, t, v& c0 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
t! D7 `) k1 a* d, @4 q8 B7 _, ^do
! r3 a$ C) O/ V. z Lan := rootfolder.Internal.Tools.AOLlanguage;$ K8 N' D$ K1 h$ ]+ O
if current = @.Destination -- else return5 ]' v1 x& f: X. f% s2 }" l
then
a. X6 P! L4 [ @.Destination := void;) y) m/ z$ Q0 Z9 X. H8 l/ b
if @.occupied then- Z# x/ e, {; f
part := @.cont;
9 p; q& [ c' v8 q/ z @.transpOrder := void;7 H& s4 x8 `( v9 ]! E2 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' `, e9 ^ z9 m- d. @7 w; [) D. p @,root.eventcontroller.simTime);
& o9 }+ \/ g" s9 ^ @.HasOrder := false;
% f$ x5 I6 s4 s @.DrivingHome := true;
9 m4 N% F' l& U rgManager.tryToStartTransOrder;( w* u/ ?6 s6 J; }4 X' |( o) ^# w
if @.Destination = void
& g; [+ G: W/ J/ M+ l( U. | then -- no transport order for vehicle @* P4 K" S6 `: P$ R* o; b( i
@.Destination :=. c# W! T$ X, u! F
rgManager.nearestFreeStation(@,track.~);
- z) `3 w) ~4 Z newDirection(@); , ~7 x7 r8 l- W2 s1 @" w$ a
if @.Destination /= void then
: X+ L0 q; G7 F2 P' l% t0 K @.Destination.NumReservation :=0 N C2 _& |( _8 ~, y$ N- e' l9 `
@.Destination.NumReservation + 1;
9 v0 X" ^& L+ d, Y" N, W7 A& s end;7 ]9 H+ s0 k! q' t$ J
@.CurrIcon := "drivingHome";
3 j' m5 j: Q$ T, K @.DrivingHome := true;
9 }3 O1 I4 T1 S$ J7 c! D4 q! i/ k end;$ ~7 c* S- l `) z) Q) ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ a& _2 I) {+ g1 E8 w4 k) }
part := @.transpOrder;
8 @0 t4 p' ~' {5 h& ~5 Q- ` part.move(@);-- load part; w( L/ \) M+ Y* h7 s0 j
@.CurrIcon := "load";
' M- `' y1 |% g0 A$ e GlobalDistObj := part.globDestination;
7 R1 A5 f: L% M1 k7 j8 w+ V assignLObj := rgmanager.rgAssignL;
& [ W) s6 s# W2 _. m/ {2 Y+ l row := assignLObj.getRowNo(GlobalDistObj);
4 W+ h( @' c6 G6 K if Row = -1 then -- since 70
6 A' J: P: G8 G if lan=1 then* h8 p, P r; ~% q, U7 L5 |+ }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- U8 Y& ?# G! {" E: }0 e$ C to_str("in der Andockstation: \"",?.~.name,"\""));
. g6 N, I- D0 ~ else8 r) E% N( }; }; _, u d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 y7 e/ L4 l2 m8 F2 Z to_str("in docking station: \"",?.~.name,"\""));
% ]! u1 o8 l1 L2 H1 u. ^- M# a end;
" V+ v1 X+ B5 j, m4 N else
3 u1 g! E8 x! F @.Destination := assignLObj[1,row];' k- @' d9 X2 P4 X- {
end;
- A6 O$ v- L7 {) A newDirection(@);6 j& d' B4 V! u5 g; A$ B; c4 A
@.HasOrder := true;
8 k' q" {3 ^4 n) n# @3 ?: o end;4 k! }# C: T! E" d
end;
* p/ |$ @1 v6 e3 Z K: |end; -- of the method4 R9 c/ G- l. s/ M0 D7 w- q
|