/* called by: entrance ctrl of the object 'track'/ J8 b( A' Z4 u$ j! e2 K
*/
; P4 [' l8 t, O6 l3 b* |8 pis6 z9 f3 e6 v6 W1 I* S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. ?& |4 y# }9 k( U# H8 `9 H6 ido& v" p. w8 u( ?: V
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 d$ _, l( e3 r* I. \ if current = @.Destination -- else return
- K. C3 K6 {) U: v) q* [8 j then- O) n& Q# A: {' p7 Q+ s A" P
@.Destination := void;
+ P5 i- s4 U9 A' I' t/ J& V, r if @.occupied then r4 n+ f( F- F- T4 [
part := @.cont;
) x/ q5 U z; z! j @.transpOrder := void; W G8 S( t% f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ X& g' a2 m% \! ]! H; ~3 V. W
@,root.eventcontroller.simTime);
; }! S1 e0 Z3 a @.HasOrder := false;
# }( A# b! F0 [+ L @.DrivingHome := true;& f- P7 {( \! L s2 P* `( j
rgManager.tryToStartTransOrder;% ?- p% l/ E! v* [# w( H. `: I/ ~
if @.Destination = void( {* C2 u4 }8 @8 o5 m0 S) I2 `
then -- no transport order for vehicle @9 q% ^/ l; O5 U; R" o9 O
@.Destination :=; w+ |) I% M8 F0 x; C3 F# Y# i
rgManager.nearestFreeStation(@,track.~);# R7 n7 d0 T# Q
newDirection(@); , L% L4 G( p* t% ~' Q
if @.Destination /= void then
4 E% @" Q2 g& {+ A0 L( A4 T1 o. p @.Destination.NumReservation :=
! C; N/ u" g' M @.Destination.NumReservation + 1;
) u& {2 Q2 ]. ^7 | end;
. h6 k1 z* \6 m# }9 A/ z) ` @.CurrIcon := "drivingHome";
6 S$ a( B: F+ @: D# A @.DrivingHome := true;& w2 P" W9 S% g/ ~ u
end;/ y3 l$ s. w9 R" z- R" E7 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ }+ W4 Z3 }; I part := @.transpOrder;: k1 y/ [8 C8 J7 J% Y% H1 y7 U$ M
part.move(@);-- load part
3 A9 U, \! P) @, b Y& I @.CurrIcon := "load";9 r+ r9 n) Y1 @. y4 X
GlobalDistObj := part.globDestination;: d+ Q4 L" j7 p1 f6 m
assignLObj := rgmanager.rgAssignL;+ f; J$ ?8 \* l
row := assignLObj.getRowNo(GlobalDistObj);
1 t" A( w0 x) ` if Row = -1 then -- since 70
3 @& t- U& ]. Q' U/ x! ~ if lan=1 then
; {; E, l1 X% P, z+ Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) ~+ Z3 |6 }. k! E0 p& z$ W6 s
to_str("in der Andockstation: \"",?.~.name,"\""));+ A% `/ L' h: t; ^! n" H, A
else
- ^( G2 p! o* o5 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
y$ }. R8 Y0 j9 z! s9 r2 `+ J to_str("in docking station: \"",?.~.name,"\""));
$ z% {( x2 ^1 ~2 G* C. a7 R$ T end;6 ~" M' ?9 Z+ P: [$ k7 Y
else6 Q* n* d0 b1 ^% \) i6 C' Y
@.Destination := assignLObj[1,row];$ f! d6 H) M2 O) t( D" P# A
end; * T( Y8 Q5 L: C* H' i$ `# y( P
newDirection(@);0 p$ v3 A: k0 j& |% G! [5 X
@.HasOrder := true;. W( f) W# {+ c8 A$ w* M
end;
Y" G# z( ]1 z0 w5 I. ^2 G2 h end; i. ]! w- K4 M. k+ `- v
end; -- of the method/ V! N. K9 J/ M' V D; H! n! a: U
|