/* called by: entrance ctrl of the object 'track', v, [1 e( S i
*/
/ c9 z! W, W3 ^0 ~! ]- h3 Iis8 Q# O% Y) E7 E" j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* E" O' X/ l* K: z, o/ T# \* Y% x$ Rdo* V( Z5 v6 _, j! M! O5 l
Lan := rootfolder.Internal.Tools.AOLlanguage;+ ]% V& Z4 _" ]( x; s, G O- O
if current = @.Destination -- else return; K6 F3 f* }! C8 ^- _
then
0 v7 ?4 ]5 e# t5 O8 e& G3 t/ M @.Destination := void;
- Z7 _' e U3 Y if @.occupied then2 K+ `7 J h* X# e
part := @.cont;! w, R& a- A, ~
@.transpOrder := void;9 J, W1 _3 V+ }1 {. F) |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: V/ W7 J( C' r7 |4 \ @,root.eventcontroller.simTime);4 i/ ~ o# q0 j9 L! c. y: x
@.HasOrder := false;
8 ?4 h+ Y7 Y4 G @.DrivingHome := true;
; {. X( Y$ s1 ^' E2 v rgManager.tryToStartTransOrder;
# M% V9 g. R/ u- T: G1 X5 S& \ if @.Destination = void, t9 L" \. r- `, V, h0 v6 |
then -- no transport order for vehicle @: P; A/ v8 `! h5 |# O3 ?: e
@.Destination :=
5 p$ i# \! y* s( R( f2 ] rgManager.nearestFreeStation(@,track.~);( n+ N) f+ y, w+ l( C7 H
newDirection(@);
" B% A' `; g, `' D. A! B' p if @.Destination /= void then
: d( R% ~0 z; b) Y* a% w& z @.Destination.NumReservation :=
" T9 L) N% f# E) n# g4 o @.Destination.NumReservation + 1;+ N9 q" X$ j7 W0 B2 h
end;
# T7 o# E4 k: V2 g4 { @.CurrIcon := "drivingHome";1 g# r1 f) W0 U9 u. ~0 J3 Q. _
@.DrivingHome := true;7 y1 k7 f8 [: @5 k
end;) V- i& J8 J s, O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* @9 O& y$ z/ L. s, S
part := @.transpOrder;' z! ~6 e/ W1 j/ R! L
part.move(@);-- load part
/ V! @6 a. A" l( p8 k2 G; J @.CurrIcon := "load";
1 d8 }5 E2 t0 ] O5 i9 m GlobalDistObj := part.globDestination;
+ E: p% W1 \. L& N assignLObj := rgmanager.rgAssignL;
i; c G2 S5 S$ [- F row := assignLObj.getRowNo(GlobalDistObj);
( r: e, x: R1 H: a& D if Row = -1 then -- since 70
( M; F9 `9 Z7 T; ^: D if lan=1 then
: N V g! c3 ~8 l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- w, U" ?9 U0 g# @9 [9 v to_str("in der Andockstation: \"",?.~.name,"\""));
, p7 \, g( ], T else
5 c" q; A( }% P" o. H0 b5 K# e3 \. q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 N1 \6 j# n! X+ P* I* l* e' ~
to_str("in docking station: \"",?.~.name,"\""));
+ o) H* N' _: G' g/ N6 M0 B. C7 D end;# d X/ i( X, D" a9 K/ Y% G
else
: i9 X+ S# Z7 `0 L @.Destination := assignLObj[1,row];
- |- v8 X3 ]% ?0 K# h! U end;
9 }7 x% w* D2 M' {$ `5 m newDirection(@);% w' a4 t& K3 I/ a2 Z
@.HasOrder := true;
9 u0 _: s7 i' ~; T; _9 l% W end;: t9 [- f3 e0 `0 L3 B
end;% A/ R! y! {5 i1 N3 Z2 b) z5 \
end; -- of the method+ y1 O( E5 P+ D$ K2 ^7 O
|