/* called by: entrance ctrl of the object 'track'
9 L( l3 F1 @9 C- K; G- l3 T' N*/. s( B5 m5 g9 V* |* n- a+ \
is! t; B8 k. C/ X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) i E, c) [+ O+ `4 Mdo
8 ~1 I( T" X! @2 g; A* s6 K Lan := rootfolder.Internal.Tools.AOLlanguage;1 v& a2 o; X( r+ k1 `
if current = @.Destination -- else return
4 C8 U* w/ l% p0 o( w/ l! e- ^ then
# r* [/ C/ C% ]% E9 z9 q @.Destination := void;7 \! e$ H& x7 X
if @.occupied then! \. R+ A8 @1 `) c5 G! B* g7 p
part := @.cont;# t& W# Y* ?; O' N) R4 J- H' q, b
@.transpOrder := void;
+ u/ `) _4 \. I2 e9 h# v0 j* `5 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ R) @" F5 n" G4 Z5 ~' O) n
@,root.eventcontroller.simTime);9 X! r: A/ x% _- b
@.HasOrder := false;. r: b* b f! H, X$ i
@.DrivingHome := true;
1 {! Z4 b# m s1 n4 O+ D rgManager.tryToStartTransOrder;
' C% o0 X+ c9 Q: J0 P( ^; o if @.Destination = void) t$ V8 t/ K) j! p
then -- no transport order for vehicle @
8 U; j; C7 d7 L$ P5 p+ V9 c @.Destination :=/ j; E* i" H' |2 D0 {3 l2 |
rgManager.nearestFreeStation(@,track.~);: Y2 D5 d' @$ l% l0 M
newDirection(@);
: x0 i& |" _# t4 @( p" A7 e if @.Destination /= void then8 t; M# y( E: u. L/ o6 l+ J
@.Destination.NumReservation :=
0 x. c& X9 o; H! i @.Destination.NumReservation + 1;
1 D1 P0 u. [& ^ M. U% {3 P' X end;# z! r% h$ I6 o& s9 b+ A
@.CurrIcon := "drivingHome";
- o+ g4 l, @) L. y- \, q @.DrivingHome := true;8 |1 e: d8 I7 B# ^ F% T4 E4 D
end;" z/ a$ [9 Z, ?* `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& H. y% y" ^- o% s part := @.transpOrder;! D3 p$ o" t. E! D3 n# _+ |
part.move(@);-- load part, N' ~+ z( H5 K! }$ H
@.CurrIcon := "load";: N) \7 X* g( u. r& u( @' f
GlobalDistObj := part.globDestination;# `$ ~( g# L* d; m* M# J
assignLObj := rgmanager.rgAssignL; L- `0 @) k. u6 `* N6 m
row := assignLObj.getRowNo(GlobalDistObj);8 X* e8 j# C' B q% R3 D
if Row = -1 then -- since 70
" \8 }) Q; T9 ?& y" e) L if lan=1 then$ ^3 Y1 M6 @' x7 n" O( x. F9 T3 g' @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& }1 v7 _: J. K9 y to_str("in der Andockstation: \"",?.~.name,"\""));0 W8 ]0 P9 ]/ v/ w* o/ J5 y
else J3 J+ Q, @( v4 ?! Y/ H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' {* D# M& s& U9 i% J+ r! P to_str("in docking station: \"",?.~.name,"\""));
5 b0 e3 C) K3 A end;* v+ K( Z4 M" Y8 _
else
$ I3 x# K- Q8 [0 {! c& @ @.Destination := assignLObj[1,row];
2 L1 [8 \+ ^+ V' t* J w% ] end;
4 X- S2 m; D- R6 i, v newDirection(@);
4 R8 R: g; b. O% x; {& ` @.HasOrder := true;
- R" b; i; I8 |' U5 W$ v end;
( n' Y# ^2 V# i% X end;
$ O0 k: B: ?% \4 o( r" L9 c* Gend; -- of the method$ ]. d- Y- g. n3 g6 X2 a) C3 [
|