/* called by: entrance ctrl of the object 'track'' R9 L7 ?/ D, g! Z9 X
*/
. V4 h+ `! _% I+ j+ ~is
- Y1 p: }/ W3 B9 [2 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ D$ k8 O8 j$ L' K
do
+ [3 ?3 F9 }( _4 J Lan := rootfolder.Internal.Tools.AOLlanguage;( d3 m. L3 h0 F8 x! `
if current = @.Destination -- else return
* M8 A7 U2 _7 M: T then1 [: g# [* X3 Q# p( r! a8 b! a9 l
@.Destination := void;
4 z, E4 |+ e9 m0 ^7 A if @.occupied then0 }. M3 z, A; q) c5 P" c* j& s
part := @.cont;
' g- {+ [1 U8 n# \2 P @.transpOrder := void;* o8 _; W% H; ^" |2 p( p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
Z3 @; {$ s8 U7 a @,root.eventcontroller.simTime);' b+ _( ?3 c: L6 [/ k. y3 E" L
@.HasOrder := false;$ H9 T: ]$ F& t- i8 ?# d
@.DrivingHome := true;
4 Q B5 G- W% y7 y! z rgManager.tryToStartTransOrder;
2 u( g; x9 c- h; \" C3 W) ^% e% j if @.Destination = void& N5 D2 I$ a0 s2 x% G7 }' ^- W* V. T
then -- no transport order for vehicle @
0 m4 S: C _2 c( E. r! I( J @.Destination :=
& I6 `9 ?& w* b rgManager.nearestFreeStation(@,track.~);
! x) Z" _* a. G# I newDirection(@); . s C4 M& g/ q
if @.Destination /= void then
0 i9 p# M6 J: l* @ @.Destination.NumReservation :=6 _! ?' h2 X0 Y7 E
@.Destination.NumReservation + 1;
# I! X7 g6 O% V2 {1 D, M8 @) U end;
/ }" I) B7 B. v+ w' X @.CurrIcon := "drivingHome";, }# `% c6 a( N
@.DrivingHome := true;* \0 ?) |5 @% M9 ?
end;
" H% a+ R* }% z3 B- f4 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ p" T% D! Q, u* a part := @.transpOrder;' ?: G7 C) [' t& Z9 q
part.move(@);-- load part0 I' O& p4 H5 f
@.CurrIcon := "load";. W# A/ X8 Y7 o( v& g8 u
GlobalDistObj := part.globDestination;0 L& M5 S* Y# C) S& X) i8 q% P9 y
assignLObj := rgmanager.rgAssignL;
, S" P# G& |9 t7 j- a+ B# t( x row := assignLObj.getRowNo(GlobalDistObj);
: d% D; _6 V" I+ k' A7 Q u if Row = -1 then -- since 70
R3 B+ V1 K/ y2 p* \$ O: ` if lan=1 then& s. ]1 D$ x' N0 U) m# {8 v: ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. w4 U9 ~: B( K- z
to_str("in der Andockstation: \"",?.~.name,"\""));+ k; J( Q. a! P/ j9 M
else5 ~, a1 X+ [! {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' r( O# k8 h9 H$ L% v( \; b to_str("in docking station: \"",?.~.name,"\""));
0 j. u4 I, l+ D# x T+ ^ end;
4 e8 H- h0 f4 D- k+ I* W3 a else
$ m0 C5 N! i+ K6 n! |: W @.Destination := assignLObj[1,row];. m+ d) E: W% L4 V
end;
* R/ x, f/ r8 h9 D9 c9 A$ o( [3 _* V! A newDirection(@);8 v6 f, I5 W, k) l2 ?
@.HasOrder := true;
7 O# B7 e4 T+ ~! o3 v end; j0 F3 X! ~% S4 @# n, i$ W$ R. O
end;+ J' |$ d! v1 l3 a# ? w( w) N1 w
end; -- of the method7 H% e) E+ {4 m% W: {6 i
|