/* called by: entrance ctrl of the object 'track') _ U; t3 {7 u+ [
*/
: p8 o+ N4 J/ `2 x W) b2 zis. U4 p: |5 u' d ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# Z1 x, P0 J5 A0 o& ddo
8 S7 a! F% [- c) F Lan := rootfolder.Internal.Tools.AOLlanguage;
" c" X; u: S5 B( P" M$ U if current = @.Destination -- else return
0 ^" V* D' O U( f, q then
) I! F8 n* L @ @.Destination := void;: ]3 ~3 k! Q4 t4 _: D& z1 W
if @.occupied then( J& {! N4 g& O2 e5 r8 z
part := @.cont;2 }& i3 s9 h% V3 k' K
@.transpOrder := void;
2 f' k7 H* V2 ]; w8 r; O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ g* D0 a; J3 H @,root.eventcontroller.simTime);
. ~$ z& D$ h6 d @.HasOrder := false;, r2 |! n1 c8 w0 q& x
@.DrivingHome := true;3 d! u& E1 m' G2 r
rgManager.tryToStartTransOrder;
9 t% D- T$ U% h, B, { if @.Destination = void
3 z+ S# R3 {; x then -- no transport order for vehicle @
2 P$ U9 r/ n E5 B& T$ K) W6 g/ B @.Destination :=. @0 j# v' P5 E+ u2 `: f% r
rgManager.nearestFreeStation(@,track.~);
7 D6 e+ t3 m5 P @& a3 v: E M newDirection(@);
4 o/ H, U, A U: Y* P) ^# e' d" ` if @.Destination /= void then6 W% K. x1 u' t- g4 p
@.Destination.NumReservation :=5 h; P) s, K2 Z: j
@.Destination.NumReservation + 1;7 Z1 H7 i/ ]+ j6 E
end;
' T' @! H/ P* p3 A/ [$ U. q+ t @.CurrIcon := "drivingHome";
/ ~& j0 ] C8 l' W$ F% S' h @.DrivingHome := true; u& {6 q- x4 x" b
end;/ Q. t9 C$ F3 k5 t4 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 c5 R3 y0 Z% C; ` part := @.transpOrder;
' U( ]6 s* I9 v9 Z! t! G* } part.move(@);-- load part2 n+ U: S# y3 o$ A0 O) E2 h
@.CurrIcon := "load";
0 `' `- X, a1 X4 }# `8 C' g GlobalDistObj := part.globDestination; q5 i1 d! s" @/ }" E% i
assignLObj := rgmanager.rgAssignL;: u. f1 Z0 F: L$ S9 V# x
row := assignLObj.getRowNo(GlobalDistObj);
6 b0 S) e" W& \1 o X if Row = -1 then -- since 70/ c. m$ a! {. Q6 C: x
if lan=1 then* {+ `/ |/ v% n$ O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 _# o1 M9 e- X5 [( L ? to_str("in der Andockstation: \"",?.~.name,"\""));
9 [ n* w# N8 H# f! D" d& e else! E {4 x0 S# B6 g' s. [; F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 ]5 z4 W& m; B# E! L
to_str("in docking station: \"",?.~.name,"\"")); 9 x9 L# S% d0 u
end;
$ d. K5 z: |( L$ Q s else+ o# F& W- J4 i: @
@.Destination := assignLObj[1,row];" \7 }+ V, p x8 G. ~
end;
R6 L. C, |# p0 p7 U newDirection(@);8 L$ v, G/ B2 x: h I% V3 ^
@.HasOrder := true;
$ I$ l# B2 c: }9 F* r end;6 l$ H+ X1 \" t9 ~1 ~" ^3 Y
end;
( `" V. o8 a2 i+ ?5 \end; -- of the method- P: Y8 o2 r7 F5 Q
|