/* called by: entrance ctrl of the object 'track'
0 R3 Z% s2 k0 q, B# Y& p*/
- A' @5 D3 I) k% u+ l% v. K6 V% Ais
2 h7 G* \2 ?9 V Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! }1 G/ V/ ]" C3 Y i4 a5 z9 E/ wdo+ R! P/ L9 w+ i; b9 w1 T
Lan := rootfolder.Internal.Tools.AOLlanguage;8 K% ~/ q. E! W6 q/ P* k
if current = @.Destination -- else return
) F4 [( o! l4 k( m8 c then
8 H; }' |+ ]" q6 o5 Y& L @.Destination := void;& O& M7 ?/ r9 L4 Q7 F- e
if @.occupied then8 q8 L+ {" K" {5 l" w
part := @.cont;! v! U. }9 D3 x! A4 y9 ^. c% O
@.transpOrder := void;
. W" M9 b; Z9 k( T. ^* E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( ?) |' U+ [8 ~8 |. ^: C+ D
@,root.eventcontroller.simTime);
5 q, T" m% C8 u- ^; s" l5 o @.HasOrder := false;( E- q- n; S! I
@.DrivingHome := true;
n7 t, \( f! H* {% A, l) x* o/ X rgManager.tryToStartTransOrder;
6 ^9 S* ]2 {, r+ L3 C if @.Destination = void
& n9 @4 A2 P1 C9 r then -- no transport order for vehicle @, Z, S# L( |' j6 Y# u) {8 k
@.Destination :=
0 r: {& V+ ]: o1 D- V2 `9 A) u rgManager.nearestFreeStation(@,track.~);
- R: n- B' v! l% [! o/ s% l newDirection(@);
! m; G- ^) T$ s" N if @.Destination /= void then
2 ` K5 R) W+ C) e2 D2 u; l1 x k @.Destination.NumReservation :=4 e. o; o; B8 _5 P
@.Destination.NumReservation + 1;! U3 b; e/ _# O
end;
& Z, F4 q8 l' x @.CurrIcon := "drivingHome";; k t6 S) a _( Q* f S8 _8 ?
@.DrivingHome := true;+ q* a1 y, a; M
end;
1 Z, [9 v3 C) |8 | B else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 u0 p+ J) [9 z) }8 P
part := @.transpOrder;
4 K3 r% s# E- d$ u( z& }( E part.move(@);-- load part
/ t7 d4 u6 Y2 U N- h @.CurrIcon := "load";8 ~: Q+ j" ~! X# x3 F
GlobalDistObj := part.globDestination;+ G, k! o+ C0 m- h8 V# a4 X7 K
assignLObj := rgmanager.rgAssignL;" D. `* N t! V3 g
row := assignLObj.getRowNo(GlobalDistObj);
6 K5 A& ^3 b- G* I6 {- { if Row = -1 then -- since 705 W0 v, s& f' t
if lan=1 then6 E# F2 z; `" \# S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 y- [/ u) o G: V9 A+ Q# U
to_str("in der Andockstation: \"",?.~.name,"\""));- P; p/ h! w5 x- Z u8 p/ f
else
' b6 t7 c2 j8 `1 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' O7 T* M3 u. X+ m to_str("in docking station: \"",?.~.name,"\"")); 8 Q% v. k" c3 n# y
end;8 F) I, ~ I" F( s: Y4 s$ s
else6 u9 Y9 E, _5 b+ F R
@.Destination := assignLObj[1,row];
5 H c0 M& g3 j) y4 L) `: [ end; 5 v2 J. i I' ~1 c% T
newDirection(@);
" {3 T' ?. a; d: O+ J' ]/ N @.HasOrder := true;6 v3 h L- c+ Q2 P% v6 |4 t6 q
end;
+ {$ C, h. k9 d2 F: G6 Y8 l/ f end;2 c3 Q0 @% u+ N2 B" Z0 T$ b& n2 {* e
end; -- of the method% r; q& X( a0 J) A+ m- {7 u
|