/* called by: entrance ctrl of the object 'track'
; O+ P% B$ i6 h*/# D% G' v$ a+ c `
is
/ C9 }1 c# F% z/ s& d part, GlobalDistObj, assignLObj:object;row,Lan:integer;- w6 e# {' H: v. ]
do2 n* s2 j) D9 t. S) P0 {& R
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 d# S# z& K3 d/ |/ u9 ~* M! c if current = @.Destination -- else return+ |* N8 S, N6 x! A: b8 O
then! _: e, o( M! h. ^, x) C8 f" r
@.Destination := void;
- m& t( `) b! _( j7 M+ | if @.occupied then
0 v% ] p9 k: F. e t- w, Z1 ~4 { part := @.cont;
+ Z8 M5 M' Q: @& a) Y @.transpOrder := void;
( ?& m2 L8 ^- W1 e1 a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ {+ k& r9 ?* m& ^# g7 Y3 _
@,root.eventcontroller.simTime);
- z/ b" }- r& H! O- J! L @.HasOrder := false;
; o3 D* h8 r5 r9 q) i0 \5 W @.DrivingHome := true;; u1 b7 N; k# Q4 n0 S
rgManager.tryToStartTransOrder;
, q& z: u$ W$ _" i6 u5 F if @.Destination = void8 k: a8 V# [( F1 Z0 Q' z2 p3 l- z' ]
then -- no transport order for vehicle @
7 u3 F3 ?$ a. J# `& e# j' C @.Destination :=
0 q7 i( m* w& ?. w0 ]3 S ?8 a3 y rgManager.nearestFreeStation(@,track.~);
+ i: l! Z. Y! w+ ? newDirection(@); + O3 a2 F# e3 L+ r, z4 q" F N# w
if @.Destination /= void then
6 s6 y+ P( Y0 w @.Destination.NumReservation :=
0 f7 v: {* ~/ _9 v+ | @.Destination.NumReservation + 1; z1 ?6 O1 s; c* x: U8 A% e; @
end;
y7 i. h8 v) ?4 Z. }, e @.CurrIcon := "drivingHome";9 D* n. J4 U6 \& d" K9 x& r D
@.DrivingHome := true;
& j2 L9 g$ f9 t0 r end;
7 \4 T8 K. r( {6 b Y5 K/ v4 G& U else -- the vehicle @ is empty, both vehicle and part are in the same dock station, U! _8 z- x: @0 s6 E+ J
part := @.transpOrder;; E0 p' f. R+ Z% X
part.move(@);-- load part
* a U. C6 T8 }1 g @.CurrIcon := "load";
5 G* Y: O0 D7 `" w GlobalDistObj := part.globDestination;/ R9 ?. }6 \4 t# Q
assignLObj := rgmanager.rgAssignL;( x* p9 U+ }9 U' r$ } U
row := assignLObj.getRowNo(GlobalDistObj);
7 t! S% m) T2 Q$ O9 y0 B: q: T" } if Row = -1 then -- since 70
2 C3 H8 t/ q7 g0 w' K0 F if lan=1 then6 @, s9 F6 J5 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 g; h& j: C2 O! T* q
to_str("in der Andockstation: \"",?.~.name,"\""));
4 d8 u. z1 d/ S F3 M else
2 h' M1 v5 T* t) m" a4 g( P# O% |) v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ ]1 B8 n5 K5 r5 y* g
to_str("in docking station: \"",?.~.name,"\""));
4 O% S7 {5 X" `: j! ]- a4 b end;
( w3 K* z; W6 D1 e else3 x% L8 O0 k: e; v" q! Y/ K' T
@.Destination := assignLObj[1,row];+ N: i" i# d" C4 f$ ~; r
end; 4 F) {# j' _ m7 y& \3 {3 \
newDirection(@);
# D/ ~/ X- s" n. a7 c0 l0 ` @.HasOrder := true;4 K6 E/ |( l/ V2 N
end;
+ ]* V, R }2 H$ l+ h8 _. q end; \. H0 v( R6 z6 v- }
end; -- of the method
- d2 M( ?. s! ? |