/* called by: entrance ctrl of the object 'track') F- S8 \4 W, P. n; v" s' z3 `' }& ~
*/1 H4 k) ]0 H4 K6 ?/ g7 k) f2 L, S
is
. j/ }2 m8 S" y4 H' t: R part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 I) H, H* s, D% i
do$ r$ w7 r W0 G6 G+ \# r! z
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ @+ D- g; r/ N7 D( N if current = @.Destination -- else return9 \) u! I% m1 o) m9 r2 `
then- @4 ?! j* O F/ v
@.Destination := void;0 c: @+ K# {; G4 Q/ E
if @.occupied then
9 V4 T: T# e4 N3 ^/ e/ L% v part := @.cont;4 X5 ]; x7 ^, P$ w5 [
@.transpOrder := void;" o% l, ?# w, b+ m# F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( i( s2 N& m' C J( ^* B" b" M @,root.eventcontroller.simTime);
! V" a* T% b4 E9 H9 C @.HasOrder := false;
: M+ g9 |4 I3 K; W$ d) }7 w @.DrivingHome := true;/ V' v# \) k5 C" b3 T) R
rgManager.tryToStartTransOrder;
+ c( u' ?, d5 `0 \8 {8 \; N if @.Destination = void
2 f6 |3 l0 e! {2 S' }& Y then -- no transport order for vehicle @
( s Z G& y. a5 b @.Destination :=
7 p, F' ^* b8 C rgManager.nearestFreeStation(@,track.~);
$ H5 O( c- [$ h* t s' U1 T newDirection(@);
% ?5 O7 H6 G9 S1 `1 w if @.Destination /= void then
" u/ _2 l: j6 E( X+ o @.Destination.NumReservation :=
* O) a2 I. q4 w4 v @.Destination.NumReservation + 1;/ u& o4 r! R) q" {
end;, E' s' [. E2 G. k
@.CurrIcon := "drivingHome";
9 l4 w: l$ s% V ~! E( c @.DrivingHome := true;
( P6 ^- s9 t. \1 b% Y ? end;
2 r% O m/ u; P% S0 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 j/ s* C3 R2 b P6 a, p# [7 D
part := @.transpOrder;
/ v2 }& h5 _+ D4 t9 y D part.move(@);-- load part6 S9 n) ^, e7 w8 G. M$ F% K
@.CurrIcon := "load";
9 w+ z0 u7 V+ H* N GlobalDistObj := part.globDestination;" v& Q# e: z: o! ]
assignLObj := rgmanager.rgAssignL;
. i( E# q- l' w row := assignLObj.getRowNo(GlobalDistObj);3 @/ _/ N9 v) b8 g7 s
if Row = -1 then -- since 70
% ?( M2 V5 `* k: e if lan=1 then! e! p$ |7 l( K- e- h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) N8 ^ ]+ k: ~2 l4 s4 ^' h
to_str("in der Andockstation: \"",?.~.name,"\""));
9 ~6 U% V( M( i+ P! h" }& }; s# b else: R4 `( x7 N, r- {) k1 ]- {! o" W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 C3 E% N) Q& S3 c8 A& G
to_str("in docking station: \"",?.~.name,"\""));
4 ^6 z1 o* a5 U4 ^$ r end;5 C) X. o+ T" m- V5 n
else
( j+ O2 P) C& C @.Destination := assignLObj[1,row];
0 t$ T# U$ [" E. K' J end;
- I2 U/ t: W/ r7 F, ]; { newDirection(@);
9 q& e( X0 ]( \( l. T) a1 |0 { @.HasOrder := true;4 v* p: s3 s! Y+ A2 n
end;1 z) ^( Y% m! B0 w n. g) G
end;! @& a a& }* |4 Y
end; -- of the method! }! n$ N5 r( ]! g" a# q) q1 t
|