/* called by: entrance ctrl of the object 'track'4 b& x- t1 a! c# N1 |. j
*/
9 U* j1 g$ ?2 o+ ]is
7 l! l3 s3 O+ r+ d, s# n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; I) ~: m/ Z$ rdo
% `* E" @& ?; D; Y( ] Lan := rootfolder.Internal.Tools.AOLlanguage;
2 }, e {6 l9 d, k/ } if current = @.Destination -- else return9 D* W8 f6 y: I J0 `" Y
then2 ~5 a0 k' f- j3 t4 D, m
@.Destination := void;* K; s+ N0 Y& C; s
if @.occupied then! F; P/ {2 i$ @0 w
part := @.cont;
1 M I& N# G) n& {! o8 g: g @.transpOrder := void;( H) _# ~$ m7 c$ K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ A3 F1 N7 g) ]: M @,root.eventcontroller.simTime);
0 x7 j, ]* p+ Y0 E# I8 y% f @.HasOrder := false;
2 [; M" g" A1 l0 F# z! o. y: M @.DrivingHome := true;! o' w: ~7 ^. F/ D
rgManager.tryToStartTransOrder;
F& B% Q! S% h4 z/ B0 c" Y if @.Destination = void6 v$ N, l" @+ l
then -- no transport order for vehicle @- d# ]# Y! M/ t+ ]0 N% z" b+ K) z
@.Destination :=/ x8 M7 Z5 |* Q9 H/ ]/ v
rgManager.nearestFreeStation(@,track.~);5 i1 b, W1 B5 x. l- l! Y* M) d
newDirection(@); & a+ T% v4 G) ^: E8 {$ L# W! t2 a
if @.Destination /= void then
: M z& G* n/ F, t2 h- R9 {& y# j ` @.Destination.NumReservation :=. L) L( Y6 G% ^ Q
@.Destination.NumReservation + 1;
& u" a, K+ u. S" q+ k5 }5 L end;
( |$ K0 H$ B( U+ v; j @.CurrIcon := "drivingHome";
s% S9 F v* u- }' X" U7 l: D @.DrivingHome := true;/ \8 N, }: W; X2 p& t' f* w
end;* s0 U; I) z2 V8 q! M; F4 ?: w3 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- j( E3 g, } V, I9 ?5 Y6 a$ E8 m; O part := @.transpOrder; T& B( M; N. e3 N
part.move(@);-- load part3 ^% W) Y; B6 u3 j( U9 Q
@.CurrIcon := "load";9 ~& S, z# W+ r/ U+ r
GlobalDistObj := part.globDestination;
' p, Y: A m+ ?" l2 q. O2 Q9 } P assignLObj := rgmanager.rgAssignL;8 ]6 L5 ]# o- ~# U5 ?" [' R+ C
row := assignLObj.getRowNo(GlobalDistObj);0 S# k1 g0 n0 Z
if Row = -1 then -- since 70
6 D* {0 X4 v* n: e: ?0 ~ if lan=1 then* A( w6 R) D l" z f: n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ b) Y4 z0 t8 A
to_str("in der Andockstation: \"",?.~.name,"\""));) C& B1 e' m$ _3 G4 q% R
else- P" a' g. y% G+ e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' l6 E8 n2 {3 O9 Y3 Y6 `" R1 @
to_str("in docking station: \"",?.~.name,"\""));
8 b) h, _' W- s X! S end;
* m$ K: R9 w8 Q* S else
- B( Y4 U3 l% T B @.Destination := assignLObj[1,row];! Y5 t! m+ r5 k% b4 x* A
end;
' v& g- I$ h& R2 w! K newDirection(@);
5 [& v$ a6 C- W7 a$ g9 x @.HasOrder := true;. q4 y% x" U- Q7 P' c
end;' T( K7 C1 l3 o: y% _) y
end;
/ k0 z% s6 m+ B8 S3 v2 w' {, oend; -- of the method W5 j3 h3 C" R! X: P8 M
|