/* called by: entrance ctrl of the object 'track'/ L) h8 T9 r# Q9 G7 D$ Y
*/
1 z; w5 K5 _/ iis
. T7 ~9 A" c! m% l$ ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. |" ?: |" b& Y) {/ u4 M# \: bdo3 E' a4 r; d" t4 R \) B
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 n; R1 w( U2 y if current = @.Destination -- else return
9 A) ~9 K/ g% [2 C7 V/ Q6 G5 a. @# s then' S+ O& d2 A, h! U. F; B
@.Destination := void;
1 `$ V0 B, K* H- d g& n if @.occupied then: H9 S, R5 G/ s8 o1 F
part := @.cont;0 |3 E9 p; q& o/ k# F
@.transpOrder := void;- y- f) v9 s( g& B; ^" ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! o+ O* \8 W$ Z: O. ?
@,root.eventcontroller.simTime);
! [! b& ~4 N# w @.HasOrder := false;6 y$ ]# i- y; R: i7 x5 |
@.DrivingHome := true;" E# V0 r* R% h+ e6 ~+ b
rgManager.tryToStartTransOrder;
/ m+ _5 p# r* c: d( f' G- W0 e if @.Destination = void7 ?; i/ \6 P0 c
then -- no transport order for vehicle @; r' a# j0 L+ B, a* a% A# u# x
@.Destination :=4 c; V; g0 q* p
rgManager.nearestFreeStation(@,track.~);
/ l% k# ^# Z' g" X newDirection(@);
% m5 Z" ~0 Y2 q0 n2 e9 R0 N if @.Destination /= void then
, b' I3 ~# A, x @.Destination.NumReservation :=) j( _; k, w+ _! t, ]
@.Destination.NumReservation + 1;) J# L- q) } u: K$ E& R
end;, u2 \6 G( o0 a3 d) Y* Q8 e
@.CurrIcon := "drivingHome";1 |# |; H& W" B7 n. K7 X% P3 Y
@.DrivingHome := true;8 B# y. m6 v$ b7 }+ o/ W! u
end;& [- G6 `) i- w8 v8 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) l' [; a! Z$ j1 J! h
part := @.transpOrder;
/ ?. s& D0 j4 D' ~ F# g part.move(@);-- load part% R6 s; X) b# }+ F
@.CurrIcon := "load";" ^2 C+ Y5 ^ c& D
GlobalDistObj := part.globDestination;* M P) v* T7 }/ Q/ S0 E6 Z
assignLObj := rgmanager.rgAssignL;5 J/ l/ ^% X) n/ \
row := assignLObj.getRowNo(GlobalDistObj);7 [, A5 o5 Q3 S% b a7 y
if Row = -1 then -- since 70% g3 J5 v$ r' H. y8 h* u5 m0 M3 [
if lan=1 then
+ @- e% g# U* ]5 w$ h9 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 K: P! ^6 D9 Q2 | f& X
to_str("in der Andockstation: \"",?.~.name,"\""));. r d# V( r4 ]
else; L) u8 O7 X. R/ H$ y* D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 T, }' }1 A7 U4 v P& i4 K to_str("in docking station: \"",?.~.name,"\""));
! ]6 {% `. s6 Z! R& K end;
' q% Z. g+ i1 k9 I& a) p else
4 j; ]* _/ z+ `8 Y, k7 M @.Destination := assignLObj[1,row]; d b8 ?4 U7 m8 Z$ v8 H, N6 r
end;
3 ~3 z ^, S! k0 f6 N newDirection(@);
* K9 F8 v( w" L. `; w/ t @.HasOrder := true;/ ~# ?& Q7 |7 ]
end;
# ?9 X' f! o* S. [8 v5 a) o1 I end;
0 F P7 c* J% b7 Wend; -- of the method
1 J/ b% y4 ~* T- P |