/* called by: entrance ctrl of the object 'track'0 Z1 t- s! x4 u' w
*/1 _) G4 ?% Y; c2 {
is1 E$ j8 v6 S* H2 V4 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# S. s6 c: p( |) l8 D/ }do; m8 Z+ m' [2 x$ ~4 q! Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ _) t5 T; S0 H: M( ~, B. [$ Q8 u if current = @.Destination -- else return' d7 ?. G' S: |5 a) V
then8 x% N d2 t) I5 _
@.Destination := void;
$ W3 p+ y2 I4 A. m, l) ` if @.occupied then
, D* I' ?. ^+ h, x' z part := @.cont;. {' V) D3 Y1 ]3 w
@.transpOrder := void;
, Z- Q3 D! |) B) {+ D! R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 Q A7 Q3 \ w a: p
@,root.eventcontroller.simTime);0 b8 E( c# v* C: s! q& T
@.HasOrder := false;! w' W C" ^; Y* H+ O3 K
@.DrivingHome := true;4 k" m0 B% |- {$ m' {
rgManager.tryToStartTransOrder;
1 V/ ?6 y& `* N/ W U( q if @.Destination = void
# d/ w$ z5 m; Y4 O( j then -- no transport order for vehicle @1 R$ v; k: k! ?) q$ @( B# g
@.Destination :=& F1 q% Q! C2 u+ c" U
rgManager.nearestFreeStation(@,track.~);# W T* U n6 P9 R7 h4 b6 G; e: ~
newDirection(@); ( o; |+ Z+ f A# c
if @.Destination /= void then: n9 {6 r4 y" |
@.Destination.NumReservation :=# A& {- ?& ^1 q2 Y: n
@.Destination.NumReservation + 1;2 [. v7 z' q' M ]: T6 R5 h
end;$ L4 d: y" k: U3 T& L' o/ N( s1 f
@.CurrIcon := "drivingHome";
& ?5 v4 S0 N" n& Q1 j @.DrivingHome := true;
) q" z* k' D3 g8 ?- y( N end;/ {5 w# q1 p6 `# U2 h: J1 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( T/ P v! [; t1 E* @* Y
part := @.transpOrder;
8 K5 g2 f- X8 x' L part.move(@);-- load part
6 S$ i0 c; B1 j3 P3 o @.CurrIcon := "load";# i/ `/ `; e `) U
GlobalDistObj := part.globDestination; ^' }1 ~# y7 J3 r, t! Q
assignLObj := rgmanager.rgAssignL;
* S# ?( B) }4 O! g' z" } row := assignLObj.getRowNo(GlobalDistObj);
& L- D# H; d9 `$ G# G if Row = -1 then -- since 70
3 Z3 g {' G- q0 z" @) i if lan=1 then
* {8 U0 l# r0 N* b+ _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ^) W( ^6 }- O0 m9 w5 V
to_str("in der Andockstation: \"",?.~.name,"\""));9 K6 z* I( q; j
else
: A3 q D8 U0 p0 @' b/ y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 g$ f! j9 T. z: p0 p8 f) l to_str("in docking station: \"",?.~.name,"\""));
6 h. g: z; B/ z7 o end;0 i# L6 q M7 P" R
else
! h# W5 d# B. R; u& d @.Destination := assignLObj[1,row];
4 U* E4 C- I3 }3 O+ H end; - v4 s* {3 N+ C+ p
newDirection(@);7 @, q- E7 I7 U1 T: M) N1 a
@.HasOrder := true;
. p' e+ w7 c _2 }7 ^# R! l3 r end;1 Q, g* [: _3 y* t4 u
end;; Q" h+ D$ G0 o' u& T9 U
end; -- of the method& R$ V6 v! T! B6 o
|