/* called by: entrance ctrl of the object 'track'. @2 `+ l4 k( [* _
*/
5 f8 i, w' r, k6 F" R1 mis
* v. V5 K3 [; Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 d" p" m: N/ Q8 u5 ]
do
A) ~1 z# o: y4 V Lan := rootfolder.Internal.Tools.AOLlanguage;9 R' M$ J" @- {( Y
if current = @.Destination -- else return8 v; T% T$ A# v, S7 Q) q$ z
then
) ^; U. B4 P. p8 b; p8 y: }# a @.Destination := void;
; x( \ x z4 h8 G8 w* W if @.occupied then
: E2 E% t3 j2 R5 w part := @.cont;) {: W u9 |; k& d9 e8 `
@.transpOrder := void;% b* `, _# D! M$ e* \, N& I5 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" G8 U6 {9 y) i/ j @,root.eventcontroller.simTime);8 J! G5 B% n& M. E2 {" ^4 O. e
@.HasOrder := false;1 Y' l$ k& d1 Z
@.DrivingHome := true;
) U' y5 G4 y1 | rgManager.tryToStartTransOrder;
! q) f7 Z8 M9 J1 M+ o# \ if @.Destination = void! ?/ q" F: D% ?! J) x
then -- no transport order for vehicle @
/ \8 m+ S; x- e. Q7 Z( W' {% t g @.Destination :=' w) Q9 ]8 i7 `1 C! v) B0 ~$ r: M
rgManager.nearestFreeStation(@,track.~);. V( ^) `$ ]+ z7 D. X, e2 d2 B
newDirection(@); # R7 \6 x( ]5 A+ X; q
if @.Destination /= void then: w$ M9 B8 q6 ~& k+ y& H4 N
@.Destination.NumReservation :=
! k6 ]' D8 X R, u% E$ r @.Destination.NumReservation + 1;
s6 I1 K7 J8 J3 t$ M8 _! b# Y end;: _# U/ Y3 J0 n
@.CurrIcon := "drivingHome";
, d! p! w4 v) d6 X @.DrivingHome := true;
* |4 [1 j' G4 O1 ?) p l( h' L/ @ end;
: L! K% \, j9 K. b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! r! q; }* I; ~/ n+ o9 W part := @.transpOrder;
- z# G8 Z" ^0 A' Z9 b t. F part.move(@);-- load part
, N s9 a* t5 n, Z8 X% \) J @.CurrIcon := "load";( z% F9 m8 }/ ]3 V
GlobalDistObj := part.globDestination;
1 o5 v; H7 u8 F' w8 a2 N. Z; i1 \ assignLObj := rgmanager.rgAssignL;
$ c0 ]: y9 T% F& E. e2 D( t row := assignLObj.getRowNo(GlobalDistObj);9 R2 ]' N8 Y: I% R e
if Row = -1 then -- since 70
; T z8 M; f8 w7 n if lan=1 then
( M/ h% Y ]$ S0 Y* @* [) Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ b: G+ A' ?8 `/ t: P. g to_str("in der Andockstation: \"",?.~.name,"\""));7 \3 Y+ S: B& l3 ]+ a9 W
else c# L$ V$ {) v. F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# c: q) h/ n w" w7 q' m) g
to_str("in docking station: \"",?.~.name,"\"")); . F4 `5 ~* s# ]! T. ?+ _; ?; R
end;
9 x$ L; H2 ^% w2 U3 @0 u else
( w* F, C2 v) N# }# k5 |+ ? @.Destination := assignLObj[1,row];/ b. ^% q* [5 m
end;
, b8 z8 R4 C; f/ m2 P# Q& R newDirection(@);
6 n% C6 \: c7 | @.HasOrder := true;# L( ?! j: R. `/ d1 o
end;4 ?4 P, j' d; n; r2 Q
end;2 q* f X: L% `; S# K1 b, a8 k
end; -- of the method3 J( f6 T- h, s. [" B
|