/* called by: entrance ctrl of the object 'track'5 m7 D1 L" K6 A# n' p
*/
8 \. ~8 J: g/ O# w7 t6 eis. y/ w0 I0 ] F; Y: t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 O1 X1 O8 C: T% H# Q& P3 k- `
do3 h4 W3 L4 S% f5 {7 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 E- h" Q# r* R* y& Y. |$ Q: \ if current = @.Destination -- else return
% h' @/ g$ e3 V6 S0 b8 K8 V then
( Z8 i% c5 I& {( |" }: [ @.Destination := void;. V6 S: r' ^- H6 R6 K. z3 {
if @.occupied then
4 X: M4 b; H- I, B+ ]& T2 ?, B part := @.cont;
8 i! Z# }4 v) ~# }+ S q @.transpOrder := void;8 ]$ B: w6 p- G- A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, z, ^3 D" `' d: b2 m$ N @,root.eventcontroller.simTime);# k, `9 _1 s; W9 R5 @- [3 {. R
@.HasOrder := false;
6 e6 V8 z- ]. z& k7 q @.DrivingHome := true;' j: @& O- r4 s, ^8 D Q
rgManager.tryToStartTransOrder;0 `/ |! Z# L" R( j o+ j2 }
if @.Destination = void$ l% J! E) L: @/ ], D. |- s% x
then -- no transport order for vehicle @) g9 F- m- U2 L- C2 C
@.Destination :=- }& @- } i; z3 V8 b; n
rgManager.nearestFreeStation(@,track.~);: \. R7 `# X6 r O/ m: p7 `: A
newDirection(@); & B, c- l- y) x6 y
if @.Destination /= void then
0 L7 U% w" B; ^; R# g) @0 u @.Destination.NumReservation :=
# y- J& { ^4 C5 ~4 a; r @.Destination.NumReservation + 1;
5 D* R& `! a1 O7 c9 L: {8 _ end;. M; t( v* U2 a- \
@.CurrIcon := "drivingHome";
. Q: Y, X& x0 `" _6 U/ c) j" d @.DrivingHome := true;$ T6 c" o! H% {( v+ L6 k
end;6 h2 j2 \6 k: S! e& c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# H% q9 c5 T' u' |+ T" o
part := @.transpOrder;, u3 @- K! J: ?# t* V
part.move(@);-- load part
2 a3 k' C" C3 q, |8 P0 p8 P @.CurrIcon := "load";
* }8 D3 x9 S( a# J4 W+ X8 t8 j! { GlobalDistObj := part.globDestination;
, S9 Z H0 s9 w7 W5 S9 w assignLObj := rgmanager.rgAssignL;
# w# t% ^6 ]5 A0 [$ D row := assignLObj.getRowNo(GlobalDistObj);$ [* u8 I' R J' c- h. ~
if Row = -1 then -- since 702 j" \; a9 z' I% E w
if lan=1 then
5 j0 a5 ^: ?3 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 w; f5 ? U+ y7 m to_str("in der Andockstation: \"",?.~.name,"\""));
4 e* E( c5 V# s% N V else
8 h# s4 X, P* B7 r" Y. P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ h6 J5 z3 ` V3 {3 a to_str("in docking station: \"",?.~.name,"\""));
% n, B" J' Y- C end;/ e% U3 F+ V7 Z1 ?9 m5 ^2 i5 u- z
else9 V* I! T+ R) w7 b' c+ J
@.Destination := assignLObj[1,row];6 _1 r1 |9 k7 }( L: N+ J5 Y1 O1 f6 z
end; * _; S6 H' ` |; \3 n
newDirection(@);
# `* m. ~" O- B f @.HasOrder := true;
! q9 z+ ? d; _+ u; ^0 | end;8 V% l# m, d- M0 @% U
end;4 f: S/ N& a5 z9 q! B9 w
end; -- of the method5 @$ q! v/ C3 F8 r, V+ ? O* R
|