/* called by: entrance ctrl of the object 'track'$ a' t" e" p E+ M4 r
*/. F- Q! ?8 T- u6 B) O+ O
is
+ {# W. j- S+ s2 i Z) ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 o1 m( k9 D1 r7 S% P" T' X: s
do
. ?" T6 P w2 M, [ Lan := rootfolder.Internal.Tools.AOLlanguage;
9 U2 i3 h0 Q8 y$ X2 ? if current = @.Destination -- else return
( j n0 Z& O) V then
/ ~( ?: C7 O# o8 S @.Destination := void;
o* u+ P4 U, Z if @.occupied then
4 S, X$ i* O: J/ e1 Z part := @.cont;
# E& I: r9 K; ]! A/ [; J: E( w. t @.transpOrder := void;
5 f" D s' ~, @6 f W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 L4 G" D+ @4 X A7 B
@,root.eventcontroller.simTime);
6 \" V! F9 Q( L @.HasOrder := false;; ?; ^- P% A" ]; I/ A. i
@.DrivingHome := true;
, D* B3 b4 `( } rgManager.tryToStartTransOrder;
( B2 ^8 M- f$ y$ S: F if @.Destination = void
' V0 q/ d9 B: W0 R# G( v- f4 j! t then -- no transport order for vehicle @
! A2 z! `$ e: L/ r) l9 M3 R @.Destination :=- m( Q8 M1 K6 v8 m
rgManager.nearestFreeStation(@,track.~);
4 I+ k1 {1 w" x0 g newDirection(@); 8 q7 j9 ]3 s9 k! l
if @.Destination /= void then$ W; k) j4 Z2 |8 k3 D) D+ m
@.Destination.NumReservation :=
* b# z) }# L' @ G/ Q @.Destination.NumReservation + 1;
x& F, D& I l* S/ z: z end;* }0 g( e+ T6 X7 b4 {- L
@.CurrIcon := "drivingHome";2 [2 }9 N' ~6 V$ A8 F2 S, o. J$ E3 g0 b
@.DrivingHome := true;8 A( s& R) b' Z9 D2 q
end;: t7 v: ]- i: W' r5 u4 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station k5 Y+ o9 Q3 N' G
part := @.transpOrder;* u9 G; {+ Q0 b
part.move(@);-- load part2 L7 G+ ?6 v9 i2 J4 m% M1 U5 H
@.CurrIcon := "load";
( Q# d1 D3 }0 j8 x5 g- Z- W6 Y GlobalDistObj := part.globDestination;
. @ D0 I- P$ C% Z( p5 N assignLObj := rgmanager.rgAssignL;
9 {, V% A& M0 G' K row := assignLObj.getRowNo(GlobalDistObj);* l; A$ [) `0 V9 K- Y) i( S) U
if Row = -1 then -- since 70
& F# `, ?/ d! k8 u" ?$ o+ P k/ M if lan=1 then |6 {- C, v- Z2 f6 y* s7 [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! O6 @# t( O+ I1 Y Z V; n5 ^" T
to_str("in der Andockstation: \"",?.~.name,"\""));
/ {. B! D5 T8 t+ m$ _ {/ U else
2 o8 N, W7 S* v4 I; H5 M; L o: @- Y) b; ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; v8 e: e: A8 I( D to_str("in docking station: \"",?.~.name,"\"")); / G" Z; d# ?% ]3 G
end;* r! d y& R" y$ |
else( e& p* _8 I% \
@.Destination := assignLObj[1,row];( K- R$ @ c; y1 U3 C! D" P
end;
9 B/ s% f1 H, a' H# A: h newDirection(@);' E% @3 T Z' O' m
@.HasOrder := true;8 N7 V5 |+ u1 \% V* B* O; f+ s
end;# }; ] z2 r. b) D5 K: n0 a
end;
) @0 G- z1 _1 A) V- S" E0 dend; -- of the method) R9 n' C: w5 T# K. u4 G
|