/* called by: entrance ctrl of the object 'track'
1 F7 ]6 I7 e: {5 F3 ?; ^$ p*/
9 w0 @- S9 X7 \9 D: n# d4 w/ e( fis% ^/ Z9 T) p9 i( _. x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& v7 p# [ t* i$ r6 Bdo
+ C2 |: h! r" \ Lan := rootfolder.Internal.Tools.AOLlanguage;
) f! `7 F8 L8 R1 ^& G if current = @.Destination -- else return# ?/ F& A5 R0 x
then
. p: A9 S) m1 y/ `' ?- [' Y7 M( N @.Destination := void;
! q( {) i F. D) L1 V if @.occupied then
7 @0 ?+ |2 K4 P( {1 w) @( S. a' G: ? C part := @.cont;, v$ f4 Y7 ?1 V9 _- \
@.transpOrder := void;: y' T7 u- v$ ^8 d/ ~8 u) ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' J( p& C1 y+ N h; `5 H
@,root.eventcontroller.simTime);3 ~+ A' |* g+ _; B9 T
@.HasOrder := false;
. ?8 b4 g; t# @, \ @.DrivingHome := true; D- w3 J9 Z: i7 |
rgManager.tryToStartTransOrder;
& c0 _4 n! B; Y4 x if @.Destination = void
2 h9 w" G4 F1 \+ F& z9 I then -- no transport order for vehicle @* R1 S' q& j; E" p* y8 g
@.Destination :=
, ]& K6 L* @+ A' | n- d rgManager.nearestFreeStation(@,track.~);, J: }0 V- _3 z8 |* G
newDirection(@);
6 B$ i$ g( ~+ V5 b if @.Destination /= void then
3 x/ N, F- x& [* p D @.Destination.NumReservation :=
# G( F# |7 g: N8 [ @.Destination.NumReservation + 1; P/ r+ V$ L7 A" p" L
end;/ C. d8 }2 m$ I( G$ \, @
@.CurrIcon := "drivingHome";; c. l F2 q0 u$ [0 X/ u
@.DrivingHome := true;/ Z% B! _# }; S
end;5 r( T/ W1 Y. j5 Z d1 T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 i y4 l* \ ?! K
part := @.transpOrder;
4 P" P8 k) t0 l* G9 L1 h part.move(@);-- load part5 C1 F- F% q; X6 X. C
@.CurrIcon := "load";1 ~# S. H( M8 T6 S9 t
GlobalDistObj := part.globDestination;
c) U( J# i# e- |6 H6 K2 Y assignLObj := rgmanager.rgAssignL;
6 I! g' h% A( s9 D: X row := assignLObj.getRowNo(GlobalDistObj);
5 R D, G; W: B0 j if Row = -1 then -- since 706 F6 J4 O, l! O- w
if lan=1 then% X8 |# \/ l0 f- J$ i0 X! B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 A. A0 v; O, |5 c6 z to_str("in der Andockstation: \"",?.~.name,"\""));: m' ]$ k4 y' G! |
else5 r: B2 t8 P' O* Y# p: ^$ G' J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 f, @* d/ g6 W4 }9 z1 _9 p5 ] to_str("in docking station: \"",?.~.name,"\""));
& F1 t' Z! @9 B end;. w0 V9 x" g% r* ]+ ~5 M! q* g
else Y" g& ]: B7 k" {2 d0 a- w, D
@.Destination := assignLObj[1,row];
# q8 h' o9 i4 g C, ? end; 5 C$ `( d& Z' ]8 J
newDirection(@);. u0 `3 w# k3 \( Q0 H: n$ z/ v4 j
@.HasOrder := true;/ L1 g. d3 L& \# x
end;" `& r! ]+ u1 I! i
end;
) x& {) E. v5 @8 e9 c1 j3 r" Kend; -- of the method
( j. W ?0 J0 j, P |