/* called by: entrance ctrl of the object 'track'3 O6 m9 p/ i1 t1 G i" W
*/
- a8 C( g& C4 ris
- Z* K9 h9 ]8 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;: h# X( C$ L% {$ f2 H
do6 q5 k$ U1 p+ P# r0 }: A# {8 A
Lan := rootfolder.Internal.Tools.AOLlanguage;) _. e, C1 k! O; ~
if current = @.Destination -- else return
6 N1 F3 ?( a/ X/ ~ then
) ? c# D3 L1 U% x @.Destination := void;9 `/ x1 B6 X' c0 f( t# v. x& B# ~
if @.occupied then
9 T* p1 J# Y' C5 n9 @2 K9 U part := @.cont;
0 ^% Q, Q5 q& H. M/ k# M @.transpOrder := void;2 @3 `% f- U. E2 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# I+ U* H; P2 B+ f/ o @,root.eventcontroller.simTime);, n' X4 _+ u1 n$ b( e6 S4 u
@.HasOrder := false;) |) j8 \8 B6 k% H' C \
@.DrivingHome := true;% ~" |& [- T. _
rgManager.tryToStartTransOrder;
# ?4 H8 s. f' @ W if @.Destination = void: t9 q; r) Q" t# T
then -- no transport order for vehicle @
) ?* V' o& C+ O; z8 X# y2 A6 q @.Destination :=6 m0 ]6 X- S' N; M
rgManager.nearestFreeStation(@,track.~);
; S7 F" i2 d! [* L7 y" S l newDirection(@);
; N7 S( h# r) c3 T1 F0 ^ if @.Destination /= void then
: }, v8 `) Y* `- t& D @.Destination.NumReservation :=
, ^' W. [' g- D: R7 K+ l& m) b @.Destination.NumReservation + 1;$ f9 C$ A! K0 v7 e) M% k
end;
! T9 |; ?1 {8 O" w7 ?9 p @.CurrIcon := "drivingHome";
/ r6 @2 {. t/ a- S1 o9 P8 Y0 ^ @.DrivingHome := true;
$ v: ] ~( h. Z" X* d# y end;! C$ N$ v1 M% H& R7 U& @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 A, {* M# D( b0 P. N5 m
part := @.transpOrder;
8 _0 a; T: M) h, E part.move(@);-- load part
0 k, R" ~ [5 R @.CurrIcon := "load";* }: L3 h* ^0 Q: f8 m
GlobalDistObj := part.globDestination;3 y& e7 G' Z' b/ y s2 y3 k* K
assignLObj := rgmanager.rgAssignL;% ~ p% I' V* J$ L
row := assignLObj.getRowNo(GlobalDistObj);
g4 [' U) v: d" ~& y if Row = -1 then -- since 70
# i) D$ W% r; J# h if lan=1 then
8 O; L5 u& h/ m/ Z2 \) f' r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 B# \' `% X1 |0 R
to_str("in der Andockstation: \"",?.~.name,"\"")); r& f* h& M- x; H
else
$ P, W5 @9 G3 p2 ?- @. i. I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% W( a! D8 a- w" x' v to_str("in docking station: \"",?.~.name,"\"")); : U7 B1 O i0 G1 D$ l0 d/ g: p. r
end;3 Q' P% i' |+ c' x T' I
else- T1 m: B( s/ O" _: C
@.Destination := assignLObj[1,row];7 [9 g) j/ k7 p2 |
end; 5 `; r. C- F6 D5 c" L& v
newDirection(@);
2 B5 P4 U7 {" @8 _) U/ J# Q' U* [ @.HasOrder := true;$ t9 c# | W8 Y ?
end; l! p) ~# j$ ~: I1 F
end;
7 N% v, C5 f+ B1 G! q( Z5 dend; -- of the method! ]; }- S6 V3 @8 A M! N9 ~
|