/* called by: entrance ctrl of the object 'track'
6 U/ x7 \) g2 L0 A*/ y% m$ G! C* o) S' K7 G7 ~
is
# K' K+ u" T& o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& @& ` C' ]3 i" T# Q. mdo0 D# @/ z/ V8 d! p
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 T g6 b4 Z$ T3 `; l if current = @.Destination -- else return/ h# m) J& V$ }
then
0 h( \+ w" B( \, u: V- ~! u- S @.Destination := void;
# ?" t; p2 `4 f6 n7 i* v if @.occupied then! ~) M- ]; E/ i1 {, @
part := @.cont;' P; K' E) k* i/ F4 z( {& F$ ~8 O
@.transpOrder := void;5 K3 t) A4 b. h* ]) ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; `; L& p; G. B) n& [' R @,root.eventcontroller.simTime);8 V) ^6 F) q& F
@.HasOrder := false;
. F% }* m. K% A @.DrivingHome := true;
) u9 T+ H- I- o# c7 \% J rgManager.tryToStartTransOrder;6 K3 f7 m: U0 ?! T9 x H
if @.Destination = void5 E/ j# k. B# K5 g
then -- no transport order for vehicle @
5 P x% o& _) l; ]7 D @.Destination :=, v3 y8 _$ C' J& X! a6 p7 j, m2 G
rgManager.nearestFreeStation(@,track.~);
8 w0 N/ m4 x! J2 T* i newDirection(@); * b+ ^$ A5 s% W; E" Q1 ]8 \
if @.Destination /= void then1 t3 d; {1 S' p* S E6 }
@.Destination.NumReservation :=& i# w0 v& w- q+ U# L4 j3 ~
@.Destination.NumReservation + 1;7 o& i) ? B# w2 _
end;
" R! T$ |! i& L @.CurrIcon := "drivingHome";+ C& R! ~: \: @4 p
@.DrivingHome := true;, i l" `9 K. s" F
end;, X. Y9 t/ o1 C7 k0 Y ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* T% l6 \2 G; z( {* R+ z
part := @.transpOrder;
$ { b# [' J3 q* U# m; M* P" | part.move(@);-- load part
# O6 g- E G( l' n& ]9 D @.CurrIcon := "load";) K7 q4 w: a3 O. N% t/ v9 [9 W
GlobalDistObj := part.globDestination;; { {1 T, z# }3 X9 I
assignLObj := rgmanager.rgAssignL;# Q! ?9 o9 b( r r- G
row := assignLObj.getRowNo(GlobalDistObj);7 _$ {" r' Y* M+ |
if Row = -1 then -- since 70' h/ Y: e8 P7 M- U
if lan=1 then
8 _$ M" d$ c+ g2 R) n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# j) d: D3 N6 a' p to_str("in der Andockstation: \"",?.~.name,"\""));$ r1 v0 b# ~$ {. F3 \) P& f1 @
else- Z3 B+ ?3 @3 p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ \1 V/ j2 J% q) h& \1 O to_str("in docking station: \"",?.~.name,"\"")); 2 m# D: E! c8 |8 Y; T( @9 A* W" \
end;
" A6 M9 T u! U" B: j" e% v0 W: i else
0 C0 y. N' n$ O @.Destination := assignLObj[1,row];
7 I4 g" q9 k- k: [, S% c end; 5 d+ i8 X$ Z( }, J, [( q Q
newDirection(@);* f4 r2 C3 ~4 h3 P9 J
@.HasOrder := true;4 W/ X, a/ s7 p& c1 c1 ^% E
end;$ Y) G: C% e9 q& ]2 w# h' D! }6 t
end;6 f( J0 ]7 K' s. u3 i1 N; x
end; -- of the method5 n$ K$ V0 D+ g; Z7 A) ?
|