/* called by: entrance ctrl of the object 'track', g" _9 f2 S* E. C0 E m
*/" Q# l8 Q4 m( H, \
is
2 }! d7 ^3 T9 k3 p% Q2 S& O+ T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' W4 w+ R0 o: L7 U7 q+ w! Tdo
( |# ^: G4 z' p" f Lan := rootfolder.Internal.Tools.AOLlanguage;
: n( s7 C& \5 q0 T4 N: \% i' ` if current = @.Destination -- else return
2 {" w8 a W% t% ~# e then
' g1 }( v$ h; m/ `7 V& J @.Destination := void;; h% ?4 N0 V' R& }
if @.occupied then
+ b2 c; I5 O, K9 k+ c part := @.cont;% W" E' g8 m. G1 T+ ?
@.transpOrder := void;
8 D& U8 z# X7 f/ X+ R+ L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ q6 {$ B! D0 I, G) \ @,root.eventcontroller.simTime);
3 l3 X* b b/ o @.HasOrder := false;
- l, o! E5 k( H- m# { @.DrivingHome := true;4 Q- F x! U( \8 v
rgManager.tryToStartTransOrder;" H8 r( a" w1 A, m, b+ ]: o
if @.Destination = void- X. C7 `0 Q; `
then -- no transport order for vehicle @8 U- E, d: k- J
@.Destination :=* I) O \! q1 B; i6 ?/ j! m$ K# |
rgManager.nearestFreeStation(@,track.~);
$ X, ^) \3 j( N' W+ V. T& i0 X6 I4 x newDirection(@);
" a$ H6 w! Z0 w$ o" \- g* _3 e; h; K; Z if @.Destination /= void then* r% H4 }$ \, j, E" V7 C% ^
@.Destination.NumReservation :=3 c/ k: d0 h, _: [' e8 C" k
@.Destination.NumReservation + 1;
# M$ j( E. q, w( h) ] end;8 {2 S4 T- @! U, h: ]/ k* d9 _) c
@.CurrIcon := "drivingHome";
3 Y2 _( s% D) _& z' O) y L; Q @.DrivingHome := true;
5 v8 j- a4 \: ]! e7 {) C8 ^6 f7 w- z end;0 ]" K. b b* L" a+ K6 |0 J7 `9 g7 J, L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) o9 n% x* k% d4 m# R part := @.transpOrder;
& x; k) q _+ M part.move(@);-- load part c& I& Y/ H) w# O6 M4 H* H
@.CurrIcon := "load";
2 T) O' G- |$ ~4 }* ]& E GlobalDistObj := part.globDestination;
v1 q, b( l# _/ U* I/ P8 Z assignLObj := rgmanager.rgAssignL;) J* j4 @$ x! x5 V. }' z
row := assignLObj.getRowNo(GlobalDistObj);
8 y8 y; k: g/ C# L0 r" X) e5 x1 _ if Row = -1 then -- since 70* q( { a) a0 C
if lan=1 then
( R( ]8 E. u6 h' L% r# T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ Y5 w1 j8 P1 m! i5 D to_str("in der Andockstation: \"",?.~.name,"\""));
0 z3 A- _) D4 { else: W4 g& A7 u/ Y4 B. O4 l' L7 z/ c+ S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ p S, V! k7 U to_str("in docking station: \"",?.~.name,"\"")); , O# P! I7 u: K$ n4 c2 P& h- `; i9 H8 b
end;
( C8 Q: F/ v! V. ^+ E0 Z( X' { else3 ?9 k" O1 G9 V, F. Y& [
@.Destination := assignLObj[1,row];4 p: m' o, \7 d" y
end;
; t" T: V O5 f# z( c+ f. X newDirection(@);. J' s; B. Y6 @5 \: ^
@.HasOrder := true;
a! b' q( K* m2 v8 s end;1 O8 E6 M$ Y6 V; v {; K& J1 Z
end;! K, V' {6 ?& `4 C# T
end; -- of the method' t V6 u' l; c9 n3 W
|