/* called by: entrance ctrl of the object 'track'+ l7 X" t+ j0 i, h# J- g9 T
*/
4 x3 ~+ D$ ^! v' X1 N/ zis' |( @# V3 O1 ?* w o4 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. r$ n4 E% \) N' \2 t
do) x6 G# N* {( o$ A& g3 C
Lan := rootfolder.Internal.Tools.AOLlanguage;
[; P$ ^- {4 j% f( ] if current = @.Destination -- else return
- |% G/ j; S5 I6 r. T then
1 _, @( \" M/ S* H$ B. Q @.Destination := void;+ m, U8 g9 M) T8 ~. g$ M% A3 N
if @.occupied then, N, x3 K+ ~/ q$ C7 }2 K4 j
part := @.cont;( A! @; n7 K+ u/ m0 s, A
@.transpOrder := void;1 w5 Z* z- |# x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, G U% a* ?! d: q9 @+ @7 E
@,root.eventcontroller.simTime);1 H, k1 k1 V$ C8 V S! ], |
@.HasOrder := false;
) Y0 e% V' q/ T, ^* H. }$ x @.DrivingHome := true;& Y- `2 u7 m5 H& }% h7 W
rgManager.tryToStartTransOrder;: U3 q: c: L2 h1 U: {2 }) q6 E
if @.Destination = void" r4 b; S9 m0 q, W- i3 q- Q+ K7 F
then -- no transport order for vehicle @$ Y( v/ n6 g3 p- s
@.Destination :=
J3 S% ]; ]$ ^) h9 l rgManager.nearestFreeStation(@,track.~);
" k# ]( Z+ q/ I: L newDirection(@);
6 S- s* O/ p7 ~ if @.Destination /= void then
6 w$ P. M9 s8 m, y @.Destination.NumReservation :=1 C' ~, k4 b3 |0 i1 ~# T R
@.Destination.NumReservation + 1;7 r8 _( T- M3 R0 b# t; |4 W. q
end;# Y5 |) J. S, b9 a0 w
@.CurrIcon := "drivingHome";
- N6 E ?4 G8 a @.DrivingHome := true;
2 _( u) |" B& C: J end;
. |, e ]+ ^" Q& d+ d% J: U/ s else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 G3 }4 r* T0 a9 k
part := @.transpOrder;) C$ e3 F: I! E2 m( m
part.move(@);-- load part
5 q: @" }4 ]& ? X( Y* o @.CurrIcon := "load";# \4 \+ f% H+ X+ j8 ~
GlobalDistObj := part.globDestination;' l9 t. N) `8 `0 r: j
assignLObj := rgmanager.rgAssignL;
8 [7 u! T8 z* @# j5 V' U2 j row := assignLObj.getRowNo(GlobalDistObj);
/ b4 q* e. a* V0 m# j if Row = -1 then -- since 70
3 N0 Y9 k! Z# u% J% {7 |* Q% e4 r if lan=1 then
9 S5 e2 @9 @ o; X" r7 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- n0 T# [1 n% q0 E6 A6 E1 E' w to_str("in der Andockstation: \"",?.~.name,"\""));
3 J7 _: ], ^1 _! [1 m: W) S else) t; {& ^# n# s; |+ z: w! o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, ?" g, S2 P7 a7 ~$ l
to_str("in docking station: \"",?.~.name,"\""));
: K( _+ O/ Y9 d3 e }3 e end;
- ^4 V+ F+ c" E2 i else
& K# F/ Q1 W5 V; U1 N% s2 L @.Destination := assignLObj[1,row];+ U @5 P5 Z8 n6 t- p F! O2 c0 H3 r
end;
" l' J# \: Z0 j- e newDirection(@);
2 X7 A0 b; J; M: g! Y: | @.HasOrder := true;7 g! u' E' L8 ?( J/ @8 x/ i
end;. k, ^( h2 W, J* X7 x, G
end;7 v6 m5 X- s; m+ A$ E
end; -- of the method0 s, u# [: O" ]7 v! t' [
|