/* called by: entrance ctrl of the object 'track'8 g- J; ^! C! M; z$ g/ C
*/
- m% ~; s! M+ I8 _/ ^is* M& L3 F7 b( f8 e6 @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' ?3 F' q: Z$ b5 ~2 M8 q4 z7 Kdo
. p- J& L- d5 u" Y/ f( U0 z/ a Lan := rootfolder.Internal.Tools.AOLlanguage;+ G$ G g# i \; ^& V
if current = @.Destination -- else return: Y6 D+ i' ~" ^$ f& y0 L9 B
then* y& P% l4 \- r
@.Destination := void;
& r, f# A* @0 Q/ p if @.occupied then$ t& t P0 W% ^) z0 s
part := @.cont;+ R; B3 r) l0 @/ q% k1 \1 K- Y
@.transpOrder := void;
; H' |9 s8 I6 k( e- V8 Q9 a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: Z- |; m1 N) ^7 l7 _/ S
@,root.eventcontroller.simTime);
, ]1 h4 [2 V8 f! ^7 Y @.HasOrder := false;2 ~ P% ~/ t7 L
@.DrivingHome := true;
6 ~: U9 n+ @7 G rgManager.tryToStartTransOrder;
5 d, v: ?3 o' F1 A if @.Destination = void* h& i. |) P) t/ J8 G$ q( s7 P
then -- no transport order for vehicle @
7 H6 N8 z- e" K @.Destination :=2 L6 r6 J# K: @3 e
rgManager.nearestFreeStation(@,track.~);) N) d/ N! L! ~" A# `6 h e* N
newDirection(@); * N+ k2 E8 x! A6 j- L
if @.Destination /= void then
3 R! d$ I6 `4 v0 S1 G' o7 f7 O# C1 [ @.Destination.NumReservation :=6 w# } g. A: E4 S
@.Destination.NumReservation + 1;
& r0 ^$ i \' d* W end; W8 Z. [" J, R9 ?( R
@.CurrIcon := "drivingHome";
+ e/ e F7 ~" e8 |8 T) V8 D @.DrivingHome := true;! [4 q! L9 h8 L1 f5 b) @# \" Q
end;( s$ |) M- l3 g1 y. [' J: p% A) ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ M' x4 ]8 b: e9 `
part := @.transpOrder;5 Y0 T2 ]! h' |! P
part.move(@);-- load part
. J% n+ s4 {0 f2 d- T) d) D% p2 ? @.CurrIcon := "load";4 M9 i! K- b0 z5 L1 c) w
GlobalDistObj := part.globDestination;
3 X4 U6 _* p2 ?& p, J c assignLObj := rgmanager.rgAssignL;( H: j8 S! }+ p, e1 m& j
row := assignLObj.getRowNo(GlobalDistObj);
3 C2 w" a; U0 {2 _ if Row = -1 then -- since 70; n% U8 m0 N+ W0 K" e+ Z% J
if lan=1 then
* c- h: I! M" k7 d, v0 d% o3 Q4 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," Y6 G+ n1 X- e( i' Z
to_str("in der Andockstation: \"",?.~.name,"\""));
% _% U* X* T5 E8 ^ else
, I6 G6 ^# h6 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ R, w6 d2 V: g7 o2 }) v0 a to_str("in docking station: \"",?.~.name,"\"")); * y6 f( J f$ Z' [+ I
end;4 |. ^- @$ [$ i6 L* M% g
else! o" F* w M0 Y2 k
@.Destination := assignLObj[1,row];1 ]- i; `. @- r8 ^/ h/ C
end; , N/ p7 r4 f" s8 \; [
newDirection(@);' F h/ o1 a/ G7 M+ v
@.HasOrder := true;
) e! u! m$ R0 [# A end;
+ J( C+ g% o% d) m3 r: o end;7 M& q; s; o: ?$ N- P# H
end; -- of the method9 \/ V& T. r4 a$ x
|