/* called by: entrance ctrl of the object 'track'
3 G$ V) e1 T$ H+ D- `*/0 \% z" f% X# g8 F6 Y! s
is$ s; y, u# R X0 Y" F/ k! c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 O z- _5 _3 ]4 B; @1 Tdo8 |, I& k$ ~- w3 O% w
Lan := rootfolder.Internal.Tools.AOLlanguage;, w4 ?, @8 A3 g1 _, U2 e* U
if current = @.Destination -- else return
2 E! L8 s' b- g3 V; Y then
7 r* @/ r2 Q& M2 s @.Destination := void;
% X# C2 y) t9 e2 d. {% r if @.occupied then
8 H8 |% c4 }9 g; L/ X5 P- m% J part := @.cont;
+ p- r9 A1 A' D' ` @.transpOrder := void;
0 b" ^9 l3 U0 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% X0 z& x2 |4 r; b; J8 y @,root.eventcontroller.simTime);
& j2 c) S; G" f4 M/ _7 S @.HasOrder := false;, }' j5 u7 p. d# }6 \# i
@.DrivingHome := true;1 p4 Q) r' U+ E
rgManager.tryToStartTransOrder;
/ S* ?6 {+ Z b6 H$ ~; f+ O1 d if @.Destination = void
/ i! R v1 U' ~" }- e' q" n1 S# S then -- no transport order for vehicle @
- w$ l# j& i; o- T* w+ [ @.Destination :=6 W* j. m6 @1 ?4 f9 i% F
rgManager.nearestFreeStation(@,track.~);, r2 F# L1 I; n- g/ a
newDirection(@);
8 e% W+ R9 q8 K1 z9 I2 I3 d if @.Destination /= void then- x; E( `5 G7 T+ b* `
@.Destination.NumReservation :=- [' m) M5 q7 F; B% d' N
@.Destination.NumReservation + 1;
W' C. Z6 ~$ ^" x( o% e% E end;
7 b. T6 U4 h. X$ J8 F @.CurrIcon := "drivingHome";
% {) j5 i% T n+ I f/ N @.DrivingHome := true;
" {. v4 C0 X* l/ \3 M7 E5 { end;$ X& D2 ^ z/ V' F7 n' W1 _9 k; ^ A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" M7 Y0 w# K @- E* c/ Y7 v part := @.transpOrder;
$ r* X: Y! ~' F part.move(@);-- load part7 h0 [. G% z( n8 E, n4 A& `2 W; L
@.CurrIcon := "load";/ ]# O, E$ |& o% H2 d, [
GlobalDistObj := part.globDestination;7 _6 O; n+ ^5 d: I
assignLObj := rgmanager.rgAssignL;
K" t4 I# [2 f6 w+ x row := assignLObj.getRowNo(GlobalDistObj);. c2 y7 m' ?2 G0 l3 A, h
if Row = -1 then -- since 70
" I. G% S2 g7 W1 s5 S% F- S if lan=1 then. F- T4 S/ H( |6 I: z8 G6 H3 K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 K! C( S9 C1 j9 H9 w& Y$ O
to_str("in der Andockstation: \"",?.~.name,"\""));& q2 f/ j3 j4 p6 z
else
& ?2 a) a: i: C3 N# m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: |5 j3 a: `7 l3 O; P. @7 u z3 Y
to_str("in docking station: \"",?.~.name,"\"")); ( j. G; c& N) P* f% ~" [/ W
end;. p+ N' q# M& Y( K8 w @' j
else5 z; Q% t& c+ `# \3 s
@.Destination := assignLObj[1,row];1 f/ G# M2 L0 q& ^6 \/ _4 A
end;
O5 ], I1 F# ~* L6 w* j3 G$ i newDirection(@);
% _* P* {, M5 O. b( y @.HasOrder := true;% G0 N. v( h2 _# u+ ?7 h
end;* H7 c8 P% k1 p& g0 m- j2 D4 d5 b
end;
. R- J: `* \: Y ~$ {" }9 p3 fend; -- of the method* z" r, m% ]* d {' _3 P/ O
|