/* called by: entrance ctrl of the object 'track'
& [6 _* b) d: g*/) U$ n; e# C, G8 y# G K
is: v1 a2 D S8 H8 e7 Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 C5 n! G) {% ?) q, M# Zdo
/ W9 Q( {6 u g Lan := rootfolder.Internal.Tools.AOLlanguage;" B* Z6 e5 J, d6 Q, `
if current = @.Destination -- else return
) [5 F5 @' d: r6 R then+ [# d/ e8 z6 ?
@.Destination := void;
, s+ M# c& l! H# i' Z5 C' V if @.occupied then8 X0 |- H4 Q! Q6 Q/ f
part := @.cont;
7 Z: w N) J7 U/ V% o4 Q. F8 o4 ` @.transpOrder := void;
4 J W. K( o6 L; z& J; k+ s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 z. ]; N( R& I& A) E* j6 e4 o
@,root.eventcontroller.simTime);
$ H4 y5 u5 h9 i @.HasOrder := false;1 ~5 D2 R* I' O: x# E# b# Q! z, e
@.DrivingHome := true;1 X/ s8 t k- A) j8 t+ H
rgManager.tryToStartTransOrder;
1 M( q& Q& Z$ r, K9 Y4 L if @.Destination = void
0 X) u$ Z, g' X* {6 ^; I7 l then -- no transport order for vehicle @
6 d4 F5 B. o& a; a @.Destination :=8 q% [- d5 x$ d+ v; `3 M
rgManager.nearestFreeStation(@,track.~);; f' z+ Q. r9 E9 Y- V
newDirection(@);
8 I9 }0 P; ^6 [$ x) B) \ if @.Destination /= void then* n+ S) S8 Y' V. f* i1 u
@.Destination.NumReservation :=
) S0 T3 Y: A, i8 W @.Destination.NumReservation + 1;
v4 d% K0 f$ } end;3 @' h' D" F8 ^" ?1 A- B+ @
@.CurrIcon := "drivingHome";8 s% k! u' ?; t" i+ X2 s
@.DrivingHome := true;! h$ Z+ O; z' e- N( _, P# J
end;' j% J4 u' K& M% i9 w3 U* `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, L+ t& f. V1 H
part := @.transpOrder;
7 Q* w9 H* `" J9 q part.move(@);-- load part
! C% V s% S) g: a @.CurrIcon := "load";5 t1 X0 G, ^& }9 h1 I
GlobalDistObj := part.globDestination;
5 j# m: V6 ?4 S% Y assignLObj := rgmanager.rgAssignL;
3 `5 _* r" Y- W3 ?3 M5 e row := assignLObj.getRowNo(GlobalDistObj);
1 d3 l* q! S3 |; ? if Row = -1 then -- since 70
$ w8 J0 c! p* k8 y5 } if lan=1 then; P. S/ ?3 u& ]! k4 W' [! o. W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: j; H6 e p& Y- v to_str("in der Andockstation: \"",?.~.name,"\""));
8 b; U: e( d o else3 c+ m4 u$ M* A9 V& H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 A1 j$ e' P9 M0 K
to_str("in docking station: \"",?.~.name,"\""));
# h4 G7 u6 W$ F; V8 H end;
8 h5 v4 M9 J2 E0 j. H+ `7 s! K else) Q& h, e) H: K6 f6 k; c
@.Destination := assignLObj[1,row];
/ z4 _: Y0 v9 c end; 9 \% S) ?$ z# g7 a; @: {
newDirection(@);& [# l4 H7 j/ U/ Y+ o# ] C! ?1 U
@.HasOrder := true;. b/ U2 b# o, D+ ?, G% [/ M
end;
8 \5 K, b( J! R. u( F' C end;
$ J/ F4 S B; N" M" hend; -- of the method8 B+ Y, @9 Z7 A$ R- m( e
|