/* called by: entrance ctrl of the object 'track'
. _3 k& B) D, k*/
( k1 g2 y5 L+ k* P! m3 A2 tis
0 E2 F# k( k. [& p2 k; h part, GlobalDistObj, assignLObj:object;row,Lan:integer;, o; f6 E3 [4 L% F0 I! H* v; r3 ~
do5 T8 X4 P( z$ P2 } `
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 f, h1 P$ K% A1 A% S2 n- t0 X9 Y3 e if current = @.Destination -- else return |4 n8 G( }* S N' P' y6 \
then
! w( N9 r, s0 d' S# u: y, X6 H @.Destination := void;3 O* ?* |% P/ a5 Z
if @.occupied then
; D# f( _) U; w& G3 \- H6 [ part := @.cont;
8 j% I; L4 T) C& b- i @.transpOrder := void;0 Z1 K4 j. h. t. J; e! X4 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 q5 B, J/ ~6 {# f; S @,root.eventcontroller.simTime);
# |( r& u9 Z8 O2 v$ z @.HasOrder := false;
; E9 u) p6 s0 _ @.DrivingHome := true;0 y6 V3 P) i/ E$ R5 P) \% J9 x; \
rgManager.tryToStartTransOrder;
' m! f K/ o& A& `" O if @.Destination = void
}4 { g9 N6 y then -- no transport order for vehicle @4 j: z5 T8 h% L3 U
@.Destination :=
4 [0 _; C* k" P5 E6 Y4 C' s7 p$ z. | rgManager.nearestFreeStation(@,track.~);: W) m. L5 I8 x8 B6 @% ]7 S: n
newDirection(@);
; B0 B( z$ O4 G/ \$ t if @.Destination /= void then2 w; Q+ A# Y, c' D* T4 H, F' B
@.Destination.NumReservation :=
4 L0 U4 ~) ^: b @.Destination.NumReservation + 1;
- L" n# O7 w9 J8 d1 @ end;6 ]! S) D' F6 j1 l5 ^' `- B
@.CurrIcon := "drivingHome";5 U4 R/ q+ z+ M$ ^/ o( z0 l
@.DrivingHome := true;9 ]' s) c3 ~5 ^- s3 {9 Z5 N
end;
# B, e, `3 ]! x" u3 J x else -- the vehicle @ is empty, both vehicle and part are in the same dock station
q* P0 G$ }2 _' a part := @.transpOrder;. N8 G) h) @5 ^7 Q. F5 |
part.move(@);-- load part
) M0 W- {3 x- J9 o7 v8 @ @.CurrIcon := "load";" h; M8 q7 j5 ?% D' E
GlobalDistObj := part.globDestination;, u# Z% h% p8 w4 @
assignLObj := rgmanager.rgAssignL;1 Z6 \% F3 y& O9 k' L
row := assignLObj.getRowNo(GlobalDistObj);
6 H: o2 d, e; l, t- O& w& u if Row = -1 then -- since 705 j, V1 X1 k0 X
if lan=1 then9 k6 V2 v- p6 A5 S; r$ z ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 x, ^, Q2 Q" d to_str("in der Andockstation: \"",?.~.name,"\""));
; d0 o" Z0 n' w, j) c) | else
, v1 z+ \2 Q W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 b! Q) P& K0 \+ b a to_str("in docking station: \"",?.~.name,"\"")); - e% O/ }( m3 Q/ p
end;
( S& j) J3 e, e* t else& n6 w6 _0 C$ O' i+ Y7 ^1 ^
@.Destination := assignLObj[1,row];
9 `+ ~, Y6 Q: `* [4 i end; / \2 P+ p* }$ J! ]
newDirection(@);
' D* f9 E2 X& o6 {# d+ X @.HasOrder := true;
, E& { Z; c/ L; }: S1 h6 \6 S5 f* R end;
! L8 A8 P' D" z- ^. Q- H end;
- x3 b' ^! C9 t( u: v wend; -- of the method4 i0 c7 a5 u+ P8 d
|