/* called by: entrance ctrl of the object 'track'3 ?# N/ Q O+ @
*/0 {4 Y1 q" ]" }2 }
is# ~# ]3 l% T0 G, A! ~8 [4 S0 D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" }9 y/ N# k X3 t5 R3 s* r6 ?: E
do3 g1 l H9 D0 V5 W. Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 d$ i0 w" m1 v, P if current = @.Destination -- else return
1 z7 _7 R4 W# {/ O then
) {. }5 N# d! k0 x4 [/ x d& F; O @.Destination := void;
( F' a5 i/ Z' l/ ^ if @.occupied then/ O/ @3 Q- e% |' e2 [% ?
part := @.cont;% F# @. T; X2 p( y( @
@.transpOrder := void;/ u- T$ \% y- A+ @% o, n5 T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) |4 L3 x: | ~! v4 p: }' a @,root.eventcontroller.simTime);
& t/ t2 v* H( o8 x! z3 Q L @.HasOrder := false;
0 b* S4 y7 w( V+ e5 w- [$ n0 v @.DrivingHome := true;' [. u. T5 m$ s' ~
rgManager.tryToStartTransOrder;
! V, B8 \/ M( \: k* J* C if @.Destination = void
' ?, V2 l5 U* x) z$ I1 n then -- no transport order for vehicle @% s+ n* u6 S ^+ X8 z% w7 `
@.Destination :=3 u( ?- `4 @. M" T6 U/ ? f* U4 @
rgManager.nearestFreeStation(@,track.~);
- O5 V7 H, v$ t/ q) x4 Q newDirection(@);
- T8 Q4 N& ~: q# A2 ]8 i9 l if @.Destination /= void then
! z8 r$ T# I- c# ]7 y1 _7 P3 h6 L @.Destination.NumReservation :=
+ {0 M* Z* R- J( i3 P- ~1 j$ N+ ~1 s# K) y @.Destination.NumReservation + 1;
/ X( R9 E" B# b& f9 p9 @ end;
& w/ b2 l; O( _. \' L+ @ @.CurrIcon := "drivingHome";
8 J: E& e: b: b) |4 g, Y" A4 \5 _* @ @.DrivingHome := true;9 u; c3 T5 k6 @
end;
7 @' a4 X' A# u4 b; x6 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) ?3 {" A! C: H% W7 A9 { part := @.transpOrder;8 b5 f- y, R, b9 O. ~
part.move(@);-- load part
& m b5 g l1 e7 E2 M4 y8 Z$ `3 p0 z8 g, _ @.CurrIcon := "load";2 _8 p2 k3 u$ p) n( n0 X. X
GlobalDistObj := part.globDestination;
1 B2 D8 p/ _$ a" @4 R assignLObj := rgmanager.rgAssignL;
& Q6 {3 Y) `) G, S" F* M row := assignLObj.getRowNo(GlobalDistObj);8 G/ r% c, S% t n7 I) c
if Row = -1 then -- since 70/ U) E2 x& n& F+ Y8 B0 X
if lan=1 then# f1 J2 X7 u2 O' U( K. H- u! }0 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* H9 a t! @, n+ [$ Z: U- V: \
to_str("in der Andockstation: \"",?.~.name,"\""));2 G0 O, ^8 q" ~" l0 E
else
; W+ b1 g4 f5 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
E# k. r, Z3 e7 k to_str("in docking station: \"",?.~.name,"\"")); 8 W3 w) n. h7 X! x, l5 u9 j4 W
end;
; d' f7 W/ z) C- r h9 g6 v6 }+ A else
, {* C, c3 a0 [3 d9 E% O" o1 I @.Destination := assignLObj[1,row];( d) h, R- H& q4 `/ b6 Q
end;
8 w. Z$ G; Y% t) Y; H newDirection(@);
+ h( B9 Z$ o* L' N) u' i @.HasOrder := true;
2 _2 |: V" I B. X: m7 w/ ~( X% x end;1 G, j( k- T8 O/ f
end;
2 t+ G/ M$ S) W8 {* G, ?) Wend; -- of the method( ~! B6 ~4 c R4 T% i% Y6 c
|