/* called by: entrance ctrl of the object 'track'! l& h/ L% d- Q9 p5 E
*// D+ R0 @ {% r; v6 S( r/ w/ ]# {
is3 o4 E+ ]* @" `; K# D6 \. c2 h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 T' B6 t/ y: j: O9 m3 D
do
2 z7 `/ @2 ?! B4 @3 m% U Lan := rootfolder.Internal.Tools.AOLlanguage;
% T* u; T4 `6 Z& n% T$ g2 j) f4 q9 ~ if current = @.Destination -- else return, g# v3 s3 h3 b ]* [! R& O# m. L
then
: K D$ T z' @ @.Destination := void;
5 L3 _3 N" G( F& k if @.occupied then @$ W: S: G9 E" j
part := @.cont;
6 l5 m: q( f3 B; b @.transpOrder := void;
: d' X' [( I5 E9 b# F7 k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 c9 M. t2 Y4 k @,root.eventcontroller.simTime);; Z% h' L; N! f- R6 L6 `
@.HasOrder := false;
6 M! {5 X& Q1 |/ J6 l2 X3 c! d: M. J @.DrivingHome := true;
- @$ k& h. x. ~9 _& k$ F' G* q rgManager.tryToStartTransOrder;
8 Z! X; H6 E. o; [/ Y, B+ B/ k if @.Destination = void7 p+ [, ]/ }0 v U
then -- no transport order for vehicle @5 z6 c+ t% w( A. L1 J5 f: Q
@.Destination :=# J- h# P5 y3 S2 n
rgManager.nearestFreeStation(@,track.~);# ^: e/ J9 u: I3 y9 C) L
newDirection(@); # l' ?, c7 I5 V. G: l- N
if @.Destination /= void then/ r2 y5 v/ M& _# B/ O# \% K
@.Destination.NumReservation :=
1 k d) E3 R4 @0 C @.Destination.NumReservation + 1;( ^, Y* z& ~4 ~- U9 F4 L& O
end;
& m3 q! x* S5 v9 D3 V @.CurrIcon := "drivingHome";( P. R8 e1 j' [! r) r' Z# B: E
@.DrivingHome := true;$ U1 W5 E$ A _& s" y8 {1 a0 H
end;
* v1 d- v$ g) K( j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ u/ R/ ~$ t a' {# {% { H part := @.transpOrder;
! P7 `5 `3 n# n$ `, T part.move(@);-- load part
: r" ^4 w: d8 [3 s+ ?' T C# \9 U @.CurrIcon := "load";7 _$ |7 F6 k5 w
GlobalDistObj := part.globDestination;" c; p0 B9 ?$ O. C: @ m
assignLObj := rgmanager.rgAssignL;6 n; z S K# k8 v" D3 A
row := assignLObj.getRowNo(GlobalDistObj);
/ P2 D8 Q$ g* g% w" _. e& y if Row = -1 then -- since 70
2 \; W8 {* F: K+ l4 o; T( c if lan=1 then( o% ~" J! ~ a7 I2 R" e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ M; X" {+ r; |2 w" {9 F
to_str("in der Andockstation: \"",?.~.name,"\""));
' X5 N) T i1 D- K5 d" l6 G4 U else: ^; d$ [7 A" {# k! k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* S# m! _7 N' G6 }' C' M to_str("in docking station: \"",?.~.name,"\"")); 4 x3 p+ B7 R+ `0 Y5 [
end;
; o9 x) Q# |9 K! T, n. n else: }& c6 Z% Z0 H+ L9 g/ G
@.Destination := assignLObj[1,row];
7 k+ }/ @: a4 G3 ?$ n( c, h1 j* r end;
: t* `: ~3 `% H8 i newDirection(@);
, X: H- V* E7 s9 g% ?- j7 ] @.HasOrder := true;
: x7 m8 V- W! @$ W5 ^ end;( L3 W' c7 H- t I0 v8 N
end;& A0 V: T) z* W' X9 ^' R. u+ O
end; -- of the method
+ l/ W! | _8 L |