/* called by: entrance ctrl of the object 'track'
; L- b) r U" v2 ~8 f& K; \*/
: P, n5 v! p+ W- A0 j, P' Ris
! k" c, [8 M) G8 o% y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 o, T, v9 E" ]do- j! l& u. n p+ a, ]7 N
Lan := rootfolder.Internal.Tools.AOLlanguage;8 O$ x s! `8 d5 ~! C
if current = @.Destination -- else return
9 _5 B/ k8 ~+ n% d7 h; k then) j! `! i- Y% n, y' z# F( L
@.Destination := void;
- ^% ]6 H5 ?: L if @.occupied then
0 i' W" ]# x% | part := @.cont;
3 }& z8 N0 [! L8 }8 v" k( D @.transpOrder := void;
5 r$ K* |- n9 H5 U5 Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: \, I5 S( r5 m @,root.eventcontroller.simTime);
N, E4 h) q& ~" |% U0 x @.HasOrder := false;! V1 x: P5 f6 }) `
@.DrivingHome := true;
; I( G0 ^) x, `- k rgManager.tryToStartTransOrder;
7 Q) `: u0 _4 w- a5 _ if @.Destination = void& }$ {! d* f! w
then -- no transport order for vehicle @+ `! G |7 H- H/ P6 j" w6 F
@.Destination :=
0 g! U! n$ V6 @ rgManager.nearestFreeStation(@,track.~);
, j1 g+ m- Z( c7 F# J8 a newDirection(@); 8 e% A* g" X# |; s G; a) J
if @.Destination /= void then
( G+ B& T+ R3 o& A' K9 T @.Destination.NumReservation :=
/ t+ A; V. Z2 K- ` @.Destination.NumReservation + 1;& D4 M* l' T$ k+ O* [( Z
end;
8 W% u3 I! ^" j5 y @.CurrIcon := "drivingHome";* p) U$ I' o5 O# l
@.DrivingHome := true;
0 b1 s/ e. T: x+ C5 i( B4 r end;
: q/ c2 g7 k6 ?$ p* A: ]% y; N9 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 A e" w! C# @5 K K part := @.transpOrder;$ Q. B( m. R# Q$ ~
part.move(@);-- load part
/ c, b8 `3 U3 f! r: y7 r3 d @.CurrIcon := "load";
7 {- `/ c4 `' Q0 f' p GlobalDistObj := part.globDestination;
3 M% b2 G5 H' r7 K( i assignLObj := rgmanager.rgAssignL;
- |1 ] B* o- U! D" j' | row := assignLObj.getRowNo(GlobalDistObj);0 }! `# U3 z! ` g
if Row = -1 then -- since 70
4 c% o8 ?, Q$ _; Q( k. N: h if lan=1 then
% V3 s. X Z. T& Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: r" o" l V. R6 e
to_str("in der Andockstation: \"",?.~.name,"\""));
( A0 u/ l$ V, {- B: `- o else; q, g" ~; E/ T( N# M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) S$ f# {) z6 M( C( e4 W( ?6 l
to_str("in docking station: \"",?.~.name,"\""));
" y6 ^! j7 D2 b& x3 L7 Y+ }/ h7 G end;4 ^& Q$ L3 t' O% c: O1 p) c
else8 i3 C7 Y9 ^+ T$ |
@.Destination := assignLObj[1,row];7 t& P- F4 c6 N) Q: D
end;
4 X) t5 \! [' b- }; E9 F newDirection(@);
% d1 I7 T4 H/ k; y& C @.HasOrder := true;
9 L2 P( {: \. Y9 u/ ]7 A* A H1 Y" T end;2 |$ B9 C' H- N
end;
. f: u: B! L% Q! U x" Yend; -- of the method
, S# L; a- R4 }1 W |