/* called by: entrance ctrl of the object 'track' N( `6 \7 `; C/ k& o0 `! j
*/
: C/ d$ Y8 H( n5 I: A% Ais6 j5 E3 |/ N: V2 L" X+ ]3 d' G1 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& Y! R$ ]# j0 H n4 n6 [do
- Q* q W: \& M) o8 O, [; h Lan := rootfolder.Internal.Tools.AOLlanguage; z: Z8 H1 X# }4 E5 w6 H) Z
if current = @.Destination -- else return
% l3 P( A; L: Y$ c) ` X s2 s then! _3 I+ o; C9 R* t! d( t# r
@.Destination := void;
v" u A7 w+ x# c if @.occupied then
3 x0 v5 N$ {9 X u( r2 y2 K part := @.cont;
! L9 a5 M; d/ |- } J4 q: ~8 n @.transpOrder := void;
* R& v" p1 \) P. U) D# v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ O! T2 g1 x0 w" }/ q
@,root.eventcontroller.simTime);
6 m) a8 e7 u7 h! b& j4 n @.HasOrder := false;9 g) U) G6 v6 `5 |% G W. \
@.DrivingHome := true; e& n( F; _- V3 i. G
rgManager.tryToStartTransOrder; [& b( B5 l% m: l
if @.Destination = void, c1 B+ C% h& O. d( b% R
then -- no transport order for vehicle @0 ^$ w# Z: ?1 Z( z. |$ Q2 x" R4 S# ^/ V
@.Destination :=- ]! J+ a& h* b4 S
rgManager.nearestFreeStation(@,track.~);! a" g# I- |, p# ]: } l" A$ o
newDirection(@);
: V }/ b# \; I; A if @.Destination /= void then
" Q$ A- i/ V, }, V9 k @.Destination.NumReservation :=$ y7 |# ]$ K* B5 P( G3 Q' r; B
@.Destination.NumReservation + 1;( s! H% X$ {1 h2 }' {
end;! B. o0 ?( \) S4 I, N
@.CurrIcon := "drivingHome";
) Y- J: m, r8 w* w9 V @.DrivingHome := true;
: n0 r9 Y. [' g. s: o# X end;
% U& g5 m( a) A, ^0 T, g else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 [7 F F8 ^: d
part := @.transpOrder;- V$ R: F" L3 L5 n+ ?
part.move(@);-- load part
1 F6 O1 B2 B9 k" b @.CurrIcon := "load";
, c Q2 u6 _( A4 g1 P GlobalDistObj := part.globDestination;; c6 t% p/ N5 b( K+ g( y
assignLObj := rgmanager.rgAssignL;
/ Z3 F- P0 l; f8 }" ]2 d, C, ^ row := assignLObj.getRowNo(GlobalDistObj);
?0 A- X& k8 x+ C+ d: |2 a, k if Row = -1 then -- since 70
5 H# Q/ G4 p; M4 _& M8 n if lan=1 then, H8 T( n- F0 f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( k4 x8 O; t+ K5 x2 k0 w to_str("in der Andockstation: \"",?.~.name,"\""));& ?: T' c; Q* w* y
else4 {6 c! I- {1 T6 x8 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( t4 {9 [1 D1 I! ?. G5 S to_str("in docking station: \"",?.~.name,"\""));
) E- F$ f8 W- t. N+ H+ L end;
% Y) \4 H% k6 d2 e else
- A) G4 N' h& E4 t @.Destination := assignLObj[1,row];
* q" q G6 b! Y% n end; ! _5 f) W9 q* A3 `. ^
newDirection(@);% z2 X9 p N; Q" o8 r
@.HasOrder := true;+ X4 Z8 t) N9 k" u" u
end;
/ e( P* p2 _/ G! U end;6 Q' C* h9 m9 @' {) U9 q/ e
end; -- of the method/ U$ Q8 s$ [, f: E
|