/* called by: entrance ctrl of the object 'track'1 H8 q1 L/ ?# L4 Z
*/& S) O& |: g+ n0 a
is8 ]% m$ b: O5 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) v f# g: u& ^; ndo
Y6 @; P, R; f% d Lan := rootfolder.Internal.Tools.AOLlanguage;. Z, f1 ^# M% O$ A( P6 V3 f3 b
if current = @.Destination -- else return) G: J3 ~: z' X9 |8 A2 J8 k2 V
then
# A9 ^0 ?: k$ F0 u# t; C$ x S @.Destination := void;2 g& O' `7 c2 @8 G) A) `# n
if @.occupied then
8 F' w4 O) t; e( _$ f part := @.cont;& [2 G9 v! c9 h! Q) s
@.transpOrder := void;
0 S0 Q6 D, r! c% @: W( Z2 K6 r$ ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: A& \- \2 k0 M$ @
@,root.eventcontroller.simTime);
0 K! G. {% a3 n. W$ @ @.HasOrder := false;
. L4 O' V8 M. j* S @.DrivingHome := true; b' _ f) m' f1 l2 e& q
rgManager.tryToStartTransOrder;
1 A7 H* C- y* ~# l; M9 Y if @.Destination = void8 f' O6 ~3 @7 P6 u) N, U
then -- no transport order for vehicle @
, l0 }9 Y0 R& H5 U9 H @.Destination :=
! B" n2 o( j3 B1 C; | rgManager.nearestFreeStation(@,track.~);8 ^6 F: E) w( t7 v8 j8 j
newDirection(@);
/ _8 b4 i" [) t1 B- }6 p8 |! E2 d if @.Destination /= void then0 ?8 L* w6 M7 B" _0 V
@.Destination.NumReservation :=8 [5 c6 p% L9 V j
@.Destination.NumReservation + 1;
$ i: `1 u' \+ n4 Q# m8 J$ R) v end;3 l# ?, @9 {, ?" U' P8 \( Y9 J5 y
@.CurrIcon := "drivingHome";6 f9 w3 ?, t' D
@.DrivingHome := true;
! O! O* ^# }2 Z2 B, J$ a end;
% R* B; }( G" G# [$ g% N else -- the vehicle @ is empty, both vehicle and part are in the same dock station; k, R4 V! M) d2 `
part := @.transpOrder;% u5 z6 t3 {$ o# @3 L, o
part.move(@);-- load part& l2 V8 q/ o1 r% M
@.CurrIcon := "load";5 X* G& b# [. t( {
GlobalDistObj := part.globDestination;
* T. w! r; x" r4 M6 ?7 X& W assignLObj := rgmanager.rgAssignL;
9 n8 V0 r8 y ?$ }) w row := assignLObj.getRowNo(GlobalDistObj);
+ h6 ~ Q! x* M2 H if Row = -1 then -- since 70! u7 L, ^0 \6 M3 P% m, F7 F0 {
if lan=1 then# T5 ^) a, X) k. T, S0 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 W, [6 d( w7 U! K [
to_str("in der Andockstation: \"",?.~.name,"\""));
; q: @- S* _3 E" `" B @ else
2 U3 }* M8 G; _& p U* W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ \3 ?0 r! ]9 ] w' h: S& _ to_str("in docking station: \"",?.~.name,"\"")); : \$ l' Z& o8 C# W
end;
3 C/ r0 d7 Q# W" W6 r) {* _ else4 N! I5 ]8 C% b& E$ z' G# b0 e! Q; s
@.Destination := assignLObj[1,row];6 g7 i- E1 P( X n( m, @1 i. }* A; v
end; % h9 M7 Y. a& ?: a9 I+ x
newDirection(@);- ~2 e9 V7 v6 @3 d
@.HasOrder := true;2 e- [0 z+ U; D7 V
end;! a9 p' W+ e0 h5 J( a v4 b# ^: f* g
end;
" F" m* @ `1 ~: I, C5 vend; -- of the method9 g6 L$ Z7 K+ v2 }
|