/* called by: entrance ctrl of the object 'track'
4 s$ Q& c3 C; z! d# u/ |! D: Q*/( W0 G, n4 R# Q* J5 @/ [: ^
is
/ G" ~& r) X% K/ ^7 z8 @1 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 i* j3 f' }8 f# Xdo; y" W- y" W8 z- K
Lan := rootfolder.Internal.Tools.AOLlanguage;
u! F1 l1 P) l1 l& W! h if current = @.Destination -- else return
! j8 W8 v# d0 ^ then6 f% z b$ o* |0 I+ E
@.Destination := void;3 R8 {# ~& o4 i0 r
if @.occupied then
) X& A' [" c( u1 f g' S part := @.cont;
1 ?. f' C' J, e% D+ P @.transpOrder := void;7 r. K" W; E5 E! R4 ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% f6 _2 ^+ _( |" |" P, S @,root.eventcontroller.simTime);
, q) A/ l% h& ~3 P @.HasOrder := false;7 w1 G6 r m/ z# R
@.DrivingHome := true;$ H* s2 y0 e' ~; R
rgManager.tryToStartTransOrder;% K& J: e2 e. |- b/ v
if @.Destination = void
! s) b6 }+ S c then -- no transport order for vehicle @
9 g) C5 V1 m: Q8 O( L. H @.Destination :=
^2 _( _* l% g+ G( Q rgManager.nearestFreeStation(@,track.~);
2 G- G2 C7 D; _4 U2 ? newDirection(@); ! o9 t9 m7 k" a. H
if @.Destination /= void then
5 |7 |7 _" |: Q) {5 V; K: L @.Destination.NumReservation :=
+ r4 Y$ `; o, K T @.Destination.NumReservation + 1;
8 d7 P0 s0 K9 Z: q5 { end;- k8 p% d/ ?7 f4 N# K! A8 u! q
@.CurrIcon := "drivingHome";
; q5 i6 j0 @8 T) {! R& O @.DrivingHome := true;
+ I. U4 p, n- s/ }- _2 f end;- G2 e W5 }* B/ E4 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 c$ w" y4 y2 r e& @2 c part := @.transpOrder;, }! X1 _% x- x
part.move(@);-- load part
7 w: Z6 O5 F7 c3 u$ b @.CurrIcon := "load";- `* o7 W: J7 N5 z$ n$ v2 t m
GlobalDistObj := part.globDestination;9 J; ~4 `: S& [' r
assignLObj := rgmanager.rgAssignL;8 t7 R# H, ?; T9 `
row := assignLObj.getRowNo(GlobalDistObj);
9 L7 \9 [8 a8 P if Row = -1 then -- since 70
! z9 `- f% k' r" }* l L if lan=1 then
' v6 C1 b: K& @7 M) @0 a* f0 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& y3 w3 |: `% y0 m: Y' O
to_str("in der Andockstation: \"",?.~.name,"\""));9 C$ l1 d0 H8 I- ^4 L
else
- K! F8 m3 V% { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# S$ T( s' V5 ?8 O1 B to_str("in docking station: \"",?.~.name,"\"")); ( N( V% Y' p0 A: V7 @' s' o( D
end;
6 e5 i3 J+ r" v# E else
5 |, d5 S, c/ s @.Destination := assignLObj[1,row];
' |5 P x# l E( @ end; 0 k+ |$ ^) ]3 e& H7 \
newDirection(@);
& ^" E6 F1 m) f7 s @.HasOrder := true; r7 F: T, f: o6 I4 F; O1 H6 t
end;' C5 W- D4 \ T5 Y$ Z
end;8 w: @. ~9 f' e0 x/ S: \6 C
end; -- of the method
0 G( y* e8 L& Z% @ |