/* called by: entrance ctrl of the object 'track'
$ s4 u% Y, ?3 S" M5 {0 \*/4 f) \ j( `: b9 I. ]+ R
is
- s1 B. N% K2 K: U part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 b. \8 v$ t/ h& K; J9 L3 J W
do
) r; s4 _+ ~4 H* ^5 H, l" P Lan := rootfolder.Internal.Tools.AOLlanguage; }- O7 ?$ M8 [3 J) W% y) H
if current = @.Destination -- else return/ E2 s6 P/ S% O8 d+ i6 S: e
then
( i+ y$ Q: o7 f1 e2 P8 M @.Destination := void;
6 k4 w4 n4 x7 U4 G( s$ V: k+ @ if @.occupied then& y4 w; u% b2 q- F4 o& C
part := @.cont;* K X4 f& G7 B& K7 J
@.transpOrder := void;
8 V( l. y! o; a* C8 L, ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
I! m# {* H" P4 G+ v @,root.eventcontroller.simTime);9 \& S/ u: }4 T5 X
@.HasOrder := false;
* A, T: i' {* | @.DrivingHome := true;5 f! ^) `1 L, z p
rgManager.tryToStartTransOrder;
2 P* F* u0 l! B% z3 R if @.Destination = void* q9 O# b. x/ ?# z$ G) N
then -- no transport order for vehicle @6 i. P0 T; F+ }0 Z
@.Destination :=: h" Z- E% q. q8 E. e
rgManager.nearestFreeStation(@,track.~);
4 |" {) ^, o7 X/ @4 F newDirection(@); 3 M; l& V! S0 y& k! }
if @.Destination /= void then3 P' h2 z1 b& U! B
@.Destination.NumReservation :=% |$ [0 C* Y: o
@.Destination.NumReservation + 1; D" y: k# k) f6 Y+ T
end;' ?6 v. r$ v" ^) n$ E* s' D
@.CurrIcon := "drivingHome";
: P: j! A9 f0 F' m @.DrivingHome := true;
M, }$ i( b( K8 b$ S3 ?& a) S/ N4 h end;+ }- H2 D' u, [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 X# a3 s' _% W4 m u, S part := @.transpOrder;
. ^: z* y9 c) W- T: I part.move(@);-- load part! n F7 [: \( r' m8 d
@.CurrIcon := "load";8 t% ?# Z5 R; W8 h# M
GlobalDistObj := part.globDestination;
% G9 d* S0 F2 V; M t5 @ assignLObj := rgmanager.rgAssignL;
: B, y" b: x2 i$ v' v( u8 v. K row := assignLObj.getRowNo(GlobalDistObj);" `9 _; ]! j; L! V
if Row = -1 then -- since 702 ~; t# }. b7 D. s6 p3 ]% E
if lan=1 then
% V/ A+ Q/ E# M2 }1 s) O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, H( T. q/ j" w: q. E0 ?1 C to_str("in der Andockstation: \"",?.~.name,"\""));* }- l. |2 Q8 t* I) v x* o
else
2 s2 p0 j3 x) M/ [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 G9 s2 O% R) j. S3 G
to_str("in docking station: \"",?.~.name,"\""));
- @) L0 i5 `# ^6 E a' _ end;; D$ ^, O+ G. ?0 U1 ?1 P
else
' a* C5 e* m9 H. M2 \' Y @.Destination := assignLObj[1,row];9 J+ A! Z- D& ^3 s5 q" @5 [- d5 `
end; ; W! Z/ s) O1 v8 \' ~
newDirection(@);; @9 R4 K/ [0 L7 v5 d
@.HasOrder := true;- I: J3 X8 ?. m6 i
end;
2 M H" w" l+ g5 d: C/ q/ o% y end;" @: t4 f; S* N
end; -- of the method) e [& k( q3 z# m& K* i- R
|