/* called by: entrance ctrl of the object 'track'
- {. B' A$ F7 Q$ |! n*/6 F8 l! Q6 w' p7 Y- j& ]5 u
is
; v! m' n, l( H! _+ E part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 p% @" C; P! Y) Ido* B5 ]+ Y+ h% S) U0 y
Lan := rootfolder.Internal.Tools.AOLlanguage;! e: S/ G/ H1 r# d2 k" {
if current = @.Destination -- else return4 e7 O* @# [$ q5 U6 z9 t/ k( l
then: f1 l9 e5 {. g; `! {
@.Destination := void;
1 x; {, m V3 N1 r* U& o4 j if @.occupied then) ?) ~- g$ C! C" b/ M; Y7 m0 |
part := @.cont;+ c2 [0 `% K f5 z
@.transpOrder := void;* F5 v$ H' [9 n7 x+ c# }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 h: C# O( b" Y2 U @,root.eventcontroller.simTime);
, {0 V* P! p+ _% c3 U$ b6 h) | @.HasOrder := false;
, n& B7 f" |( v8 {+ H) Z- H @.DrivingHome := true;
6 M) J" J; X- ]+ N: ]! o rgManager.tryToStartTransOrder;
- @: k% _4 P& l$ P) R if @.Destination = void& m* E% w( t: O; t7 F
then -- no transport order for vehicle @' m, s* ]/ @: ~1 v
@.Destination :=: q2 ^4 {. [5 X' Q' k" @) M4 ?. e; D
rgManager.nearestFreeStation(@,track.~);
, W j$ f* b5 c. ^ newDirection(@); * ^$ X, Z, Y5 d% n* V( }
if @.Destination /= void then
: ~4 r+ N! r3 |8 V @.Destination.NumReservation :=
# F6 G- x7 W6 x) y @.Destination.NumReservation + 1;! \, y3 ~) l) ^/ D3 ]
end;
8 W* b% b8 y: O% b @.CurrIcon := "drivingHome";
4 O& v" M7 z# @) c6 g2 q @.DrivingHome := true;$ _- s) q4 S+ E8 ?8 ~9 b
end;
) W) p& l7 v' a- \2 S& `' s else -- the vehicle @ is empty, both vehicle and part are in the same dock station" Q+ D3 ?5 E' u0 g% n
part := @.transpOrder;4 ]: Y$ h9 f7 U8 E
part.move(@);-- load part
$ \# b+ ^9 t* M, C! B+ V% ?2 V, j( @2 v @.CurrIcon := "load";' ?1 Q, g- O h& U% V
GlobalDistObj := part.globDestination;
, ]/ o' Y$ b1 C( H% d( o assignLObj := rgmanager.rgAssignL;$ s' ?$ x2 t3 f6 D/ D+ R+ e
row := assignLObj.getRowNo(GlobalDistObj);
+ T4 N( i! M; i& h if Row = -1 then -- since 70 v1 Y9 x r+ ^# |5 S3 ^" d
if lan=1 then
7 j5 r% w: D( g$ i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ Y2 W( n. ^7 Z' s
to_str("in der Andockstation: \"",?.~.name,"\""));6 A- |2 d5 o8 g! P% }
else
) r1 g& N# Q: v6 u, g3 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: S, f3 r6 S* h
to_str("in docking station: \"",?.~.name,"\""));
& s- D) L0 n) S6 K+ y end;
2 A" |8 y6 |. _ else
, z( H; P& Y2 f" |0 i6 N6 L) g @.Destination := assignLObj[1,row];
" I5 B0 L# f6 j; D end;
+ A; w& _) O/ d; Z6 b3 G newDirection(@);
& @; ]( s& ~" o# w' z4 Z+ A @.HasOrder := true;) L8 `( ~ Y0 ]# |7 ?/ A/ r% p- {- h0 {' R
end;
' G) I F: i% {9 R0 O6 I) r2 f' T: u end;; h, N0 \$ ?0 O3 \4 V
end; -- of the method6 J s5 I. }! a, ]
|