/* called by: entrance ctrl of the object 'track'5 L: Y9 m b- B6 U. F3 J' }
*/1 s! C' [$ M) k3 Y" U
is
0 C) d/ A2 p) F8 y% m7 P' P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 a; ]: b* p' ]. k) ]do
1 C }: k- @3 O8 p8 D8 M1 S Lan := rootfolder.Internal.Tools.AOLlanguage;# ]9 J3 M( {1 F+ A$ y% r* j; r
if current = @.Destination -- else return* O" e0 ^& l9 e$ m2 h" D
then
; i4 ]) `+ T8 Q+ E, D6 K- Z! [' c @.Destination := void;* h3 @1 Q4 l5 C6 g. \
if @.occupied then
$ l3 A6 |/ X! a/ O" M! ?2 V v [ part := @.cont;3 h& r3 ~( l6 g% h9 M
@.transpOrder := void;
/ b b4 e* y; e* e7 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ a" T3 Y9 P" t, k, j' Y& a @,root.eventcontroller.simTime);' d* Y( c% A: M m) n, j! o0 z
@.HasOrder := false;* ~% U! X0 h1 Q1 [8 r4 j! ?/ E
@.DrivingHome := true;. H4 {; A* a B2 `! ^! C
rgManager.tryToStartTransOrder;$ d) G/ \' t8 Q
if @.Destination = void# |+ Z9 M# ?/ H g2 U
then -- no transport order for vehicle @
+ V. U0 E Y6 H @.Destination :=
8 F9 e" j1 N7 t7 D rgManager.nearestFreeStation(@,track.~);
' f" e! s, `0 e# f) f t4 c$ R newDirection(@); 8 I: _8 L; s* p7 G2 w4 S2 f
if @.Destination /= void then
/ g# Z2 `5 W5 D' r5 E, {1 l: I! w" d @.Destination.NumReservation :=: @& o+ I# i- e2 I
@.Destination.NumReservation + 1;
. g# b. T& Z3 \' g( S end;. K/ p, J7 `' c( M
@.CurrIcon := "drivingHome";
& a$ R$ R; A9 I8 `2 ~+ o; N* Y3 h @.DrivingHome := true;
`& ]; P3 w E/ z end;
2 j! J: D- u7 {# T* W* c else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 |" ?0 [7 s% `1 N+ {
part := @.transpOrder;
. B: |! q" K7 k9 r3 [* p part.move(@);-- load part
: s/ ~1 T; k+ d3 D/ E+ l @.CurrIcon := "load";4 n$ j3 g9 e* E. G* g+ u- j: N
GlobalDistObj := part.globDestination;' h0 X$ m1 |% [7 L" k
assignLObj := rgmanager.rgAssignL;1 `) E- T p$ o" G
row := assignLObj.getRowNo(GlobalDistObj);7 @7 M, @, M. J+ A0 \$ U5 k
if Row = -1 then -- since 70
0 {* ?+ B9 d% D2 P6 | if lan=1 then
( i# k, l8 c0 w3 P& k3 ]6 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! M# q' H1 R4 w+ t/ u to_str("in der Andockstation: \"",?.~.name,"\""));
* N$ `; M2 u! C. d* C1 W, J else( d# O" }1 C9 f) I7 K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* W! x3 C! d- q4 }/ _ to_str("in docking station: \"",?.~.name,"\"")); 7 v* P9 i0 I: l2 U5 C
end; l5 g, z) N" E! Z
else: A" S( p7 Z3 h$ w1 O. `" `
@.Destination := assignLObj[1,row];
- \3 r Z! X; u, g4 \ end; " N3 _/ C( c8 K8 R! a( @( Z+ v
newDirection(@);, D) B z" d! `0 ?
@.HasOrder := true;6 N" M# `+ d, F) b) t% Y
end;
3 p* t+ O! j8 f5 H end;
, B) a; e2 Y, S9 ^end; -- of the method3 D1 N6 V8 f- X3 w1 P& b# \! l
|