/* called by: entrance ctrl of the object 'track'& Y3 K: E4 V; t6 y9 u
*/" x: b8 `# U- v z# B \
is$ B1 s7 V4 Y" r- C$ r& _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ]" M% {7 a+ y+ m
do
9 _2 q$ [( u, ]2 Y Lan := rootfolder.Internal.Tools.AOLlanguage;
2 g7 ~5 T8 U$ M; w/ Y' X if current = @.Destination -- else return; B% I: T0 U1 @! L! M8 s! P% e
then9 M& W6 }) \3 k j& t$ Q4 l
@.Destination := void;
' T+ b, \ A; N if @.occupied then! \; |- n `3 P/ k' G
part := @.cont;4 O6 d3 v# [ L4 C8 k
@.transpOrder := void;
) b. g- G9 o( V. S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* h) L3 i- Q& y/ }( b+ c+ i
@,root.eventcontroller.simTime);( u8 \: f U3 ?# }
@.HasOrder := false;
; H) M0 A, q$ r0 s @.DrivingHome := true;$ M' w. X) P' G) g4 E
rgManager.tryToStartTransOrder;
) D- N# L( L0 Y9 ? if @.Destination = void
+ l4 g& q) U5 d+ W3 F' W% Q9 u then -- no transport order for vehicle @8 Q! F1 _, Z1 n- `3 N; A3 I
@.Destination :=% }0 X/ Q) B3 R+ P$ V o. o" D
rgManager.nearestFreeStation(@,track.~);
0 l' M! {# d# B, \4 m. \! d newDirection(@); + ]6 g, }) _" B5 R+ X% S
if @.Destination /= void then, a7 ~; `# A5 a8 z3 V
@.Destination.NumReservation :=- `& u$ R6 C, |+ A1 \! i; T% H" S) L
@.Destination.NumReservation + 1;: p' t5 v- |! }. x
end;1 F/ B0 c) @/ M7 n# Y, j, t
@.CurrIcon := "drivingHome";
' n5 J5 t, @0 j1 U5 _/ A" d+ `) S0 _ @.DrivingHome := true;# ~6 y: s, w% C
end;
! i; G% f" Q' |& r) m5 l6 t3 E" @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( l E% r+ b6 S# y" p part := @.transpOrder;+ U/ X, t9 l& ^) e; g
part.move(@);-- load part
% o/ [7 ?( R! Z: b% O3 w @.CurrIcon := "load";, T C' b0 O9 f2 h8 t
GlobalDistObj := part.globDestination;
6 L$ m; s7 H' F& A$ s1 W assignLObj := rgmanager.rgAssignL;+ l Y" g+ y7 [. o$ G( l
row := assignLObj.getRowNo(GlobalDistObj);
) O( }) ~! m2 B h if Row = -1 then -- since 706 i; ~# n. E& f! m7 I8 x4 b+ C
if lan=1 then
4 Q1 m7 B: ]0 {8 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; q1 R1 |4 a f8 o" v
to_str("in der Andockstation: \"",?.~.name,"\""));
* g1 o! x/ z0 O! _7 w5 @ else) m: J4 V: W% [( Z0 W1 i) d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) t0 K& u i K to_str("in docking station: \"",?.~.name,"\""));
6 W1 h- ^+ ` w" b. k end;+ n! Q) ~7 \8 J* T: f. g
else# e- R+ g1 H6 k1 N9 g
@.Destination := assignLObj[1,row];& M' Z0 v. ~# K. i% @
end; * T# n$ \* S& u7 }# Y- f4 d, g! ~
newDirection(@);
1 g3 m5 D# E5 ^( g# D' }3 R7 Z @.HasOrder := true;7 _. |: A1 t/ q" f; ^8 n, V
end;2 k V& k2 {$ r" \. {4 R8 {; C
end;' k$ d- U" G% E" I
end; -- of the method# B, d2 |0 |. ?9 n& {+ L. U
|