/* called by: entrance ctrl of the object 'track'4 ?2 j1 }1 S# `4 h& B5 ^# U% u
*/
" m9 w/ o1 Z7 i: |- B1 a6 ]% P" fis3 p5 K/ H8 A* g5 @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) f; A# v* U( Y2 Odo. U& R" l b$ x2 W/ k9 t
Lan := rootfolder.Internal.Tools.AOLlanguage;6 m. s$ G- y! c( ?
if current = @.Destination -- else return* {/ d, N4 \0 j8 g' v4 {
then8 d, Y2 ?% T1 O! n0 R" S
@.Destination := void;! V/ [) v0 L/ S' v- a4 ~9 h
if @.occupied then+ ?1 O& Y) ^& J" M" [3 P
part := @.cont;$ \- j, ?& ` C! N7 l
@.transpOrder := void; A# D# F+ s( e8 v& v% a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 n" M$ f0 y3 H, t6 L% J6 ?) ~- M2 O @,root.eventcontroller.simTime);
7 c" a" Y" n& y8 L1 f: E: S. Q @.HasOrder := false;
: F" E4 C1 I# A$ j' T# w6 Q. _ @.DrivingHome := true;$ K% J* K0 m0 Z
rgManager.tryToStartTransOrder;9 E1 M) |5 e* L. ]9 a: C
if @.Destination = void+ m! c( n1 g( h: U0 f
then -- no transport order for vehicle @
! j( J V& l2 k* h' l {; I5 X @.Destination :=
a+ ], l) {; ]9 P$ s7 M* ~ rgManager.nearestFreeStation(@,track.~);
' d4 {* Q u( c/ `4 k1 {5 t newDirection(@); 1 [; N9 y* P* V- B4 k' z+ W
if @.Destination /= void then
5 @, \& E1 {0 I! X% }6 S @.Destination.NumReservation :=" g# E, p. e: X2 |7 I
@.Destination.NumReservation + 1;& H' z2 _+ d: b3 j6 |
end; L8 E. G6 G. H& }0 ]9 O
@.CurrIcon := "drivingHome";
3 w: e' @; \9 s6 u+ o* M2 i @.DrivingHome := true;
# ?4 v4 \- F ?0 ~ end;
. \4 j* |. }; b7 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 y& g1 N9 _& v; V6 [
part := @.transpOrder;
6 e1 p+ \ R. X& h; x* l part.move(@);-- load part1 y& |2 W* o" Y: V: p
@.CurrIcon := "load";
" Q6 |+ e4 y& E+ g$ x GlobalDistObj := part.globDestination;
. f, s6 G# ?6 f( ?7 @ assignLObj := rgmanager.rgAssignL;& P: T6 y5 g2 t- T( y0 R
row := assignLObj.getRowNo(GlobalDistObj);
" L+ w! G4 Z( b- P% V if Row = -1 then -- since 70
; b6 _, t2 E9 J8 Q if lan=1 then
! h H1 d) p& I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 ^) ?4 l" |0 v* b+ ? to_str("in der Andockstation: \"",?.~.name,"\""));. X M/ @* G; {4 @3 {
else% p* g j+ F" w* z, z/ e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- _ ^+ u0 n( j! G9 q4 B. J& G7 e( y to_str("in docking station: \"",?.~.name,"\""));
8 c+ l) O; J% z1 J' E end;, W, ^5 H. {' a
else
$ O L" V4 ?4 } @.Destination := assignLObj[1,row];
( O' G+ F' {. F3 e end; 4 ^7 e! W+ N U
newDirection(@);
* W0 d; X. I2 G' ]: {/ k2 w9 a9 ? @.HasOrder := true;& t5 |1 p: i0 @& E0 Q* l. J, F
end;* h9 q K3 r! ~
end;
V# d% ]0 t/ M9 Z" Dend; -- of the method, ^ L1 k1 O5 B' n
|