/* called by: entrance ctrl of the object 'track'2 v o9 S+ D9 k* K* x4 Q( g
*/
/ u$ ?: ~- G- O5 y5 \is
/ q6 i9 I" R! z% k0 B5 d) t2 s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 q4 ~) z b: V6 k1 E0 Fdo
. C9 p- ] o7 }" g Lan := rootfolder.Internal.Tools.AOLlanguage;" J' k: n2 {0 s! ?4 j' ~* v
if current = @.Destination -- else return: N. w' _' Q* L' I
then
8 o. G! c8 T# B7 a1 H- q @.Destination := void;# g) G/ ~! T$ P
if @.occupied then
3 z6 [$ i) L. e! Z# q) s! b part := @.cont;! P; w$ F$ \2 g9 R# ^) N
@.transpOrder := void;
$ W9 S) m3 m0 d( U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ h! n1 }9 T( ~* h
@,root.eventcontroller.simTime);
( t& {2 W! o# p, @" x8 e4 ` @.HasOrder := false;
4 \( X! a+ {) S2 H6 M Q @.DrivingHome := true;' M) ? ?7 n4 J5 t
rgManager.tryToStartTransOrder;
9 a G8 ^* G) O: D" i if @.Destination = void. P9 ~% Q2 s! {* U$ |$ |6 i! r" V
then -- no transport order for vehicle @
) H0 ]) b& R6 `! a8 t2 [ @.Destination :=
5 I7 A# w0 }, P# A; N rgManager.nearestFreeStation(@,track.~);! p# e; \% {; m% o3 i+ |5 ^+ {( _
newDirection(@); / B8 d# W: ]! I3 E
if @.Destination /= void then# ?$ z/ Q% Y$ ?) A' c
@.Destination.NumReservation :=, g1 g- D/ k# k( r0 ^0 w# p# V
@.Destination.NumReservation + 1;
5 t! p1 d" V2 R6 | end;
2 V$ {% ~; w; U6 A @.CurrIcon := "drivingHome";2 i2 f) y, {% o1 k0 \
@.DrivingHome := true;, V5 D8 f( U3 h6 t8 \
end;
) @0 n/ a$ B2 ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 N) _) R3 g& e- ?
part := @.transpOrder;
; m* B% a7 b, B- h$ e- k& p part.move(@);-- load part
% l N' g+ ^" g, y/ _ @.CurrIcon := "load";
8 Y- Y; v R+ C: H1 H, D& f GlobalDistObj := part.globDestination;" _3 ]7 X! v* r3 U7 d* |
assignLObj := rgmanager.rgAssignL;1 d# H5 s _2 ]8 R6 _! V/ o
row := assignLObj.getRowNo(GlobalDistObj);4 l% R( K; Y( P* _
if Row = -1 then -- since 70
& T5 c9 g4 Q7 B e! ^7 r if lan=1 then
( l4 ^% c4 T0 q' x2 P+ T7 @: K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) }- s% P; |6 C9 M ~
to_str("in der Andockstation: \"",?.~.name,"\""));
2 \, e6 v" ]5 @5 A' u else0 r; [) n& M5 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ R% H6 a' U$ W! b8 Y% P$ f
to_str("in docking station: \"",?.~.name,"\"")); 6 ~# A7 m, Z5 V. T0 f4 S0 q
end;
- }! a: f6 j n4 `" V else
5 V! j' I- Y$ P' T" o4 M1 P) y @.Destination := assignLObj[1,row];/ K! O/ X& w3 Z& T
end; % U6 E4 s0 f. G
newDirection(@);
: b) d" q! U9 f, D @.HasOrder := true;0 w/ q3 s: Q. Z/ z# f
end;( W- I- P2 t0 K2 J' V
end;
5 i. q6 g0 x% E! F) A: M7 Yend; -- of the method& S8 r1 O! \/ t t$ h
|