/* called by: entrance ctrl of the object 'track'
2 J( U$ ]+ B2 f/ _*/
, o$ ]! z/ l: H/ ris
: a8 a# M# u5 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 ?) m; ~- ] ?4 e/ ^do7 n! b7 u; b3 ~7 V, J- Z5 X
Lan := rootfolder.Internal.Tools.AOLlanguage;' a& z+ P7 i: |/ x8 {* |" E+ o+ j
if current = @.Destination -- else return
* g! D) M+ W, P" E then
4 z! x0 i6 I, g6 H& w" v) u) Q4 r1 } @.Destination := void;
+ J1 v; } M& z# `/ b3 ^ if @.occupied then
8 [! {$ s8 D+ ?( h$ Y5 G2 v' l2 { part := @.cont;2 P# Y5 b }: R- G3 Y( c1 W
@.transpOrder := void;6 f/ l# b2 ~4 M) I9 u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 R$ j# ?3 I7 [' b1 P, B @,root.eventcontroller.simTime);3 `3 ]; l( p- Z- J; {9 C, ~
@.HasOrder := false;$ h& U8 N8 x& G, S! P
@.DrivingHome := true;
$ C, B, q6 N! R v/ } rgManager.tryToStartTransOrder;% O( a+ f' q7 J$ U' b4 [
if @.Destination = void
% \- K% V( s( w a, n* \% l, [! j then -- no transport order for vehicle @8 \' W* c6 H1 [4 F& }- ~3 }
@.Destination :=
4 K" c9 F0 d( U rgManager.nearestFreeStation(@,track.~);
! _) y7 s: D9 u newDirection(@); ! U3 O% s9 |* T9 G5 `
if @.Destination /= void then
0 A: L2 _' w+ F) V9 y7 ? @.Destination.NumReservation :=
9 B( ^0 E q W1 g @.Destination.NumReservation + 1; {) F$ ]; M& P$ N) K
end;0 Q/ ?' Z! ?2 A( k
@.CurrIcon := "drivingHome";- @. U: T: q* [) Q
@.DrivingHome := true;
- S7 J0 M% ] a1 Q) q) ]. l4 T; s$ E end;& M. }* i/ n/ F6 a* E* u3 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ j( N8 d7 J" C0 b! G9 [ part := @.transpOrder;% X1 q- X+ |7 p! N, i3 O
part.move(@);-- load part! l. {+ e y7 x9 m! ^
@.CurrIcon := "load";
9 u) S6 N* c3 Y8 {) }2 b9 w, x GlobalDistObj := part.globDestination;
$ s& i% t* f5 r" s) w assignLObj := rgmanager.rgAssignL;8 O \$ w% Q% b) t% {3 M) c; d
row := assignLObj.getRowNo(GlobalDistObj);
9 Z- {8 u& F: X, h if Row = -1 then -- since 70
3 W7 T9 Y6 s0 n* E( T$ w" Z- N+ n* H if lan=1 then
/ r D7 Q1 O. T/ H# ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: q& e3 }( J, M+ u4 @6 O6 F3 p to_str("in der Andockstation: \"",?.~.name,"\""));( N* g- m( P$ g9 a) m- r
else( R$ Q# m0 O H5 j, X$ f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 q8 u- Y% q A6 w
to_str("in docking station: \"",?.~.name,"\""));
# L5 z6 o! R* `5 t. Y# e1 y end;' Y8 S/ k5 t+ H3 m9 G% l
else
, ?6 y& A" q) F: L6 o8 ?" M" B @.Destination := assignLObj[1,row];4 l/ T$ j+ @2 x" u. s
end; " O- x8 J' c. B1 Y$ @( J
newDirection(@);/ v/ i5 b2 `6 G5 }8 V ^
@.HasOrder := true;
2 B0 Q: e; ^6 n0 g" c; e end;9 @& N0 r( j2 k+ g2 t1 ?2 w1 c! N
end;
6 [( R* x7 I; a" {- T7 jend; -- of the method2 C) z% ~/ j# D! y0 Q5 l' `! A
|