/* called by: entrance ctrl of the object 'track'
1 R/ j) t9 g8 p( w9 E% v*/4 i# ` O Q I% [& Q& ]! Z& o
is
: T4 i. Y1 f! O1 ?# ~+ Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 i8 b& T( S6 M# p
do
. d9 e& U5 d4 F2 _- E, A Lan := rootfolder.Internal.Tools.AOLlanguage;, M+ X) \: y, O c: x- _, G
if current = @.Destination -- else return% X9 |6 P3 d l
then+ M4 u# h. `( n% C: M
@.Destination := void;+ w s4 u- {( t4 k) z, h
if @.occupied then0 L( N/ x' \1 R/ F
part := @.cont;
2 u6 J1 w8 D0 x7 ^ @.transpOrder := void;( {$ ~$ ?7 d# l2 ]6 L2 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: A5 U: V3 a {6 Z( ^' z) }9 W @,root.eventcontroller.simTime);, i( w+ @7 ]5 u/ |; y4 r
@.HasOrder := false;( k. y8 `- `& r0 ]2 t6 Y: q
@.DrivingHome := true;
5 ~ u& q) j6 K9 Q+ }7 P$ |8 v* t rgManager.tryToStartTransOrder;; X o( Q& y: p7 q8 S7 U( x
if @.Destination = void
2 s) X- x( B0 h8 T$ e Z3 B; o/ w then -- no transport order for vehicle @
& S3 ]' Y a: O+ \2 b4 L. h @.Destination :=
2 g* q G A" F( ?) Z! F! A rgManager.nearestFreeStation(@,track.~);* z" n) p( D, K
newDirection(@); + V z0 s0 x) K9 B; B' d' j) p
if @.Destination /= void then
7 M5 ]+ z. ]. d; y9 {9 ^: O n% b5 ]/ `0 S @.Destination.NumReservation :=- O k6 d8 @7 r3 T1 \3 F" u/ W
@.Destination.NumReservation + 1;+ k4 p) i9 ?7 r) Y8 Y: ?
end;
+ q% m4 Q8 X) _1 t* z6 Q1 Y V: s* m( ]# I @.CurrIcon := "drivingHome";! z' u8 c1 b0 M6 c/ C
@.DrivingHome := true;
, K2 I, _9 Q. T. h9 i% N end;
; n5 h7 \! e- P* [! G" N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' E; S4 Q7 [0 [5 x7 {' z6 |: E part := @.transpOrder;% D% I7 n2 K) \1 P) I9 k
part.move(@);-- load part
1 a# S1 g; l# [6 E5 U- M8 J @.CurrIcon := "load";
) m- l! p* v( e& Y9 M) U k GlobalDistObj := part.globDestination;
# P+ |8 P. X" F( }; n+ ^2 ^' a assignLObj := rgmanager.rgAssignL;! z; v2 w& M+ j7 C
row := assignLObj.getRowNo(GlobalDistObj);8 d( ^9 D' S) H" L; l5 k7 H
if Row = -1 then -- since 70
, h% g& Y) y6 z2 L' N" X if lan=1 then
7 m) ^2 V* c5 o/ w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% I& {' j1 o9 N- ] to_str("in der Andockstation: \"",?.~.name,"\""));" J; ?# ^* w5 @/ z; J
else
: o2 j+ D: ~: ^' o0 G2 {" f. S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: P z8 r/ Z5 V" H, j5 P
to_str("in docking station: \"",?.~.name,"\"")); 2 S# o1 x3 q3 [% b: e( Z
end;" V1 D9 u0 i" S* C+ N7 I& u; |
else
: M; p/ [- P5 X O @.Destination := assignLObj[1,row];+ K+ o0 K! t& c6 [
end; 5 a, Q, R4 b. P
newDirection(@);
4 D' W& }1 A* r @.HasOrder := true;
0 Z) a9 y) w3 j6 V) z: w5 H end;0 p3 J7 X! {% d' t
end;
+ R3 d( S4 a/ p! iend; -- of the method
+ \" C2 G. v/ l5 V |