/* called by: entrance ctrl of the object 'track'9 r3 D' s+ F7 n5 a- t
*/
% i; f+ N" Z$ N/ Ris7 S$ n" M8 A8 j0 H% |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 B$ V4 t, m+ G& M7 w
do
S @/ f- e1 ? D1 H" I" m7 {4 T Lan := rootfolder.Internal.Tools.AOLlanguage;
% I4 `+ L8 J! {: x7 [* s if current = @.Destination -- else return
" y2 h* P3 q# J0 Z ^9 c* f* } then
, V( P5 d( I3 u! B8 e @.Destination := void;
0 t; f" g$ x5 G- {: V _ if @.occupied then& o' R% N( k( Y. ~/ T
part := @.cont;
, j$ N, V1 B; i- H @.transpOrder := void;
0 H5 I9 a# K) C/ K8 h, U& m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- @% G* ` B$ d: a* Y% Y; d! S8 \
@,root.eventcontroller.simTime);
6 _; @+ ?' t3 y6 l" s2 i @.HasOrder := false;
) h9 k! c) e' X5 c- t3 ` @.DrivingHome := true;
' _9 I- l3 {( \' c9 {* H, G4 o rgManager.tryToStartTransOrder;
: a6 W' E7 M5 s% D: t" m if @.Destination = void
/ D* a" P) C7 Z9 O m8 m4 T then -- no transport order for vehicle @: i: B4 U% S$ t6 Q
@.Destination :=
) j6 {6 {6 d" U7 M: X rgManager.nearestFreeStation(@,track.~);9 G9 K2 b5 ?- f% q V1 U
newDirection(@); F; A9 E, |/ i
if @.Destination /= void then
4 y z2 V8 ^' y- b2 d( h @.Destination.NumReservation :=
% { A' h9 l8 a; m k* G @.Destination.NumReservation + 1;
" p* q- }% [" _# [9 a end;
0 F0 {& c) |1 K+ m4 w, _ @.CurrIcon := "drivingHome";
# E9 W( @8 P. H5 p v1 X @.DrivingHome := true;4 A* j Z- L0 P- R7 u9 d9 u% D
end;
2 f7 L) m. U5 w7 S+ q5 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 r# F: S) W1 W E- ?/ N$ k4 D part := @.transpOrder;
' M8 K, o+ M$ o @' R. n part.move(@);-- load part
" K8 B* @& `6 _/ }/ A' _% q5 b @.CurrIcon := "load";/ S2 d! m7 d3 d
GlobalDistObj := part.globDestination;
" |! ~; f4 v# R7 t! u) | assignLObj := rgmanager.rgAssignL;2 i K0 \+ R$ m9 M9 o2 `9 j
row := assignLObj.getRowNo(GlobalDistObj);
' |+ F. _9 V6 N G if Row = -1 then -- since 70
. w# q5 a0 U @1 X9 U if lan=1 then
4 d0 f% t+ {$ `) v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 i6 c3 U& ]) g! y/ Q. p `% A to_str("in der Andockstation: \"",?.~.name,"\""));
, n, I7 ^. Q# y' H else
" [- P" Y7 [4 E1 R9 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: _! R8 ]& [- S, @' D to_str("in docking station: \"",?.~.name,"\"")); / D, k1 `1 }. K/ Q
end;
! Z7 J$ W# e5 h7 V+ `; g else
7 L/ @2 _6 i: X: \$ e+ J @.Destination := assignLObj[1,row];
& q1 E; y, \2 x2 v; z end; . v' g2 r3 L" A5 N
newDirection(@);" V5 _5 U% F/ H* Q% x# j7 E
@.HasOrder := true;8 \2 @/ |7 x& W+ O& `
end;! U) |1 B+ Q; G0 S, k9 z6 e( ~
end;
* Y: t' i0 g( V$ _" s! cend; -- of the method4 D7 l+ i/ p# X. _( n
|