/* called by: entrance ctrl of the object 'track'$ p; M7 y+ }; p- Y
*/
- g( n& ? u+ c) Fis
% ~/ |2 p9 J3 n) Q& S part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* F3 c0 S4 m" F" X5 e( p2 c; ado" ?- r& b- j1 F" e
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 a8 [: U' a9 _/ b' F& O+ g if current = @.Destination -- else return' k2 {# l9 M( _1 a
then
, l/ x+ A' A0 u; Q @.Destination := void;
: {) s; o' ^1 |! s/ v if @.occupied then" \ p x* P8 h | }; h
part := @.cont;6 z5 M$ B; }, J
@.transpOrder := void;2 q4 }4 k, r9 E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" e; {8 v8 b! E @,root.eventcontroller.simTime);, D+ y, H- X# F. J% x/ `5 m; |
@.HasOrder := false;
i$ a3 W2 C. J: N: n6 t @.DrivingHome := true;1 P9 H: {# Y3 W- m4 F9 W# c
rgManager.tryToStartTransOrder;
/ A- v' L: E) g2 W: p4 T1 R3 ` if @.Destination = void) S- ?; t+ a) a" B
then -- no transport order for vehicle @( @9 |8 c" F' m
@.Destination :=
. D; I1 N) e5 K+ V! U rgManager.nearestFreeStation(@,track.~);7 z+ N6 J6 y: w Y
newDirection(@);
2 \6 l* L& @- m. R- q if @.Destination /= void then
8 K2 Y. ?" I. }6 [ @.Destination.NumReservation :=
i2 J! e# q2 G$ z1 _# a! O @.Destination.NumReservation + 1;4 Z5 C+ D5 j5 [/ S
end;
7 \4 J9 r- L1 L @.CurrIcon := "drivingHome";
# h; L E6 G) Z3 C6 w @.DrivingHome := true;
: O9 L y% _0 o, Y/ ^ end;0 Z8 z! d7 i4 g! w* G0 S* \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 I) v0 Y. `- a, {
part := @.transpOrder;
8 P0 g- }' ~0 X part.move(@);-- load part
( G0 X4 S0 d$ l: ]. ~1 C @.CurrIcon := "load";
# {: {+ a; |4 Q GlobalDistObj := part.globDestination;
5 {5 U7 J2 X- ? assignLObj := rgmanager.rgAssignL;
' y( N+ |- c. n7 [ row := assignLObj.getRowNo(GlobalDistObj);$ U( o. N& F2 `* E
if Row = -1 then -- since 70
7 T6 r. a7 I1 d* P) m& Q# M if lan=1 then
3 n `: e$ [1 g- C6 C# A4 A2 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 q) e* V4 E" ~; A) s! I
to_str("in der Andockstation: \"",?.~.name,"\""));
- l4 S# l \: M else9 Q3 ~4 l9 p: B! G1 R5 j7 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. {0 b' g" v( ^3 U0 f) [! L to_str("in docking station: \"",?.~.name,"\""));
' w/ H, L# |, d- G2 m# N9 f end;& v. h. ~3 S- ?
else" V- p, ^9 U+ p7 n+ O) V
@.Destination := assignLObj[1,row];
9 n" F: j+ \# i5 o3 P0 S4 y) n/ D end;
& n* L9 O1 f" K9 B! l newDirection(@);
% k& J" r8 \) Q @.HasOrder := true;
* O* Z( r* W' e end;$ q0 h3 g; g. B) k8 Q( f H
end;
2 A0 ~# X% V3 A7 p: H! \8 N' P& send; -- of the method
4 e3 s& c0 }; L( e/ U c1 F" L |