/* called by: entrance ctrl of the object 'track'
) A' z' a4 r4 {0 ]5 S/ l; e/ {*/& O- Y1 y4 u' F) { Q4 g
is- q" P" w- `5 b: j W+ @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% E7 n) `9 B* \8 { w1 U; B
do: v2 k1 m- d0 C, y
Lan := rootfolder.Internal.Tools.AOLlanguage;: z) X2 z' m! d( a R
if current = @.Destination -- else return
9 U/ B+ A0 ?" {+ b then" z' Q" I% y3 p' V Z1 h) t
@.Destination := void;' L8 c$ a( i# p: |0 g/ ~4 f
if @.occupied then1 x; Z1 Y6 w! R# u- k8 f& I
part := @.cont;9 @, w& l5 Y5 Y8 X! E3 }! e
@.transpOrder := void;
& @2 S! |7 }) Q( E2 X" c2 Y) T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, ~& d) N$ F& {+ ~: x: m
@,root.eventcontroller.simTime);
/ s4 C# Q8 P* a! R5 U2 @ @.HasOrder := false;
! S& Y$ Y& M, _3 G: f% @- c @.DrivingHome := true;. E- d) G4 W1 E& X' Y* S
rgManager.tryToStartTransOrder;
5 e+ b5 V1 F6 x4 Z if @.Destination = void5 L7 D P0 ?& B8 j' K. r
then -- no transport order for vehicle @5 R4 Y/ T6 h/ O8 [4 n
@.Destination :=
6 K: |* G/ B) K( z% m rgManager.nearestFreeStation(@,track.~);
2 @ q1 @' F; m5 Q1 y newDirection(@);
! ]& c$ M; a" i/ @ @* k if @.Destination /= void then2 Q" f1 @4 V8 L* R" ?4 `
@.Destination.NumReservation :=; k- g& @1 K: B5 `# R
@.Destination.NumReservation + 1;
# N0 S# J6 W( h! Y end;; ^* v ~9 L8 |! n% t. ^
@.CurrIcon := "drivingHome";3 K# M$ `; q) n5 C9 ?$ j. v' F
@.DrivingHome := true;
* a' E S" n/ _2 D end;0 f& r* J9 K) y- A( V; U5 ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# { p* ?9 o" d" ^/ s9 o( T; g part := @.transpOrder;
0 s# f5 q& ]2 @6 ?5 x, W part.move(@);-- load part
4 R! R8 A; s3 d" j2 r3 G5 a- `5 ` @.CurrIcon := "load";. p# N2 d4 h7 o4 |2 s
GlobalDistObj := part.globDestination;
& h( a% Y- M5 u/ Q F8 u+ q assignLObj := rgmanager.rgAssignL;; e5 L3 z) O3 d8 D+ O
row := assignLObj.getRowNo(GlobalDistObj);2 M( [& w9 C8 G- U$ s1 M# B8 {+ ]
if Row = -1 then -- since 70
4 R6 |& L1 Q& s# _/ o& X" ? if lan=1 then
" _4 M3 f0 }, o# M7 f2 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 q. |9 Y) }9 u' G
to_str("in der Andockstation: \"",?.~.name,"\""));( \+ v4 r6 h7 c" |; d
else0 u2 H/ Y I& r$ ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, b6 Y3 U$ H( B
to_str("in docking station: \"",?.~.name,"\"")); ) i8 Q2 q6 i9 D8 x& I" J) S; ~: `* @
end;3 E1 q$ B& \ R( y
else' a* U+ R: P/ T3 b! F q. p; z
@.Destination := assignLObj[1,row];
, c2 v' k: k* r" o w end;
( p) V5 h9 } v! [' g1 l7 d6 o newDirection(@);
$ L) l" M" P8 b/ Q8 b @.HasOrder := true;+ _( s9 J0 s ?7 L* E; K, u
end;0 F3 e/ l9 r; J# I4 m& s1 m
end;% v% T& G& A g9 W7 y. z
end; -- of the method z- n/ C) e7 X
|