/* called by: entrance ctrl of the object 'track'5 t) v: P6 y) T$ q8 @2 P
*/
; ^7 x9 L$ m! G. u2 i; fis2 \+ R$ q, J3 C- q) t9 N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 O& e7 E" x/ J }1 y" ^8 ?do8 P1 G0 C# Z7 ^& R) Q8 h
Lan := rootfolder.Internal.Tools.AOLlanguage;9 @! D; Z" Q' n& Y J5 R* ~# x/ t
if current = @.Destination -- else return# h: q) ]) `* h9 f) [
then
8 `, j2 b! E: Y7 O: ?, Z3 i @.Destination := void;
+ ~$ R# w+ ]& f5 S. J if @.occupied then
+ l' ^0 u, v; |3 L part := @.cont;9 n5 z! ?# K/ E( C. Y) T
@.transpOrder := void;
- g; s$ K D5 W' [4 }( k; C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 w/ r# x+ f& `
@,root.eventcontroller.simTime);$ u; a3 G1 A, q6 _5 d9 i
@.HasOrder := false;
' _$ j. l8 v, V; b, ?3 X& g. n; s @.DrivingHome := true;" k: ^* f9 r! k' Y& u" P0 e9 Q
rgManager.tryToStartTransOrder;7 Y( b9 l. J. E5 _4 m2 _4 ~
if @.Destination = void
! a/ [+ d# j1 [- J1 g6 F6 x then -- no transport order for vehicle @2 y6 Q- i- ~" E2 `) A _$ D1 C
@.Destination :=
; {# T) d- b0 A8 \3 r7 j rgManager.nearestFreeStation(@,track.~);6 i+ g5 a2 O/ v, m1 }
newDirection(@); # _8 X8 s1 x$ k1 P
if @.Destination /= void then; j9 t. q0 I% @5 q& U! d0 E
@.Destination.NumReservation :=
3 j: o( L* B4 S/ z- V @.Destination.NumReservation + 1;
* H7 o/ K6 m# `4 `* l: P* c end;, D( D7 R' Y u# U5 D6 w- M
@.CurrIcon := "drivingHome";& D) A3 ~& j0 V5 j
@.DrivingHome := true;
" V/ P1 N& Q7 K* z3 M- p. B9 y end;
0 U- |( z+ f1 ?5 ?( o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. L7 J O. W& x2 n- I part := @.transpOrder;9 i$ e$ C1 i) U! ?; ]( Y4 Q, ?! r% F
part.move(@);-- load part5 d, O1 U4 p8 f5 m" W1 P: S1 ^4 T
@.CurrIcon := "load";( c4 q7 Z, b! z7 a) J f9 L
GlobalDistObj := part.globDestination;
6 g* \9 {! I* Z& J g6 H! H assignLObj := rgmanager.rgAssignL;
6 i9 I9 s% j/ h+ F- h @( \% t6 G% d row := assignLObj.getRowNo(GlobalDistObj);5 b) t- a- ?! m7 ?' Z- g" N
if Row = -1 then -- since 70! Q: Y0 q( l: Y3 H0 e# K; g
if lan=1 then
1 |+ G0 c& A/ f* U) O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 k& p" T4 o7 V. Z' b' H% S
to_str("in der Andockstation: \"",?.~.name,"\""));
: ]( X3 i' Y8 s" ^) N/ r% E! i! N else
2 B9 C( J- {, f/ [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, b! E0 }# L- p5 P7 E' I% P( Z0 `" h
to_str("in docking station: \"",?.~.name,"\"")); / d z# U3 I0 L. i
end;; t; k Z" M/ R, A% e2 K& T+ j8 c
else: f1 p; t q m# R Y
@.Destination := assignLObj[1,row];
6 U# ]# N" x. G5 T1 o( K end; : K K# y2 K1 P* y/ r3 n2 Z. {
newDirection(@);2 I/ ~, n7 _ u; b/ ~) W5 h' H
@.HasOrder := true;
, k0 O# c( { A2 ] end;( O- `4 _: q8 i
end;. ^2 A( A0 F1 x& I7 z* ^7 y9 ~, T" g
end; -- of the method4 h) c, w4 L" ^/ _
|