/* called by: entrance ctrl of the object 'track'9 i+ e2 H# s( v7 D
*/
$ \' ^' ~. k; Z+ r+ N; Tis
# A5 J) a$ ^) V8 M; O part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ r8 J* |" i- R7 F T+ Ndo
$ V( t. e* e, [# I/ f: t8 m% X2 k Lan := rootfolder.Internal.Tools.AOLlanguage;
6 P6 t( l: X; T* q if current = @.Destination -- else return9 n% e, M3 E% v, g
then
. h1 T3 f- }3 e/ [) a% w @.Destination := void;' o0 f* u! r: ?
if @.occupied then
' _5 ~) n2 k, |- q9 ^2 M$ E part := @.cont;2 q/ T" l& c3 z* j# L; @$ `# ]( A0 z
@.transpOrder := void;/ ^7 j7 n1 ], x7 j1 e" H: O2 U% F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 w/ |7 G+ m; w2 p6 w/ i5 e/ s/ `
@,root.eventcontroller.simTime);
) L, v/ H A2 t) F& G9 ?4 U @.HasOrder := false;* f9 J% K/ Z, L
@.DrivingHome := true;
# t8 `# b2 T/ H- X+ V5 `) H rgManager.tryToStartTransOrder;
7 ?# {+ C' w" H# p% `8 P if @.Destination = void
3 b: u& ^+ Z; A2 G6 z6 N then -- no transport order for vehicle @3 W) y, P1 l& d
@.Destination :=
9 X/ y( S( U0 u7 i! ]- o rgManager.nearestFreeStation(@,track.~);. A- a9 F0 @+ I: n/ g. y
newDirection(@);
' @$ ]6 ?3 a- r3 z. u& e if @.Destination /= void then2 q2 z6 {1 k% n
@.Destination.NumReservation :=4 g) W2 V( q8 |4 p+ K, I
@.Destination.NumReservation + 1;. L( Z* O; B; i$ `7 j9 E9 V0 J2 [
end;( U+ e: E/ o+ r2 d4 y$ P
@.CurrIcon := "drivingHome";
: d! }0 v9 [: x V- M9 Z @.DrivingHome := true;$ u/ r- ?$ t6 U+ e9 l( q, O# A w4 @
end;) q f1 o% N$ L, H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 O& u+ R E1 {7 z" i
part := @.transpOrder;0 @: n4 |% d! @) R
part.move(@);-- load part/ D% r, ?8 c2 S2 e) _
@.CurrIcon := "load";
- z1 F4 x" N* s+ l( \ GlobalDistObj := part.globDestination;# k, {4 M2 G A0 G% I" X- c% ]
assignLObj := rgmanager.rgAssignL;
8 g6 J, n6 g' v, u! q row := assignLObj.getRowNo(GlobalDistObj);' E# R Z$ r8 ?4 k9 Z; D
if Row = -1 then -- since 70
, K! r {1 v% y! `5 G if lan=1 then6 u& a% ?* l- |5 B# x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* H% }$ p8 I$ ~4 p2 U to_str("in der Andockstation: \"",?.~.name,"\""));
" o) S7 ?: T$ F else
& T6 E3 d& ]) r+ j+ B: _2 l2 X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; Q D9 I' v1 r
to_str("in docking station: \"",?.~.name,"\"")); 3 Q2 ~5 x0 o6 |3 t2 a0 G9 v0 [
end;
8 T' d' e/ G* x$ A* W/ M else
# ?6 H' y# ~ a* n8 j7 D6 Y$ c @.Destination := assignLObj[1,row];$ a8 {5 g2 ~( c# l$ s6 l
end; + ~9 Y; r+ ]6 c4 }+ n
newDirection(@);0 E( ^+ }, l* k0 A3 |
@.HasOrder := true;& [% b3 J) L- U$ _$ Z0 M
end;
2 q) c: `4 {7 {: R: ]% @ end;
7 Z$ d3 x5 U" Z `1 M2 A0 Cend; -- of the method
% Z* L9 J: x$ @" J |