/* called by: entrance ctrl of the object 'track'8 Q" U& y2 l" `2 d
*/
5 |/ B6 ^$ \6 |' gis5 k" r* A0 l: C* x7 R* W* B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- H3 w8 W% y' v) i: Kdo3 n' j+ u Y7 h6 P& D. t
Lan := rootfolder.Internal.Tools.AOLlanguage;9 c8 D$ H% S/ [! N; c/ v0 C
if current = @.Destination -- else return
# X( g) ^0 V* ^: `/ y& w then
1 e6 T' {: t+ F" S' c @.Destination := void;* v9 z: G' V% f( p+ ?
if @.occupied then, ^% r1 F T$ C) m/ U6 Q5 _
part := @.cont;
8 X6 \& S3 @5 f( } @.transpOrder := void;6 U0 m% |, Z2 b+ s4 ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 _8 m* `; t' j: |+ i, i3 S c @,root.eventcontroller.simTime);* f7 P: M- O# b" I: K8 [. n
@.HasOrder := false;
3 M# b! }/ A9 R$ p( ]- {' R" J3 [7 U @.DrivingHome := true;
5 c$ t4 p, t) |& e0 m' X rgManager.tryToStartTransOrder;
; G" f4 W5 r7 s/ T if @.Destination = void2 C) c% i2 ]1 ^3 u S
then -- no transport order for vehicle @
$ m+ E/ b* O J9 ]) ?" _ @.Destination :=) V* ^! e: A+ ]
rgManager.nearestFreeStation(@,track.~);2 j) P. F9 Z, ~& ^! i; D: _
newDirection(@);
. a/ w. B, w3 @ if @.Destination /= void then0 A3 C: g8 g! R/ U4 N
@.Destination.NumReservation :=: m9 o( O( U( o( g- Q1 _
@.Destination.NumReservation + 1;, ]) ~7 P6 S% l3 N. ~
end;' v( B( g8 U$ E5 N1 r' A
@.CurrIcon := "drivingHome";
& O& {5 @) {" O) ` @.DrivingHome := true;* f$ ?& N& J5 ~5 f5 d' ]2 e
end;
2 |7 A, I2 s9 \; O% M4 N+ \' c) h else -- the vehicle @ is empty, both vehicle and part are in the same dock station# I+ q1 T1 V8 F4 [
part := @.transpOrder;: w6 H1 K/ n5 I; \
part.move(@);-- load part4 ~! D" Q) R. T7 i$ y+ V
@.CurrIcon := "load";6 f) R2 _4 G+ r% m4 g
GlobalDistObj := part.globDestination;. q9 [) l0 R J
assignLObj := rgmanager.rgAssignL;. H" E% G! t1 c+ M$ J: R0 a
row := assignLObj.getRowNo(GlobalDistObj);
7 O+ ^' c! {. |7 N6 ^ if Row = -1 then -- since 70
- I: y7 ~* @. C+ J if lan=1 then
# A8 C) F4 E, k) P: ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 S9 q3 L6 b4 }+ ^ to_str("in der Andockstation: \"",?.~.name,"\""));; P4 ~$ V. ?2 `" a' Z6 q% |
else
! C2 A; C: T! c7 w) P+ D0 g( N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 W$ @$ H4 Z5 ?4 w" R5 C! B to_str("in docking station: \"",?.~.name,"\""));
; n+ r1 K- n; f" e- r6 B end;
3 O* o5 P5 f$ U8 z( ~# z) i else
. b8 R x9 V: x) f. K% q @.Destination := assignLObj[1,row];
. K: Q6 S( s- l0 y end; ; Y3 Y$ k4 |. _" X
newDirection(@);+ a; ]+ q5 k4 E
@.HasOrder := true;
$ {- L+ r s) B' {! N" C end;4 x1 h7 Y+ F% W0 ~5 H* M7 q5 d0 G
end;) y, p B2 c7 z! v
end; -- of the method
; X' W# E% m2 A( R; t G4 ? |