/* called by: entrance ctrl of the object 'track'
1 m3 i1 H3 _. T8 [*/# X8 V0 m' \9 |+ Y/ \! J" J, m
is
6 M( G) {3 ?% w6 @. p6 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) G8 r# U2 o% \* Mdo
6 B( Q Y$ N" b* A: K Lan := rootfolder.Internal.Tools.AOLlanguage;) _5 k+ ]. K( H) I9 s# H& g& D4 `
if current = @.Destination -- else return
& {% ]& B2 @& `' i H- U# z5 j+ E then
4 X! p F4 i4 G$ J: B9 L9 {: N @.Destination := void;9 V; z( N. U( p; u4 c( J5 S
if @.occupied then
/ E7 C8 v9 {& X; a z# s T part := @.cont;
5 J' f2 }- e9 @ M) K @.transpOrder := void;. D! ?3 g: w- {% C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( \9 X4 p z" t, }- ?& y
@,root.eventcontroller.simTime);; a: [/ L# H0 v1 J: U- i1 ^
@.HasOrder := false;3 ~9 v; C5 g, ?0 ?0 g4 V
@.DrivingHome := true;
. L* X- i5 F7 Q7 N/ C; o* ^ rgManager.tryToStartTransOrder;2 [& s* T+ e; k& V; H; H. a% Z
if @.Destination = void
6 c, ]/ N6 ]1 G; t6 A' v7 U then -- no transport order for vehicle @
; k! V6 G5 L8 P! v @.Destination :=- b3 H q' V( `; a% r
rgManager.nearestFreeStation(@,track.~);' k: C! C' G3 c
newDirection(@); ' ?3 ~- a" M" B
if @.Destination /= void then& |6 `# t: n3 Q* `4 Y
@.Destination.NumReservation :=4 q6 J: d! u9 x$ T- V
@.Destination.NumReservation + 1;( ~7 M8 w: L, I4 g8 s
end;
, C8 u% P- A( ?/ i7 |% T3 J @.CurrIcon := "drivingHome";
7 g2 o) Z5 G5 q* [& b; g @.DrivingHome := true;
( A" s- a5 ^/ V: R end;1 m, L9 e4 Q5 \ L- j- Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. M9 Q, d4 S3 ^, D5 { part := @.transpOrder;
/ D, [6 o! F5 Y! `% k G: p part.move(@);-- load part
7 B# N9 @6 x3 f5 ? @.CurrIcon := "load";: C! k ?2 }5 o! T: a
GlobalDistObj := part.globDestination;9 k5 O3 @4 _2 F9 s- j9 U& h. K
assignLObj := rgmanager.rgAssignL;
. R& f2 t& F2 J0 L7 _ row := assignLObj.getRowNo(GlobalDistObj);
9 M- P( r1 `9 ]) ] C2 ?* { if Row = -1 then -- since 70# R# f- |" \2 h. C9 _
if lan=1 then
0 x" t8 ]+ H) L5 W* C6 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& s1 m$ H$ h. j2 x
to_str("in der Andockstation: \"",?.~.name,"\""));
2 G% J/ K, M' n* d else" z7 f5 g9 S. v+ W d( v9 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( w6 N2 G+ y+ s5 e6 j" W" b to_str("in docking station: \"",?.~.name,"\"")); 9 f8 N! n) K* }; g L
end;$ Q3 B" J6 r% w( n( a
else- K: D9 s! m4 X
@.Destination := assignLObj[1,row];1 Z: t/ d% ^9 ^9 a) ^" M8 R* T+ i
end;
* o1 @) L% X5 K5 R9 t# k newDirection(@);6 t; b. U( L6 Y) [7 k
@.HasOrder := true;
4 Q/ ` D! ~) e6 J( T0 D( M end;
- ~# s% V, ?3 L: B! ]8 N end;( l* r8 A* o( f- K# m1 q. Q Y! K" l6 a
end; -- of the method, K9 }+ V( i) ^8 M
|