/* called by: entrance ctrl of the object 'track'' J! Y- ^5 s: c- H* b% F& Q2 h
*/
& i6 I& t1 z- d5 e M' t6 |( jis
$ ~7 F. L6 L! ~- M$ F part, GlobalDistObj, assignLObj:object;row,Lan:integer;( D7 u' P! ?# g! e
do9 w4 ~" l: e3 x: z- r: `! g7 Z8 e/ _
Lan := rootfolder.Internal.Tools.AOLlanguage;5 K$ M/ o: p/ @! A; o. {
if current = @.Destination -- else return
: f3 ?, _& G$ ~- g( f3 v" x4 Z then: d" Z0 w9 Q/ x" `0 y& K% Y. I
@.Destination := void;. `5 J0 O: c/ b% D6 o
if @.occupied then
; o( {+ u5 u( u& F part := @.cont;7 N% `! P8 Y8 e. U, b3 E
@.transpOrder := void;& o/ ^8 L1 j6 I1 K% B4 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( `% e4 A5 S$ ?' `: D: X* r @,root.eventcontroller.simTime);
2 a5 w1 H. |2 o- B @.HasOrder := false;# [3 S0 I& c: V/ N
@.DrivingHome := true;; w! T7 O i r+ k4 H
rgManager.tryToStartTransOrder;9 w- _& ?) k8 Y; q% O k+ w+ R
if @.Destination = void
+ |; H: b. d* c4 h then -- no transport order for vehicle @
2 A$ W4 m4 ?$ [7 N. q @.Destination :=
- Z' [6 I/ O/ m* j, \' y( P+ B rgManager.nearestFreeStation(@,track.~);
0 G4 w$ A( R: p& m" l8 X+ ? n newDirection(@); 2 C6 a$ J! a* z' V. m
if @.Destination /= void then2 n7 b9 H) O$ V2 d* j/ p% o
@.Destination.NumReservation :=' p7 z* b* @% N, U9 [
@.Destination.NumReservation + 1;
$ F6 Q% S& l$ a2 C9 m7 F end;6 S2 p, s- |, G1 Y0 W6 D# N
@.CurrIcon := "drivingHome";
5 [2 G! l/ m- t0 n, H2 h% G @.DrivingHome := true;3 }7 p9 j- v4 ]7 { y6 b
end;
+ ~+ }; b8 A' C/ m else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ o8 w& c: b0 Y. r
part := @.transpOrder;! z9 o/ `7 P2 T/ G
part.move(@);-- load part
3 |5 M9 m# V: H" ? @.CurrIcon := "load";/ Z8 Q) G6 U# ?2 ^5 U
GlobalDistObj := part.globDestination;4 \* @- m' w2 D& {0 i0 g/ `% }
assignLObj := rgmanager.rgAssignL;
& K" j( f9 T& a% s row := assignLObj.getRowNo(GlobalDistObj);
0 D) a" f" a. @ if Row = -1 then -- since 70) T' }6 `& v0 {0 \4 A
if lan=1 then. q) R6 ]' Z- N3 L/ p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 ^) C* c$ [! b to_str("in der Andockstation: \"",?.~.name,"\""));
+ ?6 J4 t" k; I# B/ {# m else0 m. _5 l; y. z$ O9 ^# `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) v/ }& ^$ p1 D; w3 e% v to_str("in docking station: \"",?.~.name,"\"")); * y* F. [; m! D- r
end;
5 x( e: o8 k" {3 f5 f6 q- b else
9 T2 ]' Z8 `8 u. T8 u, P @.Destination := assignLObj[1,row];( e0 b2 W, ~2 o2 V! z# U! p
end; 5 U) r" [7 f9 M6 T2 b
newDirection(@);$ q# V4 U, Z% O0 `$ \
@.HasOrder := true;
+ W% V5 ]' k6 T A5 ] end;& q' I6 D0 W x
end;5 \' L, o; R* g; T
end; -- of the method& p# h+ L6 F: t! L% _1 w6 B
|