/* called by: entrance ctrl of the object 'track'
9 L9 t( K) e7 S$ \! G! |5 y*/
1 X, r0 I' D* ris t( v& n* S8 p$ t% p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! l2 @$ F! N. _' y cdo
1 [5 _6 T' V$ ~4 ^" s Lan := rootfolder.Internal.Tools.AOLlanguage;
. z7 w7 b! H; ~4 S, L" U# J) b if current = @.Destination -- else return3 E# n% Q) a! M+ w; N7 w
then
3 a- ]! y/ s# b$ A$ M8 z3 _4 \ @.Destination := void;
9 v: U7 g. b2 h* g0 V' i if @.occupied then
- i" y6 R. Q9 c2 R part := @.cont;
; X8 a1 w9 K) e2 R @.transpOrder := void;- [: X: }$ }2 | U- M& q! i0 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 Z9 l( c% h8 F/ O
@,root.eventcontroller.simTime); {6 A! u( @% c
@.HasOrder := false;
0 _4 i- v) {( Y ?6 a) K. q" w @.DrivingHome := true;! d4 L! t( N! y' b1 l4 H
rgManager.tryToStartTransOrder;
~8 u0 ?& ?$ B if @.Destination = void% {% V6 O' i7 r1 f
then -- no transport order for vehicle @
/ b: m3 j$ L! o9 Q# \( K( |1 D @.Destination :=
5 v# G1 t7 F5 @; O8 ?+ \ rgManager.nearestFreeStation(@,track.~);# _( _' K+ d0 d& R+ @
newDirection(@);
4 k8 ^ c1 y+ ]3 t2 h- s! o if @.Destination /= void then8 Y8 ^. M" N3 U2 u$ L# t/ o" y+ Y
@.Destination.NumReservation :=
& l1 s6 B/ v* `- }& Z- k( |; e5 { @.Destination.NumReservation + 1;
8 Q& |1 v h' p4 N end;6 T2 u$ T% n4 P n# ^7 O
@.CurrIcon := "drivingHome";4 A9 R5 A2 k" [' X2 n4 T
@.DrivingHome := true;
( y! c! ?( K( Z end;( a$ `$ n5 D+ K; Z+ c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 y+ s! L% k( q8 ^: P9 h# E part := @.transpOrder;
8 n; y0 J0 C$ t9 J$ Q part.move(@);-- load part, X' F% t2 z/ l3 l/ |. t0 Q1 o
@.CurrIcon := "load";( S7 W l# L F; F! B: G/ R* j
GlobalDistObj := part.globDestination;
* {% P& }2 W J* \: a) | assignLObj := rgmanager.rgAssignL;
6 @' I3 l8 _$ ] row := assignLObj.getRowNo(GlobalDistObj);. j" [$ k+ \8 E
if Row = -1 then -- since 70
3 U+ E6 y% A# U, s! [7 Z0 P if lan=1 then
8 ~# Q: w: D( T! f) q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 D; k. Y' A( L
to_str("in der Andockstation: \"",?.~.name,"\""));
2 v" K& V) T) G2 H else# I7 y% e8 e4 G6 {+ ]' e0 s" w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 g% I: a' W6 q& _ to_str("in docking station: \"",?.~.name,"\""));
1 Z% H0 w. S) ~ end;
4 @) u' G- o7 a6 {0 U; I else p0 ^9 t. d, @- j! n4 W
@.Destination := assignLObj[1,row];% a4 H) P& K3 n
end; 2 F6 \9 h( ^ W, h) l
newDirection(@);
: @6 O& S; N, f) E; t4 D, _' M @.HasOrder := true;' R) e2 k1 c9 W* o/ f1 K( k3 Y
end;7 F# N3 d E- x3 G: V( U
end;8 q( y. [8 K' E6 C- r0 h& l# B- e& ^
end; -- of the method% _- r, m3 X/ k$ U: Q
|