/* called by: entrance ctrl of the object 'track') v% K1 M# {/ w$ \# V4 X
*/& C. k! {$ g6 e# `; `
is1 B( r Z2 o7 t4 l: z( u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% q* b2 R8 R) s7 \& t/ a5 O. rdo
! p7 o6 H" Q* N7 { Lan := rootfolder.Internal.Tools.AOLlanguage;
# e( l4 ?& B2 u5 w if current = @.Destination -- else return
5 Y- ^3 ?7 F( N4 ]! w5 a then W* [) B# w# C& I% {
@.Destination := void;4 w @& x/ j! j* M$ l7 H
if @.occupied then2 j* Z, u2 l% Z% e, z
part := @.cont;
. u# z0 i& i/ \$ w7 P) O q @.transpOrder := void;
" y8 O3 M2 p- x3 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 e8 s) N7 i# v3 X' P
@,root.eventcontroller.simTime);0 e6 G. n/ Y# | T# p# \
@.HasOrder := false;
) [* k9 D7 E. }& R* D. i" P @.DrivingHome := true;
, O; j, Y- x+ g5 {0 j8 e2 N5 {4 A rgManager.tryToStartTransOrder;
! `" P7 M6 U0 C) O9 h% o8 R if @.Destination = void
9 W8 G8 }$ D# r then -- no transport order for vehicle @
& F2 g P- t$ K! C9 r @.Destination :=: w- h$ F! g, G3 P3 r! A* U/ k
rgManager.nearestFreeStation(@,track.~);" I$ ?. E" B& ?3 l1 x/ @" D- @0 W% ^
newDirection(@);
+ ^+ P8 l W9 ~7 }( B/ ] if @.Destination /= void then
$ R4 C1 j' X$ _5 E S @.Destination.NumReservation :=
: Q, u; n" v: i @.Destination.NumReservation + 1;
% i& K3 @ I" R4 } end;0 S$ X3 o( o/ r4 y( U: Q
@.CurrIcon := "drivingHome";- `; I5 w: k. j9 i5 c/ E$ |% C1 ?
@.DrivingHome := true;( J. u! q4 t% P0 [
end;
' a% y( l0 H: ]; D6 M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" D" f u* v3 ~ part := @.transpOrder;0 ?7 Y. c G% H/ R7 l: H
part.move(@);-- load part; ^( Y+ `$ e- P8 J6 i7 S' {: @
@.CurrIcon := "load";
* G7 d, J6 i* m1 Z/ B7 S7 T GlobalDistObj := part.globDestination;
7 T( S0 x4 ~0 A+ H! ?# e assignLObj := rgmanager.rgAssignL;& {$ n3 H3 n; m h& R, i( W
row := assignLObj.getRowNo(GlobalDistObj);! V$ \5 S- ~/ x
if Row = -1 then -- since 70
$ E8 I( C1 f9 f' B: b, O J$ |5 r/ Q if lan=1 then
: C) C1 T" O! z5 S* u" K2 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& v6 E7 W) m7 l# A! I: m
to_str("in der Andockstation: \"",?.~.name,"\""));: [* i' E$ d C- R8 R% s3 \& ~
else
- \% l X7 A" O- R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% g- [; N, Y# c& C8 M$ l to_str("in docking station: \"",?.~.name,"\""));
+ C% h; U4 S Y+ V8 N3 x end;# F4 p' M. H' }) l3 h) H5 b
else% z3 f" ?+ |5 O2 H
@.Destination := assignLObj[1,row];
8 w7 v. N3 p) i0 F+ ~ end; " _; x5 S5 K" S5 \4 |( V( ?0 U7 M
newDirection(@);
' f4 w9 i( H; B8 T# i' r4 Q @.HasOrder := true;
; b2 b, O3 G% ?9 k& K end;! q1 r' I* G4 g3 X
end;
* T6 Z+ o( L7 v7 P0 ?, o+ k6 nend; -- of the method
' D' D% B- s1 K7 A, s |