/* called by: entrance ctrl of the object 'track'4 R! l. D2 m' y _% j3 S w+ j+ m* E
*/$ e; G0 z, W. a1 B. Z/ ^
is, V& {+ i* p8 J6 o0 p! h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# g7 r) M" O* V, w' C* E: Rdo9 S8 j8 m7 R# ^/ ^+ ^
Lan := rootfolder.Internal.Tools.AOLlanguage;+ H+ }3 c6 ?7 c! U q6 j8 H4 {" `" s
if current = @.Destination -- else return
4 b* f6 L4 p* ^' h1 \ then( d( q7 L& ~* g, K |7 g5 V5 p
@.Destination := void;: E$ |. l/ e( A A/ C
if @.occupied then
4 p1 Z9 L( Z0 q; E5 }+ W; A6 O part := @.cont;
; P0 _" a/ u# E @.transpOrder := void;
! V& T0 [2 q4 t3 P/ e& J( q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 M$ V3 O3 E- Q$ J% O$ s) S9 T
@,root.eventcontroller.simTime);6 o' \4 l; L, Z) h
@.HasOrder := false;' S. g( A7 A: I2 A7 \ C: e% N, l) u
@.DrivingHome := true;
+ L. J' _: M: f rgManager.tryToStartTransOrder;$ ^. B0 ?% s+ F# i% Z' X4 V
if @.Destination = void, y6 m# V3 Y) }# O' u0 g5 O4 h
then -- no transport order for vehicle @
" d0 N: G7 }! A% a! e" r$ T' u1 { @.Destination :=6 ?! Z8 u' Q4 C6 c( r3 a0 O1 Y
rgManager.nearestFreeStation(@,track.~);
; K2 u) N% {9 ?3 p4 {" _ newDirection(@); " O `% _8 _2 z) T- o" o: I. y
if @.Destination /= void then
0 D# K( F; c: c& o$ P) W9 i% S; r" L @.Destination.NumReservation :=0 Y1 W6 q& J0 `( J
@.Destination.NumReservation + 1;$ m1 B3 S) \+ w
end;
/ ^4 A5 C4 J( K/ |3 Y& Y) q6 C9 _ @.CurrIcon := "drivingHome";
& {) `. j) I/ I) ? @.DrivingHome := true;
, x8 j# S }2 C. [ end;8 S* B+ H& E6 H( d2 S. i, q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; S) k* a% | r: j! o5 o
part := @.transpOrder;8 I: s& r2 H0 j2 ]& G7 A
part.move(@);-- load part, b7 S L7 J+ X$ M
@.CurrIcon := "load";
0 V/ w: A1 K8 w3 H4 W GlobalDistObj := part.globDestination;
* i% a5 r- z- L+ J6 }) \ assignLObj := rgmanager.rgAssignL;3 N. \1 ?" ^- L, X6 ^3 A
row := assignLObj.getRowNo(GlobalDistObj);
: }3 J o _0 w if Row = -1 then -- since 70
2 z3 U# c S) z0 f/ [ if lan=1 then: n. _+ l# a4 N8 G, w- K* L+ r* m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% i2 Q, T9 ~! L, X. R2 a to_str("in der Andockstation: \"",?.~.name,"\""));8 f4 ~/ ?3 x- Z) ?& H
else
, z; F9 [/ w$ V9 L; l) Z. A: G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' G* y# V/ m. U6 P9 m) b
to_str("in docking station: \"",?.~.name,"\""));
+ R- p0 Y2 f/ j+ k7 n end;
( ?& l0 z* \. Y4 ]) }) \ else- R: o- E( L# {
@.Destination := assignLObj[1,row];& F0 U# w$ w1 v0 [" D9 m
end;
9 I$ _$ ^. t* A( t newDirection(@);
& E6 i' S$ h8 Z8 n) ]- r( p @.HasOrder := true;
( G( p3 Z' m& F4 E5 a/ ^0 ^& ?2 w end;" e) ]( O0 `- p: q8 B8 d
end;
% Y, n, H" z: Z7 Y2 Wend; -- of the method
; g! j/ o/ l; A5 {3 g$ a; T |