/* called by: entrance ctrl of the object 'track'7 p0 X7 r6 n- o
*/4 T, |8 `9 _6 p/ n$ ^
is, U. b" z% `6 p' A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 S) ?+ K1 b# s/ K! I2 m
do. H6 u9 m- e# E' H8 }
Lan := rootfolder.Internal.Tools.AOLlanguage;
- a5 `/ t8 A# G3 `4 R if current = @.Destination -- else return7 z K1 ]4 s3 ]/ y; A
then+ o- s2 ?( C) j. ~4 ~6 H: f$ {
@.Destination := void;6 d; }5 a( e! t( f9 ~) |
if @.occupied then
8 [4 }$ C+ @* W part := @.cont;
* j0 v2 D e/ h9 T+ @5 ]" J @.transpOrder := void;
3 z. y) P( I4 S' s; [' x4 M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# l7 F6 H; h* [8 [* {# z
@,root.eventcontroller.simTime);
5 n, V) P" K/ W" N6 R' T; C+ Z @.HasOrder := false;
: z3 L$ l& R- e+ |8 u @.DrivingHome := true;' c. I/ C# Q" T- H1 p
rgManager.tryToStartTransOrder;
/ I+ q" ^5 ` p+ ~! A! @1 n if @.Destination = void$ X* n6 U4 A' h' \, e0 r, b
then -- no transport order for vehicle @
; s! ^1 O0 j" x6 Q. v @.Destination := ^. k9 h6 r7 b0 R
rgManager.nearestFreeStation(@,track.~);
" r' s' X7 o+ l1 L" k& i8 W2 ^ newDirection(@); - S! b, T5 I$ g, @$ ?
if @.Destination /= void then
% l$ e4 v8 | O# J0 Z* Q& D% P1 J @.Destination.NumReservation :=
$ h9 D- H/ \) i$ S& J2 y+ X% t5 l" i @.Destination.NumReservation + 1;
' W3 T. S, L, \9 b! l2 t end;. G. c& ]6 L$ P$ ^7 K4 \5 c* W
@.CurrIcon := "drivingHome";+ @6 T+ L7 o8 S& M0 }& B* t/ @. ]
@.DrivingHome := true;
2 u0 a1 H7 K* a+ Z+ z+ e- N end;
' [4 |. q, A; `+ G/ `4 }9 e n9 N7 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 C0 ]: U) H% V8 P part := @.transpOrder;: m5 V, J( g# y( e6 {( G
part.move(@);-- load part1 b# e5 h6 X1 _) w
@.CurrIcon := "load";' m- w6 j+ O& p% V) @
GlobalDistObj := part.globDestination;
; M- E7 S( B" p assignLObj := rgmanager.rgAssignL;, Z: W* [4 e' m2 [! z
row := assignLObj.getRowNo(GlobalDistObj);
" d, `7 _3 ~9 @0 N% L, t if Row = -1 then -- since 70
9 [$ [# \7 V- J1 }2 d, x if lan=1 then
4 `0 m6 s! d/ Q9 R u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 v) l. p/ f7 ~
to_str("in der Andockstation: \"",?.~.name,"\""));
& D; H9 _1 X3 ?* E/ g$ }/ d& G, M else% q7 I- W. j6 N: ?6 J% O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 v6 t7 B4 ]! A; l to_str("in docking station: \"",?.~.name,"\"")); . _* k9 X) S: l# m# H+ N& C
end;8 @7 i& k D/ J- [
else
+ A7 q4 K' @* J+ }8 w @.Destination := assignLObj[1,row];% [. J& U; g! L
end; 2 y3 N! j- R! x' k& @% b T) t7 z5 {+ [2 f
newDirection(@);$ J4 v8 R. T! W0 T8 B
@.HasOrder := true;
( q L( e; }: c end;" x6 z0 h7 F7 D# o
end;
4 y9 h2 r6 N5 H# nend; -- of the method, \, q1 n& a; i) \( \
|