/* called by: entrance ctrl of the object 'track'# K: C8 u' W0 Z; d1 [4 o/ {
*/9 e/ W+ n1 R. e' h) W' ]
is
6 _. k/ f# q; J- D6 F# V, S1 o! _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- K/ A1 l. R9 ~ e+ j- Gdo# X: n, G1 e7 R+ {& X0 H
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ J3 D4 e8 d L( V1 ~2 d if current = @.Destination -- else return9 E$ x5 O, D( B8 s; P/ X' u
then
1 W1 p; M5 e3 r* ~8 r% k( Z @.Destination := void;2 W* w" [0 H7 W2 @$ B( O
if @.occupied then3 B7 U' m t& j `; f
part := @.cont;
9 b @- I) j. O2 _, O" Q @.transpOrder := void;; y( Q# F" E% X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: T( o6 w) T1 n, P/ [, n
@,root.eventcontroller.simTime);, e9 b4 z8 g8 B" D& s' {
@.HasOrder := false;
, W" R; @# p# V9 e3 ?5 y; b5 I: Z: k @.DrivingHome := true;
9 q6 ^2 A/ E- R" i0 _% {& o rgManager.tryToStartTransOrder;
$ ^) p+ H) a. z4 u+ H& y" V if @.Destination = void
7 @( C) z) p' O; f1 } then -- no transport order for vehicle @: m6 |' a, V! G7 K
@.Destination :=
2 x. }6 j; d3 Y rgManager.nearestFreeStation(@,track.~);
3 G! K/ T) _( {; n) [ newDirection(@);
' _* [8 P8 g1 O3 L( m if @.Destination /= void then1 X! F( Z5 J# |& r4 X, G& c
@.Destination.NumReservation :=
2 F! E- S, w0 G4 p. B @.Destination.NumReservation + 1;
8 m* I. t3 z# _2 j3 E: u end;0 M, F) W, @+ q# P! N0 o* ~/ G, D @
@.CurrIcon := "drivingHome";: b6 A" r) ?0 F: }
@.DrivingHome := true;/ U* G) j- L1 l
end;
4 |1 y1 N! z! Z- O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; v7 h* q1 b4 s part := @.transpOrder;
6 b+ ^* I, ]5 g% w* q+ C part.move(@);-- load part
2 j# j* t1 t/ r+ x @.CurrIcon := "load";& m8 m" I$ L! w) N5 n0 r7 D
GlobalDistObj := part.globDestination;; j) z& `9 n7 k+ J6 Y; ?1 Z$ N4 Z% J
assignLObj := rgmanager.rgAssignL;
6 Z C R$ y* T" p row := assignLObj.getRowNo(GlobalDistObj);
9 D3 L, b+ J1 P1 H( E* C if Row = -1 then -- since 705 {, q! V' V( o, k+ q* L- s
if lan=1 then0 h& r* U- X9 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), M: {' `. z7 n
to_str("in der Andockstation: \"",?.~.name,"\""));
, @, r% A7 S/ t else
' o5 I- T4 N6 S$ u2 ?4 Q; f/ o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 O' N E+ v5 _5 x
to_str("in docking station: \"",?.~.name,"\"")); / [. s; G) }& z" X: ~, K
end;7 w' x" M! I& q
else+ M" z' P9 V$ K& |4 V0 J3 ~0 j2 P Q
@.Destination := assignLObj[1,row];, s- Y n6 N# U
end; 0 I' j. z+ w6 ^+ m9 R3 F$ r
newDirection(@);1 f3 T6 J' W! p0 Q
@.HasOrder := true;
3 P4 x$ c/ i9 g+ q end;
3 [" h. F8 F3 [! X end;
" E1 z( h* {- Bend; -- of the method# a8 F0 ]. f# d. ^' A, c; @
|