/* called by: entrance ctrl of the object 'track'4 ~) E" H. X5 \/ r" _! c% l9 [- v9 ^
*/
; k, ~2 r; j, l* |, [is. d2 o% @( H' P+ G0 \1 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- S+ Q* S1 e5 ndo6 b+ Y* X- d' D0 o# C
Lan := rootfolder.Internal.Tools.AOLlanguage;
* ^- v2 I! Q E! J) }$ _. x if current = @.Destination -- else return, p, | \- i* V, v* K, y
then- E9 U0 O) T G
@.Destination := void;0 c. K( t3 W4 A8 A; X+ B1 u
if @.occupied then
7 r3 r+ x9 L$ {, B part := @.cont;
: w& p6 B9 V3 X- ~9 a! k" V @.transpOrder := void;
) b0 w0 y) J8 i6 N4 x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* y8 x- c$ H6 k2 \4 x c
@,root.eventcontroller.simTime);: N- K& U0 F+ L# x2 d f- e
@.HasOrder := false;/ y2 R1 B( G" U3 n3 J7 V/ D
@.DrivingHome := true;
- D: @- T" N+ J$ _+ r/ ~ rgManager.tryToStartTransOrder;
/ f9 L1 G( ~% o- ^ if @.Destination = void5 L6 ~& u. C: k. v8 w" `
then -- no transport order for vehicle @
* f4 T6 e6 l: \8 ^7 l: w2 g @.Destination :=
( r: O3 E2 \' A) D0 q$ r+ J rgManager.nearestFreeStation(@,track.~);9 K+ f% H9 B$ v3 W# D ^
newDirection(@);
4 b, [6 u* u; Z( i& |6 C6 { if @.Destination /= void then
0 x( F& W; M, G" c, l5 }9 R @.Destination.NumReservation :=' [1 n; |1 w; g) j/ z5 x% B
@.Destination.NumReservation + 1;
3 V: c( a/ t! }( Y end;
, H& S w+ i7 F" b @.CurrIcon := "drivingHome";5 k! `: @! W5 ?, k
@.DrivingHome := true;
3 V0 X! n( c! L+ V end;: u# x* r- ?4 w0 s& ~5 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 s' A" S5 Z7 G5 ?& u
part := @.transpOrder;6 U" X, y, k/ [1 z) i3 t
part.move(@);-- load part
" v4 y- p; L6 t) J5 p- n% ] @.CurrIcon := "load";+ i) g8 [) g) a* N+ R# P( u
GlobalDistObj := part.globDestination;
5 b3 `& _4 T- y3 O8 L4 O1 o assignLObj := rgmanager.rgAssignL;* a6 q% T7 {2 o- Q. D: n0 F
row := assignLObj.getRowNo(GlobalDistObj);
0 d* m; \( V3 ~. | if Row = -1 then -- since 70& J9 l. t2 g+ Q
if lan=1 then
/ [9 \6 R+ N' c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 C! _2 v6 V# g& [( Q4 I* x$ K5 L
to_str("in der Andockstation: \"",?.~.name,"\""));$ c2 {/ Y$ Z1 u- `& c+ U$ a
else+ p9 |6 O3 @7 p( F r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 C) G2 n" `9 O/ s2 @ to_str("in docking station: \"",?.~.name,"\"")); , ^: ~# s8 u1 e: ~9 o
end;" F: T- ^1 h& ~. O: X: B6 l: e
else! q! E0 x# I) e0 W M1 T0 ]
@.Destination := assignLObj[1,row];( l& e ~: w# r$ N$ p6 r% k
end;
' H) w. E0 q) D6 U newDirection(@); V3 D5 U3 _1 @ e. h
@.HasOrder := true;
9 z, c! @/ u0 E' A end;$ l2 C/ E5 S* T0 H# t& R$ P
end;5 O" G/ f- G; K9 d4 G j4 t. O% g+ |
end; -- of the method5 c7 ]( x. q6 y, d% }
|