/* called by: entrance ctrl of the object 'track'
) u' c/ Y1 C/ _' d+ S*/
' [# \+ p! G! {: z4 Ais% w; v6 W4 Y$ n8 z( G; D* `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; i$ i$ t; X6 c) y! f
do
% O' X& o0 \) O& }! [$ `7 G9 m4 K Lan := rootfolder.Internal.Tools.AOLlanguage;' M. s: z5 F4 w6 m5 r
if current = @.Destination -- else return1 W* w: z7 q& q- p O4 O
then6 l. c `) f# a, H1 p
@.Destination := void;
# L) q# O$ C4 _& g! x$ | if @.occupied then
2 h" T/ p/ x1 Z* G9 n& T w part := @.cont;: s0 k# i# Z+ t, y7 K2 o! X% t- j
@.transpOrder := void;6 a. f9 w" N. `3 @- u0 \& Q1 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 f' t; V5 \& [2 s" r! U
@,root.eventcontroller.simTime);$ h+ D6 R: T2 p8 D
@.HasOrder := false;! C' R9 D8 A0 W4 `
@.DrivingHome := true;8 O6 J$ ~6 Y7 ]! l. v0 @ V7 {3 @
rgManager.tryToStartTransOrder;
X j8 P) ^5 Y$ N2 {& n$ ~1 H if @.Destination = void
: Y1 ^6 G; ^ q; F7 ^. t+ ^ then -- no transport order for vehicle @
8 g% f+ R# l$ X @.Destination :=/ T* [, H. t+ e$ G! R( G' @
rgManager.nearestFreeStation(@,track.~);" m' {6 @4 `& l. `. R
newDirection(@);
! Z( d) A5 [2 v: @% Y {2 Q if @.Destination /= void then7 c* L8 P% S7 [# s" Q& r
@.Destination.NumReservation :=
- k) [& v/ q7 D- _! S @.Destination.NumReservation + 1;0 t- u1 o* V& V& u
end;
8 A. z; x+ m( ?7 y' M6 w! r @.CurrIcon := "drivingHome";
' u0 ~7 H1 t1 \$ l @.DrivingHome := true;
6 W6 q/ i+ Q% X' l end;
' h/ T; I) s5 F [2 d) ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 r" x" @" r+ _ part := @.transpOrder;
0 L% P0 Z2 q8 h! b0 L# @: i% Q0 I% W part.move(@);-- load part9 A" |+ G6 x- w/ j. ^
@.CurrIcon := "load";9 y1 T! [/ f6 V2 ^9 t# |
GlobalDistObj := part.globDestination;
) G$ R4 m- B2 D( l7 o, V assignLObj := rgmanager.rgAssignL;
5 _4 j- a L& Z( }: x0 V row := assignLObj.getRowNo(GlobalDistObj);' {. o$ z5 @% b0 P1 L( g
if Row = -1 then -- since 70
8 u) Q' V/ z( }$ r. N0 D& h if lan=1 then
# e. F0 } j% S+ C2 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 f% {" b) R/ }6 e3 k' E- \
to_str("in der Andockstation: \"",?.~.name,"\""));
7 G: P+ `* c0 y% V' s else
6 `* Q: s' `8 V; Z5 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ {2 k- Z; k! H# F* H, ^ to_str("in docking station: \"",?.~.name,"\"")); # C- T9 I" u! m, c e
end;
" [# E0 {0 V8 Z% v1 e* l% o2 p else
4 E- ^$ _4 x- u$ u8 J m6 f @.Destination := assignLObj[1,row];/ i9 s! j+ Y7 G7 T4 B
end; 0 U" p8 R8 l# K' q/ L7 |
newDirection(@);
: N# u' L0 g3 A/ E @.HasOrder := true;
' ?3 l) \6 i5 l' ~# L" Q end;2 M3 n4 A# |& c. U
end;
. }, n7 @7 O, N& Xend; -- of the method3 \" B& A+ ]; H5 H5 J6 O0 X
|