/* called by: entrance ctrl of the object 'track'0 U" \5 O) \9 X Q+ p* y& L2 r% N
*/8 `/ w! Z. T( C5 d: \
is7 b2 U0 H) e* ^) c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 M4 f- J4 E* S( \) |; v
do4 o v, d8 ^6 R w8 w
Lan := rootfolder.Internal.Tools.AOLlanguage;! i2 Z4 u k3 { h
if current = @.Destination -- else return; [" u7 B3 y; F
then7 d4 T% F2 z$ U; m5 {0 q
@.Destination := void;
3 q: }. R p3 G% Q: G if @.occupied then$ ?) K& d/ s! e5 r! i# Q d2 }
part := @.cont;% i) X1 `* z& o
@.transpOrder := void;' e6 q6 k3 C* E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ s6 t2 w5 D( `( K- @* T a) [
@,root.eventcontroller.simTime);5 T0 F0 L! v. D$ H8 {4 ]; k! i
@.HasOrder := false;
! ?( w1 h. z; ^# R/ Q) y @.DrivingHome := true;- w X8 A d" M) L$ b8 f
rgManager.tryToStartTransOrder;/ L8 v. y5 Z! Y; ?+ a3 i9 M2 r
if @.Destination = void# _, Q& E- q) b: J
then -- no transport order for vehicle @
% j. X, @9 E$ P! H4 H @.Destination :=7 w6 o" X) K5 y8 A( |5 w
rgManager.nearestFreeStation(@,track.~);
, b% }' _' u- L, r) @$ z newDirection(@); 5 L4 j8 K3 ?& j, D: A7 V* h4 k
if @.Destination /= void then
6 P# o/ p. z. B& N9 F* l @.Destination.NumReservation :=2 g _/ G3 F/ H5 j- S
@.Destination.NumReservation + 1;
. \3 U4 F9 k3 }! b& Z% j5 L" ?! p. N end;: ^2 h+ p7 b" K
@.CurrIcon := "drivingHome";
0 H( e( J- [6 K! q: ~ @.DrivingHome := true;
( O: }2 v+ Y4 Z6 Q end;$ I; h- p( C5 J: v2 o$ P3 k/ C; i/ A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" Z5 A% L* J8 f
part := @.transpOrder;; ?0 ]' F. L: _4 {/ i
part.move(@);-- load part
1 d3 ]/ B: J7 W: k @.CurrIcon := "load";
8 r! q7 I: @, j, N0 a; M GlobalDistObj := part.globDestination;' g; s3 b& C, W) W" K: B. c
assignLObj := rgmanager.rgAssignL;4 A4 a% @; z& { ]
row := assignLObj.getRowNo(GlobalDistObj);* E& y5 v& O0 B* Z) b' u1 N
if Row = -1 then -- since 70$ N0 \- e" F; b7 w7 k' l7 J
if lan=1 then
( `9 y7 U$ e- g) ^7 Y% B9 ^8 M' V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! \2 |8 b) k3 c to_str("in der Andockstation: \"",?.~.name,"\""));. E% t" P2 s" D2 ]2 b+ M
else
- h% v% n8 t! k% D& v0 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) L# }- f2 R/ K, h* T$ Q to_str("in docking station: \"",?.~.name,"\""));
2 d- |) p$ n/ u: L5 z" p" X end;+ D) x4 t: O, U2 D4 v1 c' L6 }
else# \. `1 ^0 [2 R$ p# K. y
@.Destination := assignLObj[1,row];
& e6 Y" ~6 t M) d end;
: t; l5 t. z# Q/ n+ s7 [ newDirection(@);' y( H! X/ x+ V1 v0 T
@.HasOrder := true;( y* ~+ X1 p7 G4 J6 l( o, N9 a
end;
* X0 z- K! E+ A1 d# w! l1 K* I end;- m; U8 E O$ L* ]/ M
end; -- of the method1 ?3 z& t* b3 T, ?1 ]" i' k
|