/* called by: entrance ctrl of the object 'track' M6 s0 h4 q. U
*/
( v& g; x, ~. z6 ~! Iis/ I: z/ \1 C9 t" k4 z1 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ z- c. L3 i2 k5 ndo; l: m2 Y/ G# T# ^( I3 e4 J
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 W( W0 T# v6 q2 w! l- J, } if current = @.Destination -- else return
; T4 e' `- N- f; i0 U then$ ~3 m9 T0 p2 _1 S$ D8 r
@.Destination := void;) Z7 p* ? Y; n; d# @
if @.occupied then8 N; |5 S% D3 w: ]4 Z5 G! B# A }6 q
part := @.cont;2 O7 o w2 K. k$ x+ K0 U
@.transpOrder := void;
J2 Q5 L, s, ~% N' G9 R& ?. N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) u7 W9 }. j7 j4 b' }5 ~
@,root.eventcontroller.simTime);
/ u u+ }1 C) G& I9 k) F# I @.HasOrder := false;
' F$ W y6 L5 e$ }; h5 x @.DrivingHome := true;! Q& u, u+ c1 _* c: M- W' k' U
rgManager.tryToStartTransOrder;
, K+ w# k3 D: _2 J if @.Destination = void
* Y9 J0 o$ U0 y1 @( s& I then -- no transport order for vehicle @
' k% S L; r& N, I @.Destination :=
# P& s- X% w! X0 ` rgManager.nearestFreeStation(@,track.~);
3 ], Z$ S+ O" j: g* H# {% p3 c newDirection(@); - x9 `, D2 r8 x( p
if @.Destination /= void then, k4 Q( L( O8 r. X4 i+ Q+ S
@.Destination.NumReservation :=
& A7 s ]/ v# O: ~ @.Destination.NumReservation + 1;
$ b! c+ {4 u1 y% r1 _% d end;
; f% ^+ x" a1 |5 Z4 Y6 a. C @.CurrIcon := "drivingHome";! \$ g# E2 A4 k$ }; ]/ v
@.DrivingHome := true;! L2 j% x6 t% Z& O$ N; W
end;
' X' f3 G& h$ V. X. n# H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ i% |( }4 b1 t, ~8 w# n part := @.transpOrder;
$ O' a1 A% Y/ g) D2 `' B7 A part.move(@);-- load part
+ A: e5 K) @' r1 S/ x @.CurrIcon := "load";
' z; ?& ]* g8 j5 T5 ? GlobalDistObj := part.globDestination;
8 W0 b9 b- @" v4 F, Z/ ~4 t assignLObj := rgmanager.rgAssignL;
; H# A! z# J$ H$ b- I9 \2 h row := assignLObj.getRowNo(GlobalDistObj);; \3 e) {0 P7 F# Z6 r x6 Y
if Row = -1 then -- since 70
, h* `8 Q7 i! j5 i if lan=1 then+ \% ]( n; \ O5 [- E! k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' ~6 C/ g2 X4 @3 L _2 ?$ A2 N* b to_str("in der Andockstation: \"",?.~.name,"\""));' W# M0 ]: W. H! \) p& b! m& k
else) T. \" X l) F2 C9 V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 R2 i9 X4 R+ q3 `
to_str("in docking station: \"",?.~.name,"\"")); : S5 _! I: i: Z. _! e. H7 H
end;7 Y9 H3 T) {! x& u6 M* K
else0 x( Z) K! Z2 A* r
@.Destination := assignLObj[1,row];; P, K! k3 w9 Y
end;
5 M" p6 A' m$ H8 _% u: d4 Z! w newDirection(@);
. J" j: J8 C$ R- j" \8 T @.HasOrder := true;
6 j4 ?3 K4 R9 i end;
$ G+ z! P8 X- u$ }! v end;' X( d) D4 V- C0 \$ p
end; -- of the method" ]5 D o* q& a x
|