/* called by: entrance ctrl of the object 'track'" ~& z) f: q1 p% R6 A% h) C
*/
) i2 o$ m$ [) ~- Cis4 p& j) q$ D+ R; H- b0 b. n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( b0 h+ M' L: Y
do
% Y2 q. g4 I8 P6 t0 J! h' J u+ [ Lan := rootfolder.Internal.Tools.AOLlanguage;
, T# u! e' U7 g% L/ L if current = @.Destination -- else return
7 f9 O7 }& r8 |6 F7 s then+ v9 ^) F; F8 k5 E
@.Destination := void;
2 P# v! O1 W9 F if @.occupied then4 K5 y' f5 k# R/ O. O
part := @.cont;
& j D0 p( P4 b. {# q# O! O$ g @.transpOrder := void;, `9 L6 G) z* B; _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 \- n$ b3 F2 |8 u5 @+ E @,root.eventcontroller.simTime);1 C2 S& d. T! h8 f
@.HasOrder := false;% P, }- s3 u" {! C
@.DrivingHome := true;/ J( J ]% b0 x7 w
rgManager.tryToStartTransOrder;( S# N0 ^6 C( q
if @.Destination = void% h9 m# s8 d6 u
then -- no transport order for vehicle @
7 ~" y; q' e3 k) w; } @.Destination :=
6 v+ O: W# B. @% P: y rgManager.nearestFreeStation(@,track.~);8 g/ r6 M# b$ ]4 H4 I
newDirection(@);
! P1 u% q$ S3 p. L0 q if @.Destination /= void then* ~! K! X$ r) t7 p
@.Destination.NumReservation :=* w( o, X: D; r& X* A6 N" A' n+ K
@.Destination.NumReservation + 1;
5 s- Z0 m; R- V$ v# I+ z2 a" M end; b) a u1 T& W2 r
@.CurrIcon := "drivingHome";
% c1 C7 V5 r7 l1 D @.DrivingHome := true;+ d7 g& C, n1 ~/ x' r* B( m+ r
end; M y& ~' c g: [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 Y3 }2 B' Y6 w e9 u$ K) }3 w- c part := @.transpOrder;/ x+ K6 ~0 O0 V- I+ L
part.move(@);-- load part
7 Z' R3 t, U$ n# E @.CurrIcon := "load";& S x u0 s; R! i( @9 @9 i
GlobalDistObj := part.globDestination;, C1 ~3 j2 ?( I7 a' ?, y
assignLObj := rgmanager.rgAssignL;
- k; c: c. h, @: M* q- J row := assignLObj.getRowNo(GlobalDistObj);
) z7 m: b" g# c+ z! y if Row = -1 then -- since 70
2 V/ R5 l$ S) V2 Y- D- o, b if lan=1 then
& h3 L% q7 j: u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. p5 M" d; V. A$ Y4 ^, V/ ]/ j
to_str("in der Andockstation: \"",?.~.name,"\""));" ^: G) o7 a1 E) `) p L; p
else; ~6 O% H- ?" ~, L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ N2 o F/ \* A5 _1 G0 t to_str("in docking station: \"",?.~.name,"\""));
2 t: ~8 a5 Z9 N6 A9 h d end;+ M( a0 a* H% ?: u
else
( \: @9 ]* I1 w+ w3 y @.Destination := assignLObj[1,row];
m0 J6 k/ ?* d8 O. O, K end; # I3 V9 ~* ~; O0 X) ~* }1 Z
newDirection(@);
8 Y& t/ V% y8 q6 _. _. e i& ] @.HasOrder := true;' R: Z% k' r: b9 y1 @0 s
end;
. G) [0 s7 ~3 m) q: p3 ~ end;; q+ n A% K% y+ ?
end; -- of the method1 c: q! b2 S8 Y- ~8 T
|