/* called by: entrance ctrl of the object 'track'
) j1 Q* K9 ]. q; O. x*/
8 u Q- z( C! o2 N$ w. h2 wis
3 l9 }7 r: h n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* E+ T. g; [; \7 d$ ]do
# q4 P8 X! z- W' O4 Q: q Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ^ B$ |" ]' e if current = @.Destination -- else return- j7 X* e u% J6 j# X1 H- p
then
/ l$ P0 X( ]0 V9 J1 g0 g6 w @.Destination := void;8 M6 ]- Z( }$ L5 J. V2 A6 s
if @.occupied then
1 U& j O& T2 k9 P part := @.cont;
. ^; g: `/ ?/ c8 I# F @.transpOrder := void;: _4 Q& G$ h3 t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
H9 {1 J8 P! h) A @,root.eventcontroller.simTime);
- r6 w1 J2 W* S9 p g @.HasOrder := false;
# a- q2 V8 z- ` O& l# l7 r8 { @.DrivingHome := true;5 ?9 F" {1 h7 M, G$ Y7 n! ?
rgManager.tryToStartTransOrder; R1 \4 v) x$ d7 _7 M4 @1 k# g1 m
if @.Destination = void
. f8 t5 t3 N! S2 V then -- no transport order for vehicle @
5 ~5 p" S( ~3 w0 B @.Destination :=' S% M3 Y; e; r# D: ?9 v
rgManager.nearestFreeStation(@,track.~);. H7 h4 L, M, d5 w+ E, U
newDirection(@);
: x6 r3 Y- M6 ?. \( F if @.Destination /= void then- @' o" y# e$ d7 c9 O- U# O
@.Destination.NumReservation :=
7 s* J2 m; n# C, o& e @.Destination.NumReservation + 1;
! h" _0 G: K+ I" x6 d8 ~5 ^ end;4 f* X. x% R. N! h. U% b! ~
@.CurrIcon := "drivingHome";- m7 ?5 d/ l$ Y# a7 g+ a3 H
@.DrivingHome := true;$ Q+ \5 n8 G9 c) _' u
end;) P: }# {! w% ]( Z v# t ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 U1 e6 Q$ |, ~2 @1 N
part := @.transpOrder;
; i- l1 ]/ |, q a( R' s' h3 a; u part.move(@);-- load part
3 ~7 a! r9 d$ {) B9 g z- y @.CurrIcon := "load";
1 ]4 e! d/ z# C8 |- [2 g) q GlobalDistObj := part.globDestination;
4 [* X) a+ h; \" s1 ]0 q6 m$ o V) l assignLObj := rgmanager.rgAssignL;
# y5 `7 K' \9 k# X8 ~. B( o/ {) ^ row := assignLObj.getRowNo(GlobalDistObj);
. R* W6 J {8 y. l$ }" |. [ o3 ^ if Row = -1 then -- since 70. u+ R" q7 ]6 H! t; i: `
if lan=1 then% X& R* V1 `& ]5 \7 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# D( B% o$ _* L9 p$ D2 H& U
to_str("in der Andockstation: \"",?.~.name,"\""));
( R$ l$ E: {1 _5 R else8 w1 Z F) D2 }6 X3 i: g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" L# ] N; Q" u l5 t3 O8 U8 ? to_str("in docking station: \"",?.~.name,"\"")); 7 d! y$ Y! C( C' f* D4 n2 K2 L
end;
/ R9 H% V9 O( K; z) d R# q else: P: I- }% a. v; i( W6 P
@.Destination := assignLObj[1,row];& \3 ]+ `0 J1 P9 [1 b g
end; 0 q8 z( y; X/ I3 \" v# I% A# x f
newDirection(@);
( J/ `& r3 h2 i+ |: b) e7 n. z @.HasOrder := true;
2 u8 m% y K1 F. G: K end;8 d* R" k1 k K
end;
3 V' G& k2 J$ f" e& xend; -- of the method
E3 |. S7 @6 i3 e; Z! |9 X |