/* called by: entrance ctrl of the object 'track'* N; i% p9 A3 N! R! u! @
*/
- ?; O" j# k8 g' Iis3 T3 E M: N0 W3 f( n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, j. R4 U2 j9 @2 m, qdo; p/ _. P( s5 h5 u+ f- J- ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ Y9 z, U' O8 D* T if current = @.Destination -- else return' R) U: [* {0 K% t( K
then. T2 Z4 K2 b+ F, j9 _
@.Destination := void;- C$ H7 q4 C8 o |2 u
if @.occupied then
1 i$ o& B. N) p' G part := @.cont;
4 M4 \- O+ N1 f$ ] @.transpOrder := void;
# `: @% L- ]3 c# E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 g. I; d# d. a0 I2 F+ A! S% B @,root.eventcontroller.simTime);
& p) [0 I5 a+ I9 g6 J4 D @.HasOrder := false;% r! o* j# ]+ F9 u+ |
@.DrivingHome := true;
) D3 x9 c& m1 @! Z0 W" ?# _ rgManager.tryToStartTransOrder;! K- W7 \! S5 ~8 ^& G7 {" ~1 z/ ]
if @.Destination = void
# R: X& r8 ?2 l8 _5 I- L then -- no transport order for vehicle @/ K! K* n/ k, R2 m* U- [
@.Destination :=& x: ~& ^# F4 a/ F
rgManager.nearestFreeStation(@,track.~);# V f. J9 S4 V" G+ X9 s. `
newDirection(@); 8 w2 f0 \. B+ q9 L* Y# l% j
if @.Destination /= void then* Q1 x# n, Z+ L: L+ D3 B1 m
@.Destination.NumReservation :=
4 ]9 x/ G; U1 G: {% N' b @.Destination.NumReservation + 1;8 i- W8 e1 c3 M$ S
end;+ m5 I' }) z w4 w6 ~
@.CurrIcon := "drivingHome";
+ u( U' D- \! a7 \ @.DrivingHome := true;8 P4 @6 D! q8 k3 o- ]( g" {( f& K* k
end;6 A! f/ s# e/ ~* `9 _5 v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 ~& E8 C6 s1 L J% l0 j part := @.transpOrder;2 T+ C P+ r! r( I
part.move(@);-- load part- p/ u/ S4 g9 B! J+ G! E! I
@.CurrIcon := "load"; W% j9 D# \- m7 J! A1 g
GlobalDistObj := part.globDestination;
" p- p# s1 h7 h( f, E assignLObj := rgmanager.rgAssignL; e: h7 [5 q' E
row := assignLObj.getRowNo(GlobalDistObj);: Z. o7 }* w! a- g0 l
if Row = -1 then -- since 70
- P, u) H, C- `/ K( H5 i$ \6 p3 } if lan=1 then
' g! J- x: z: {- C0 l( E U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 X. Q* \/ P: B o3 ^7 l3 n to_str("in der Andockstation: \"",?.~.name,"\""));$ C+ p9 m: h" Q) a+ F3 e
else/ ^8 s0 W% U4 M9 M& B: t, |$ ~, `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 o) v0 P( W. Z/ D C to_str("in docking station: \"",?.~.name,"\""));
0 c \' _7 T8 s1 p* d0 l0 D: i end;
6 a* _0 y" h, t+ V else3 L `& U; K$ I5 S3 T
@.Destination := assignLObj[1,row];
. \6 }. T3 M! U; F4 z/ i" n$ L+ M end; 9 @8 K0 B# o% f# T7 U5 z
newDirection(@);/ z+ b$ K/ b+ x# M# r( F" \
@.HasOrder := true;
6 s& G2 R/ X! B q" b \( W. ? end;
$ I) A/ ?! i' R% v end;$ e. H; f0 N& v
end; -- of the method% x; [$ o3 f' k5 p
|