/* called by: entrance ctrl of the object 'track'
* g7 R. }3 ~- J*/7 ]" O7 D9 l! E+ V7 j
is: i& z8 ^% V; Y3 |( t# y5 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
i4 ^/ P! c$ G% [$ Y, _do/ F# y- S2 o6 T; ]/ E$ i7 \
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 T R" V( ~& x' V: W/ e if current = @.Destination -- else return
7 n/ l) f( t/ D then
$ v$ D; G, \6 h9 I1 B0 E @.Destination := void;) `4 P. V" c( D0 V; g9 c1 W1 K
if @.occupied then
. I5 F3 l' T9 P# i part := @.cont;
y7 G9 x8 {4 T% f, c x @.transpOrder := void;7 B: z# l: n6 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 T- P. l, i- Y9 R% R @,root.eventcontroller.simTime);' ` |5 c& u) \9 H3 D
@.HasOrder := false;
" b; C, k( y9 s/ f! R1 Q5 } @.DrivingHome := true;
. F9 T9 x5 ]0 u rgManager.tryToStartTransOrder;
+ e3 n' Z- C% _ if @.Destination = void' C% W+ M) {3 a6 s( W$ Z7 u
then -- no transport order for vehicle @
& `# J0 S( v% n U# `2 h3 R @.Destination :=& b8 \$ i% q$ }3 m w \
rgManager.nearestFreeStation(@,track.~);
% Y) k8 K* j% F# b3 |$ `: F$ M; d8 [ newDirection(@);
' W' r, V X& Q. w% ~6 t i if @.Destination /= void then
' {' g1 Q H' p4 X$ i# x4 C- M @.Destination.NumReservation :=5 S& d; B; b. E) K
@.Destination.NumReservation + 1;
" [- G/ @# d1 H$ `$ Q1 w x end;
) ^5 }5 j7 l* y8 s0 } @.CurrIcon := "drivingHome";
" N, e4 Q" Z& \+ x: c, z' A$ X @.DrivingHome := true;) E. s1 c& _) e7 j4 u
end;
- z7 R% r; o3 C2 x9 ^! Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station& d8 D0 U, q6 Y" O* q# x
part := @.transpOrder;
$ U$ o. u1 V Y( o. Y" T part.move(@);-- load part
* m3 d* h2 s C* w @.CurrIcon := "load";# z& @ A* q6 b4 P( q/ M5 R
GlobalDistObj := part.globDestination;
4 L, P" O# q5 I W6 G, m assignLObj := rgmanager.rgAssignL;) ~' }' z- H9 E, t$ ]
row := assignLObj.getRowNo(GlobalDistObj);
- m! ?: \7 H: Q. G7 m, ^' K if Row = -1 then -- since 70
+ ^% ~$ }; Y0 o. J% ^6 `: D$ }$ |! V& ~ if lan=1 then2 D/ C8 w* P% {2 [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
H" l6 @. e0 K' p+ N3 w9 p/ x5 r to_str("in der Andockstation: \"",?.~.name,"\""));
6 |! @ _: M- l& U9 F5 O1 U3 D' F else( X8 Y4 t* F+ R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) E' ?- n* l; |( y- K
to_str("in docking station: \"",?.~.name,"\""));
0 i. p6 g/ B- q0 I: {, d end;! i3 s$ V8 `. w" {" o& S" n5 [& l
else
8 L8 X7 x: W& T7 x) \& z @.Destination := assignLObj[1,row];4 g1 v9 w* \6 J, V4 F/ u
end; 4 F* X$ k! P: g3 l
newDirection(@);: ]1 ^) n% c" _ t
@.HasOrder := true;$ ~* G2 r/ H" W$ u! n* Y
end;0 k# |- k; t1 Z5 Z4 E
end;. C2 g+ D$ N0 C" A$ ^( ]0 g3 t/ }
end; -- of the method; `$ F/ c9 c' |8 n/ S' F
|