/* called by: entrance ctrl of the object 'track'; |8 N+ C! ^5 g7 v% ^, b% s
*/
7 B$ ]! D9 K4 ?, t N. P2 eis% Q$ }6 [6 I9 p- H, |/ e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 h9 U8 ~9 Y" gdo
5 {' Q @& f4 u Z) E Lan := rootfolder.Internal.Tools.AOLlanguage;4 ~( |6 a7 e: \+ v& R# `& w
if current = @.Destination -- else return! b0 G* K9 ?) W+ o' D
then+ A a A7 n3 A4 |4 l
@.Destination := void;/ ?7 r9 Y# l7 B( l: J+ y
if @.occupied then7 c- j; q7 R7 [( a2 F# S, r5 |" w
part := @.cont;
. z5 @1 Q# {5 a- T @.transpOrder := void; B# m% C% B. B& L4 j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& n4 ]8 l$ J1 T+ i5 v* @ @,root.eventcontroller.simTime);- `+ K B; u! |+ I9 L% p" x
@.HasOrder := false;
# i5 D" u- l$ b; S, P% a @.DrivingHome := true;% H U: @/ `( F* v3 S. @
rgManager.tryToStartTransOrder;
5 b" {" ?9 W& T9 N* L if @.Destination = void
5 |% y* b9 Y4 n8 q/ H L0 e" i! p7 r then -- no transport order for vehicle @4 Q/ O, d$ A8 _
@.Destination :=
( Y3 f7 N: x8 w2 K+ P rgManager.nearestFreeStation(@,track.~);+ f4 P, b) d9 P/ |7 P, C% Z( J
newDirection(@); ( [4 Z+ X- M. O+ W
if @.Destination /= void then
0 t$ b) ^, t. d# M @.Destination.NumReservation :=
- C. G, ?+ I k/ R3 Y6 F# K @.Destination.NumReservation + 1;# ^! y6 f( s) H0 W
end;
2 d$ v7 U, ?% ~4 e3 C4 d1 m @.CurrIcon := "drivingHome";& E9 V1 @% O/ N9 j
@.DrivingHome := true;
7 P# n& Y! y7 b( ]6 C1 o1 V9 _ end;
/ z* J; Z1 s7 \. r4 y( G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Z6 k: Q/ i/ y: I part := @.transpOrder;
4 O5 {- j7 g$ }* h3 E( L4 t0 T5 c part.move(@);-- load part" k2 t2 M% C& U: m) Q% k. Q) Q
@.CurrIcon := "load";
: ~5 s! a* ^* f; N4 l' B4 ` GlobalDistObj := part.globDestination;
0 ]. b- u- ~6 _2 e$ D assignLObj := rgmanager.rgAssignL;& n- u2 I# V, ? d
row := assignLObj.getRowNo(GlobalDistObj);
, C3 g+ J; Y( M if Row = -1 then -- since 70* c1 V, b( o& s/ ]( J
if lan=1 then. k3 E; U9 Q! ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," `8 A1 D" U6 Y
to_str("in der Andockstation: \"",?.~.name,"\""));8 _, r( n" s! e+ A \% Q
else
2 e/ Z0 D* L& i2 D* o9 }: W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! ~1 h/ L( I! Z8 X. y+ b
to_str("in docking station: \"",?.~.name,"\""));
! u/ s4 K$ M6 |" y( O end;
5 {; h7 w+ i0 T4 d- ^ else" u- @8 i0 Z, L1 i2 b- }4 Y7 L
@.Destination := assignLObj[1,row];
. x' C! T3 ]" F) I- \- |$ C end; k" e I, s& n0 C% I% f
newDirection(@);
1 x4 S3 s2 k+ I& z9 p, M' N5 i6 s1 O: z% } @.HasOrder := true;
; M9 N0 A: K1 k end;
& v7 ]9 Z) m% Q% m( h+ d) b4 c end;
) f" N0 D# u4 ]2 s+ D* B, Uend; -- of the method
1 k( D4 Z9 ^5 D( h, m, r+ e |