/* called by: entrance ctrl of the object 'track'2 l6 @! |) g7 r. f3 R! W
*/
( ], O# J/ K& a6 Bis
! F, U+ l1 T" v% o2 K) z8 J) T part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ |9 A5 u5 y: h4 g& Z+ |8 w& W
do2 I4 ~/ l1 q0 N# E/ s, x5 e
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 G: i; o. S. t if current = @.Destination -- else return
- t2 W% V/ q8 Q0 x$ R then* r2 p# j5 Z2 f9 U0 U
@.Destination := void;
8 U8 C9 X# |7 \* `8 i" }2 E if @.occupied then
' i2 Z9 v& z7 |; Q6 S# F# u0 g part := @.cont;% E9 G7 k! n1 C/ o* P; S
@.transpOrder := void;8 L* d' e2 w* l( `- B+ ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 G: E$ O( B' L1 R+ }
@,root.eventcontroller.simTime);
% p2 b8 \+ @$ s0 {: O8 c& l4 _ @.HasOrder := false;
; w! g8 x; u2 v( B, g# ~) S5 n @.DrivingHome := true;& w: w9 C: F8 \* s; o; y7 a$ |
rgManager.tryToStartTransOrder;
$ _3 j/ A, c/ f1 P/ _: z% M if @.Destination = void: R% F: C3 L9 I2 b8 p
then -- no transport order for vehicle @
1 y3 q% \7 y* e1 b9 O @.Destination :=
* Z. M+ g1 x0 ~( N0 v rgManager.nearestFreeStation(@,track.~);
4 c6 d7 [/ H; i; k7 y" j" S newDirection(@); 9 i- Y2 |: S2 C
if @.Destination /= void then" f* C3 g0 f ?0 G& m
@.Destination.NumReservation :=
7 |8 E% R- |+ V @.Destination.NumReservation + 1;
5 `3 ]: k7 {$ m7 C2 W' U end;
; g6 D2 a: O) {3 M. I @.CurrIcon := "drivingHome";
# \ c' l5 W- O3 y& T: ^0 x2 z @.DrivingHome := true;
, {, K+ d `3 ~8 e end;$ F$ x U. L, i d6 a! i4 b1 r; v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 T) }3 e$ a) Q: t7 M4 |
part := @.transpOrder;
- x/ A8 F- Q- O part.move(@);-- load part
) `3 e `+ @- [) J6 g @.CurrIcon := "load";( F" K: X( q/ Z
GlobalDistObj := part.globDestination;2 J$ x! Q; ?# d t- d, A9 v5 A
assignLObj := rgmanager.rgAssignL;9 P* M* F' r+ G( e# N' H/ H
row := assignLObj.getRowNo(GlobalDistObj);
$ }8 h! H6 @3 s% A# c7 N$ e) ?- c if Row = -1 then -- since 70
3 i( r& M3 L/ R2 Q4 S ] if lan=1 then* T; {3 T5 U& ~7 N5 l2 I3 b2 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! x" J8 S4 N' e5 _2 q
to_str("in der Andockstation: \"",?.~.name,"\""));* {+ `6 w1 N7 Y4 ?, r4 ?( Q
else
h- f+ _8 p7 `* L |9 r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; D0 l4 a% M! K to_str("in docking station: \"",?.~.name,"\"")); 2 z' p4 z- Z0 h
end;
* d8 n7 q7 X4 X# d0 L else9 b2 `2 O5 {3 c
@.Destination := assignLObj[1,row];* N6 y+ v+ K6 T1 J: y7 I2 T) Z
end;
w7 F" F `1 l; f: ? newDirection(@);
3 J1 q s' x! ? @.HasOrder := true;! |1 Q( V& m& ~0 n8 g8 i
end;0 q# M3 K1 t$ }' m/ @
end;
7 a! w6 \* N1 P* P0 v9 q2 X, [) z4 Eend; -- of the method- p( N2 ^0 D: ~ f' p) K+ {6 O- H
|