/* called by: entrance ctrl of the object 'track'
9 ]8 i. r8 h( b Y2 s*/
* _" i s" X6 uis% _5 U8 {. X: L$ J8 X4 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) Z" U' H7 Q5 r% g' J: `
do
7 W6 c6 I/ a9 U/ S) _: Q$ c Lan := rootfolder.Internal.Tools.AOLlanguage;6 V0 G5 B8 }* |& r7 K6 A+ s7 O' @8 r, C
if current = @.Destination -- else return
) N e6 q/ `* P0 S0 B/ v- g& q then
9 O9 @# }: [. [6 m, A% W @.Destination := void; v0 Y' x3 x7 D1 p% S& A
if @.occupied then
5 y. F% y" v# t/ D, f! W o2 y part := @.cont;4 O$ y4 X' \+ [9 l' L
@.transpOrder := void;% L- _1 u) l; q5 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 w k( @8 t) | @,root.eventcontroller.simTime);3 R" H7 j" c2 m
@.HasOrder := false;3 W! l0 O: }/ ~
@.DrivingHome := true;* c/ J$ K' x- r( y0 e0 c. B
rgManager.tryToStartTransOrder;/ Y n% L; O' B3 g
if @.Destination = void' m5 p$ [6 O+ V) a/ G0 b' T
then -- no transport order for vehicle @
$ \4 d1 o+ H5 Z: S @.Destination :=' P% d" q; b0 \! D$ x% h
rgManager.nearestFreeStation(@,track.~);
% X9 x5 F9 w; J3 M newDirection(@); % g/ ? T$ r! g5 @) P% [; H
if @.Destination /= void then. E8 G- d; F% x3 _( K1 W+ n( I
@.Destination.NumReservation :=) X: v2 S4 b2 r
@.Destination.NumReservation + 1;* }* w) H: O- B$ s. I3 B$ y3 v
end;
8 T0 k' e, v/ M4 K @.CurrIcon := "drivingHome";
$ Z) R- Y; j P+ G @.DrivingHome := true;
6 ?1 j# j4 V0 g: H- G end;
5 Z2 F& a; |7 }, a2 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 p1 O2 l& h i' u1 {6 p$ G
part := @.transpOrder;
6 f4 w4 d7 @, \2 J part.move(@);-- load part$ p0 {2 ?! k( X1 W$ o8 q" k
@.CurrIcon := "load";7 p1 k" ]! o' X
GlobalDistObj := part.globDestination;
4 m2 d7 b4 E. u( O/ u; W4 Q7 ~( L% E assignLObj := rgmanager.rgAssignL;
% p" }; F$ A% G9 |8 o) X" @ row := assignLObj.getRowNo(GlobalDistObj);4 G* t) v; ~7 X# u9 s, B
if Row = -1 then -- since 70( Y# A* O, y4 j' F
if lan=1 then3 H' } Z3 I9 J1 o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( O5 \, [4 Y4 I* i% M% b
to_str("in der Andockstation: \"",?.~.name,"\""));, o5 }! m: d$ L8 o+ v
else
" @4 T- B! Q3 P9 [+ i2 v! Y! D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. t: L5 i1 `/ K! M* w1 k- K+ G
to_str("in docking station: \"",?.~.name,"\""));
% _9 K U: |% q, \7 }2 } end;: I: ^5 f. e6 h
else4 q1 z0 r! F7 o% ^* h+ U- ]! m
@.Destination := assignLObj[1,row];& }% @+ c& J. \+ ]
end; * E9 }; I: w# {3 m! T/ s! T# u/ _6 p
newDirection(@);4 R3 L' b- M9 Y. b# `9 {" H% k
@.HasOrder := true;* `+ t+ V' P: q7 A4 A+ u
end;. u4 w+ t4 f0 u# J) v. p
end;
7 \( E- Q/ M2 E" @- P0 D1 t4 L- send; -- of the method2 r1 `# R6 b) A& _3 `- x& X* l
|