/* called by: entrance ctrl of the object 'track'
, o% \+ ^3 Z! ?* q% l*/! Y; X/ d* B1 _8 J
is! Z6 @, G* }- F" E& k8 v4 S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) e! t) w7 Z4 |
do% b2 R7 O" l/ X, z8 j+ _
Lan := rootfolder.Internal.Tools.AOLlanguage;; t: |$ U3 l, g9 y
if current = @.Destination -- else return) e" M u; M Y$ x2 T% E4 L. X
then. B! M+ }; \) _8 R6 ~8 J) q
@.Destination := void;, {" M- @7 u, A( |. ]; {; Z; ?
if @.occupied then
/ e+ C0 P1 u$ f9 ^& H) ?! h part := @.cont;
. D; Z/ D7 W+ J% v7 ~0 K @.transpOrder := void;
. s! h% O2 I5 b7 `0 Q* E. y& h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 M4 W) n$ e" a* \0 p @,root.eventcontroller.simTime);2 E7 ^( A4 s+ J, m& Z* u) {) S) a" y
@.HasOrder := false;
+ R, T1 {! M0 C/ u. P3 D @.DrivingHome := true;; P. ?4 H1 }) E9 r
rgManager.tryToStartTransOrder;
- d- ? c w O# ^+ i+ j if @.Destination = void0 n8 D8 f4 v/ E% ?6 U9 `2 H. V
then -- no transport order for vehicle @% E8 V z- u; r: O: O( w5 m: H
@.Destination :=& `: `! t) P; t P" r; r5 J
rgManager.nearestFreeStation(@,track.~);
* n. f5 g; o8 q; g newDirection(@); + J5 ?3 C1 z/ h- u: l
if @.Destination /= void then
1 G- [7 n \3 o* h9 O, f @.Destination.NumReservation :=
4 @; H* {9 g' M @.Destination.NumReservation + 1;
3 g% r {5 P( ^- _ end;
) d/ s. h/ q D9 N5 m* u @.CurrIcon := "drivingHome";
1 n% V+ J/ j$ y% E9 x; ^ @.DrivingHome := true;1 \* T4 e8 C+ |
end;% K7 E3 y5 P+ `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 g; P! \& v4 Q% l6 F) B3 }2 g( Y
part := @.transpOrder;
# M0 Y- v+ v% j part.move(@);-- load part
* p2 B. t* A. e( F @.CurrIcon := "load";: Q* \- J) d7 I5 X. g6 \
GlobalDistObj := part.globDestination;% |- A- W0 m' Z/ _/ f
assignLObj := rgmanager.rgAssignL;
7 M- m" Z9 L4 c" L+ L row := assignLObj.getRowNo(GlobalDistObj);
5 Z* a6 i6 R5 A* ` if Row = -1 then -- since 704 i7 W5 ]9 O( r
if lan=1 then# o/ Y9 m0 L" @. X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* t A% i* A1 i* S: X# s to_str("in der Andockstation: \"",?.~.name,"\""));
' j: e6 ~8 M) l5 D else7 d) P6 Q: c5 c! t( l8 O* D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ S+ z F f4 B- D* G+ q to_str("in docking station: \"",?.~.name,"\""));
/ [6 D. F2 r* \- X end;
- O7 O. p- W2 S# [" D else
R5 N- ?4 x2 L0 t# @, U @.Destination := assignLObj[1,row];
" g5 `. s0 y+ R end;
. c5 C* M6 d8 [- J/ H newDirection(@);
( q- T+ A4 b" x& H7 f* ] @.HasOrder := true;
- ~5 ], h' {2 U/ h E, K3 ~ end;
6 t% V5 z5 {( K6 E- ^3 ^0 a end; H9 F$ b1 x7 K1 q+ p2 u! z4 j
end; -- of the method* @9 H1 h. B: N; u% J
|