/* called by: entrance ctrl of the object 'track'7 i8 G* z D6 r" H* @
*/; p9 B: X$ g' k9 G: g/ P4 d4 R# v
is
- x. G3 p$ Q6 H7 u6 h( k# X4 r# [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;" |& s5 |# p# q/ W$ v3 z- i: V
do
$ W, k! l! A# Y Lan := rootfolder.Internal.Tools.AOLlanguage;4 z; c' n9 ]6 Z5 `0 V, }
if current = @.Destination -- else return5 ?% C* j! J5 E# q! Q) _& {
then
+ \& S3 v8 _' b; d4 F* _ @.Destination := void;
3 C5 @9 K$ t2 }' m# G if @.occupied then4 G1 k4 v" Y1 `; y/ b
part := @.cont;, E# V2 |- Z3 N; q+ I% R+ ^
@.transpOrder := void;
, ]* B% h% e* U1 F+ ~4 ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, h* x3 {( D- w: S+ v @,root.eventcontroller.simTime);* t! k3 {' Y- W6 K! T+ G0 R
@.HasOrder := false;' D* _9 C* t% Z& k8 T8 d7 ^+ L6 e
@.DrivingHome := true;
, a- A9 Y. Z( g' U0 l! I rgManager.tryToStartTransOrder;( V; P' r# m* ]- @& @
if @.Destination = void
, ?: F9 P0 T$ S3 g! S a then -- no transport order for vehicle @
[$ ~! q- q" N) S @.Destination :=
( F2 a0 X. \$ h4 _# e+ B6 Y% _& C' j rgManager.nearestFreeStation(@,track.~);) \ E" N0 [& J( k& k
newDirection(@);
' k- y4 H; b% s if @.Destination /= void then
7 H* S, e+ G4 Q m+ ? @.Destination.NumReservation :=/ N" @( H7 k7 T* `
@.Destination.NumReservation + 1;
1 W5 _% J" M0 m6 f+ J/ I; y end;
- ^6 I9 |& d p; w) Z1 X @.CurrIcon := "drivingHome";
( V3 d) G& U; s @.DrivingHome := true;
9 ~! m% j& @7 ^6 d, g end;
1 S) @% H4 p0 Z) b1 Q- [) e else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 U* S- F5 l K' s/ e6 L/ k
part := @.transpOrder; H7 }' u! n8 `( a8 t, a
part.move(@);-- load part+ i* c9 p/ d+ s
@.CurrIcon := "load";
$ l% t$ E7 \3 D1 M% `' a GlobalDistObj := part.globDestination;# r+ L# G# n& g* A& n
assignLObj := rgmanager.rgAssignL;0 y& l0 w6 a4 f
row := assignLObj.getRowNo(GlobalDistObj);! ]- W+ }: I% D, w( ^
if Row = -1 then -- since 70
# S) U8 \; F# c z( @ if lan=1 then
$ V- \+ y" ?7 T! R6 z5 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. Z7 f# j" e5 j6 b- w
to_str("in der Andockstation: \"",?.~.name,"\""));
8 U( }1 B. l2 \1 T else
# u9 O3 P2 ~8 z ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 I- F: z; W# Z to_str("in docking station: \"",?.~.name,"\"")); 1 H1 O; M! ?/ ?0 ]. E
end;
' E7 T! X* F. R( K n9 d) g else
( \/ D1 `4 @$ B1 v" P9 P2 N @.Destination := assignLObj[1,row];/ ~' L- [" q7 u
end; 7 p3 Z: }& ~8 H; ?; n* V" ~5 G
newDirection(@);
2 u$ w' w, u" L. c/ {$ L @.HasOrder := true;
9 V6 S6 n; A: E! m8 S/ ] end;6 ^* W) ?' x% f& i
end;! T2 [ l# m" T8 S" L1 J
end; -- of the method8 T. w0 [ D7 ^3 \/ V4 a+ q% i
|