/* called by: entrance ctrl of the object 'track'* o8 H% u. g$ H3 o* y+ v+ p% e
*/
, @; F0 M6 P! _$ I" tis
$ [# _( }+ ~$ E" n( S* H& t2 R; P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! |7 [0 |' H2 x. x/ b! Edo; {* _% d2 c! {' H
Lan := rootfolder.Internal.Tools.AOLlanguage;. t4 L& m. t4 m2 H! h7 K
if current = @.Destination -- else return
2 j1 b! M/ s& k4 K5 f2 Q then
2 o2 j) j1 W$ e. b @.Destination := void;+ h7 L# Z3 l/ c& r" D! _
if @.occupied then
# T. J+ W" X& k" B- F. f! C0 U part := @.cont;4 y- N% D, u6 @0 y3 z
@.transpOrder := void;1 H0 T- @) _" c- _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! }2 S5 p1 r& v% \5 u% d
@,root.eventcontroller.simTime);
3 |6 k7 E1 G% y* V3 E# L/ ` @.HasOrder := false; n$ ^5 Y/ Q d3 o: S6 V# c3 a
@.DrivingHome := true;: g$ x# Y t) P8 y' Q- R( u% u
rgManager.tryToStartTransOrder;1 L% K i, G8 I( n0 l
if @.Destination = void
1 E. w( b3 w' q" }3 ^ then -- no transport order for vehicle @
: p! Q. W2 a1 p; t/ Y% ~ @.Destination :=
. l. F+ Z( j$ |) ?/ k b rgManager.nearestFreeStation(@,track.~);+ L; k& M8 O$ t6 {1 b$ Y# D: g
newDirection(@);
# l+ M# H- w; q, u if @.Destination /= void then
8 j, R! u) z' W, N5 Y7 t Y @.Destination.NumReservation :=
2 s2 ~% [' b! ~: |4 l @.Destination.NumReservation + 1;
: C7 z G: l/ z E1 I0 e* \$ D" {; ` end;. [9 _3 M- O! t( [; o8 A
@.CurrIcon := "drivingHome";/ Q" Q m# i. v5 }$ M0 G
@.DrivingHome := true;
; t c" z! M% v; H, F end;
/ a3 R5 m: E- B _% ^% y/ Y5 _: q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% S8 Z/ t; p6 o' ~! a# l part := @.transpOrder;" e7 }7 V+ M: |/ X
part.move(@);-- load part: O& @! `3 J6 z# R( Z% ~ @
@.CurrIcon := "load";. `0 r# _& M# w: X8 l
GlobalDistObj := part.globDestination;
* ^3 R J' J/ K$ f, B4 ? assignLObj := rgmanager.rgAssignL;
3 x! A8 n7 O* ^4 V row := assignLObj.getRowNo(GlobalDistObj);
: {0 T3 o: m( _3 @. c if Row = -1 then -- since 70
B s) D# }" }, q if lan=1 then0 k" [) W2 ?) u0 _9 h* Z6 e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. k2 z2 A" J; \7 F, w! a2 C8 E: i
to_str("in der Andockstation: \"",?.~.name,"\""));; D6 Q1 G) W9 \2 q$ e& k3 y
else- o$ `9 w& u+ J" G2 B5 p! X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 o: e8 B) ^* r: o7 \5 {* B* M( I
to_str("in docking station: \"",?.~.name,"\""));
! J( Q- d& f- Z- x5 D end;
6 ^, e) q' a. d8 U" e, t( N+ H$ x else0 b/ L% _ `3 ?! G7 E; h$ Q0 h
@.Destination := assignLObj[1,row];" j+ r, ^- N- @% _$ @5 I+ E' m! S. {
end;
1 y5 p% i( I w6 G, v0 z newDirection(@);7 F3 L4 n- S. b' z! \4 ]: l
@.HasOrder := true;# O# `3 T5 w, S0 n$ ^; h c! |
end;7 l9 B! w( d, _; v' P' U
end;4 K1 c) b' w' r3 Q1 r2 S
end; -- of the method" q) P+ V" n2 j7 x. y Q4 U
|