/* called by: entrance ctrl of the object 'track'$ m! p; Q0 L" N! J2 S4 R/ ^: U7 e
*/
" T' w2 s# E, O& w- d4 j' o% t% u6 |2 wis7 B& T- E+ ^6 N" `: x; F/ g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 E f0 ^: C. ?& n9 w8 K+ F
do
9 c# I: @+ N, D. R% G Lan := rootfolder.Internal.Tools.AOLlanguage;
( V( {! h. C j' a9 f) y: \ if current = @.Destination -- else return+ t/ J0 R1 c% u' |1 c* O+ G$ A9 t! o
then" Q' J$ X3 c N) y% I3 `
@.Destination := void;/ I& v9 v* t k8 l' p' T" n
if @.occupied then7 n9 i% [# I& P/ v. [! W1 e* ]
part := @.cont;. ]- J' S2 }% K4 r) h3 o w
@.transpOrder := void;9 Z" y2 X" b+ F, O/ U' T6 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 t. r( E& W9 y9 V6 P @,root.eventcontroller.simTime); `4 Q* h- e- H, M2 u
@.HasOrder := false;% N; _2 n) x, n3 m
@.DrivingHome := true;# g% n' X# y- g2 m2 w' C4 E
rgManager.tryToStartTransOrder;
6 I8 w3 Q5 _' ] if @.Destination = void/ h0 ]* E' C9 O* H: L. T
then -- no transport order for vehicle @
7 [' {# S; L5 v8 h9 l4 H" A @.Destination :=/ B8 J9 w" B: n: u
rgManager.nearestFreeStation(@,track.~);- {/ B) a3 m9 h+ \) O* N. C
newDirection(@);
7 y1 C7 d5 g: n) x$ r if @.Destination /= void then* }2 p" ^# B; w
@.Destination.NumReservation :=
6 o- ?( E3 M/ Y) v5 r7 B @.Destination.NumReservation + 1;# K, o" \& J. K) {
end;
' {9 D" k0 \) X0 z4 X) U @.CurrIcon := "drivingHome";
2 Z3 l& v T9 y5 C) L t @.DrivingHome := true;# r4 D. r& G: R% T! J
end;
1 f) ?3 L6 R H& s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! g1 _. A* j$ Q" U# [. r part := @.transpOrder;
1 ]* e, b+ P' c& }6 q% P* ` A x' c0 x6 B* q part.move(@);-- load part5 U4 J, d# G: |+ x
@.CurrIcon := "load";
# K# B0 g# C. K9 q GlobalDistObj := part.globDestination;
8 G, b. L D" R [" } assignLObj := rgmanager.rgAssignL;* S9 E8 a3 ^' P
row := assignLObj.getRowNo(GlobalDistObj);
/ i, K5 J/ i! i9 L2 Q if Row = -1 then -- since 70
- p, b0 Y3 F' m: f: w i$ u if lan=1 then
1 j9 O5 [+ B m! f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) Y$ W- [& f u, w( F
to_str("in der Andockstation: \"",?.~.name,"\""));
' B% _ I% }: Z; R7 w# `$ r& _/ z else& R4 y. e6 `9 @- W6 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 f7 ~2 D" |. J, @. z) Q
to_str("in docking station: \"",?.~.name,"\""));
6 `2 b) W: ]) g$ S9 G end;+ {% [' \1 @+ L( Y: A. T0 ?
else, n! L# \: n9 C
@.Destination := assignLObj[1,row];
, I* O# W' |7 M5 v+ E* }& d7 N end;
7 S( F; a; R; o newDirection(@); W8 s" g1 l6 x, P+ W
@.HasOrder := true;4 K c* }% U) e; y1 t/ \
end;
8 E; {0 P* d& D+ [. _# F end;
) o$ {+ U5 _" b- \. q2 gend; -- of the method; S' \0 e# }2 b# W3 ^
|