/* called by: entrance ctrl of the object 'track'6 c0 a7 m% }; k8 L' x& w2 L/ H
*/. @, s6 X9 b; K2 K& g; w# |
is4 L& B: ?% z6 O0 D/ F" S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& x. c# s- d! D/ q. ]do+ A8 h. G* j$ f7 f/ J2 d
Lan := rootfolder.Internal.Tools.AOLlanguage;- o/ B+ W/ r8 {1 e ~% u; D! t
if current = @.Destination -- else return
" ^! ]; ^" U- \5 l; g2 M+ y: A then
$ E9 ^# b) A1 r! _6 I. ]4 o @.Destination := void;: o* _) F2 t2 h# ^. V) b t% l
if @.occupied then" ?6 c/ k2 D8 }" s1 B
part := @.cont;
8 w/ t% t, t7 |; ?1 Q/ F. i @.transpOrder := void;
% m/ l; A T& O" e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ O$ y( L5 I2 O! g: D# D5 t' m
@,root.eventcontroller.simTime);+ |% {! M) f5 \
@.HasOrder := false;
, p7 |5 I3 @, x" e! n @.DrivingHome := true;9 [8 y6 m# X# |7 @" b
rgManager.tryToStartTransOrder;( ^1 e9 \4 w& h2 y: u1 k5 b6 }
if @.Destination = void/ A: T1 i/ l( Z4 h$ m% C
then -- no transport order for vehicle @. B- `) Z$ p6 \/ y
@.Destination :=
7 N8 _9 P& d+ }& h- { rgManager.nearestFreeStation(@,track.~);+ n5 F, e, S5 V4 R( k
newDirection(@); . _0 z9 q6 W7 Z4 `$ Z: r7 l' m
if @.Destination /= void then
) ^# P% Y8 F9 i( H) Q @.Destination.NumReservation :=- S' c/ R2 r+ x N6 I5 R
@.Destination.NumReservation + 1;
: J' G7 I, _ I( {, b9 O8 m$ A end;
. ?- [' T3 ~7 p$ ~ @.CurrIcon := "drivingHome";
3 M" W- U0 @& x/ c, o1 D7 @ _ @.DrivingHome := true;
8 D) b' T; f4 a/ M# g9 W end;
6 n$ ?7 Z2 Y0 d8 Q% R8 ?2 X( ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station- N* s7 x# Q# [8 m) [$ ~' x( q
part := @.transpOrder;
& f7 S, y' E7 u2 W9 }. n/ k8 D' d part.move(@);-- load part; w4 u* v* a- _4 C3 H
@.CurrIcon := "load";
& ?5 q- Q; ]* s) a% j, n/ j- |- Z6 ~ GlobalDistObj := part.globDestination;
- x* r3 J. j. ?7 j5 e assignLObj := rgmanager.rgAssignL;+ |3 o! d6 H* f
row := assignLObj.getRowNo(GlobalDistObj);
/ k1 J3 n7 L* K/ S7 V5 q, X# l/ n if Row = -1 then -- since 702 x7 C! W+ ~7 E8 o. i
if lan=1 then v: T- \/ \; ]! \) f$ x4 ~# Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), [5 o* t+ v- e8 Z0 W/ Z7 b
to_str("in der Andockstation: \"",?.~.name,"\""));# |% N* X' T- W3 w
else
3 g; ^1 B5 q* g& p$ h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 l1 M; K/ S5 U
to_str("in docking station: \"",?.~.name,"\""));
6 m6 z: O0 r. w* s! m end;6 h* H' o6 N3 W/ r
else
7 E2 E, c* K2 y: E8 l* G! n @.Destination := assignLObj[1,row];: p% z# N* D1 q6 ?# t4 h: W; M& V
end; ) K* L/ p& G4 }9 j0 | n
newDirection(@);- i* C0 }, x; i- q4 o P
@.HasOrder := true;! m; j+ H+ J z/ Z. a! M8 _& [0 t2 w
end;. V5 y8 l* i$ H+ ^2 v: V
end;- U& [' b: i' \' g
end; -- of the method; w: I4 z/ E$ P9 d' Q
|