/* called by: entrance ctrl of the object 'track'
2 j: k- M. `) W5 l*/ @2 e, ?( W, \7 \% ?) W
is0 b8 @. D# w* D" w$ W& k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 h6 T7 D# \3 Bdo6 k& s- O, k, u f4 ~# o, |
Lan := rootfolder.Internal.Tools.AOLlanguage;. e2 n) o: a' w+ _2 z
if current = @.Destination -- else return
* a0 ^! p& n _! F! H/ b then6 `5 U+ s4 ^. T' [9 e% K# Y
@.Destination := void;: R( E6 ~0 M* g2 Q" T
if @.occupied then
# o0 ?: O1 \) X part := @.cont;
* Y1 Q8 [- m! N v/ z4 I3 F7 `9 d, L& n @.transpOrder := void;5 Z9 { [: W4 x1 ]9 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 m! I. e6 |- Z5 s. g F7 U3 _5 W& p
@,root.eventcontroller.simTime);7 a- _& i: v4 L
@.HasOrder := false;
# M2 }9 S$ h' Y) i2 j3 r @.DrivingHome := true;
* }% o0 J* X7 { rgManager.tryToStartTransOrder;
, T% @" p9 E: x8 S9 a j7 C if @.Destination = void- Q. c& e( s z
then -- no transport order for vehicle @
2 z" T5 R$ ~9 O* i9 H4 L7 G, H& V3 x @.Destination :=
$ b( N8 S1 ~6 A6 V# N7 D rgManager.nearestFreeStation(@,track.~);
/ [% X/ Y1 L2 {# i newDirection(@); 2 u- A6 ]0 r4 y* Y
if @.Destination /= void then4 T+ ?5 ^4 C5 E7 f# i
@.Destination.NumReservation :=: ?2 u1 l2 B3 E- O3 N. i) h. i- q
@.Destination.NumReservation + 1;( z9 D8 |: z9 `+ X: z9 L( u
end;
2 ~: I6 D4 m0 {: o& j7 c @.CurrIcon := "drivingHome";/ [% |# h$ r7 [9 j/ _
@.DrivingHome := true;
& ]* L( u$ n# b5 A end;* F/ P8 b8 m% Q+ I2 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
}9 w" F# B; m9 n; p! e part := @.transpOrder;
& O& ]+ |+ d0 m8 E part.move(@);-- load part' E8 H- \+ o: A# T
@.CurrIcon := "load";+ Q3 |, ^: e8 W
GlobalDistObj := part.globDestination;
- S& h D6 ?0 D assignLObj := rgmanager.rgAssignL;
3 X: U7 s5 G0 D8 g row := assignLObj.getRowNo(GlobalDistObj);0 O/ p' g" h7 M- [
if Row = -1 then -- since 70
0 b0 ]1 h# E0 K* N7 p if lan=1 then. E- i+ K% M1 p6 H: O; f/ r% x: `/ `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' X0 o& N6 z' C
to_str("in der Andockstation: \"",?.~.name,"\""));) T. r Z7 n5 O/ U9 z9 J
else
# P& S' e' e L* D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. r: J* n* g: C2 z to_str("in docking station: \"",?.~.name,"\"")); 2 t" B* X0 S6 z: V$ F% z
end;
$ E! t8 o+ p3 m3 B! \/ K# Z8 s else8 I& Q6 K' r/ y9 h* {
@.Destination := assignLObj[1,row];
+ ~5 [# ?# b( L8 o; v! G end;
; u+ q) }, F) H newDirection(@);* ^- [: S, t5 h' Z5 \; }; \) @
@.HasOrder := true;
6 T: ^5 j3 O- I end;' q9 a8 M I# C# @' p
end;6 r1 C, ?: q1 h+ z# n6 v
end; -- of the method
: z) ?- e. I8 T# T |