/* called by: entrance ctrl of the object 'track'
$ K8 b# R( d% t# ^7 q, k5 k*/6 A8 I; b- i1 Y+ M
is3 ~& M; c$ r( o% C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' g S' W2 w4 l8 L" P6 U$ U( |do
2 }2 j$ S' x' \ Lan := rootfolder.Internal.Tools.AOLlanguage;
( f6 N: ^/ D! s. n8 {! m J if current = @.Destination -- else return
8 q2 n; u0 p% T then
* G# H& x& ?5 s2 d& e @.Destination := void;
# e5 C2 w) ~ F7 b. ] if @.occupied then5 n5 D G5 d7 Y+ ^- V3 s8 e6 M9 c+ h
part := @.cont;
% d1 U" t. e3 {# j J+ s% S& { @.transpOrder := void;
4 Y6 T1 ^0 x2 i, ~/ ~$ a+ _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 a" s) T/ f8 L2 Q1 x
@,root.eventcontroller.simTime);; l+ l! n) ]; H+ o/ C+ v
@.HasOrder := false;% O) q" S/ ^! F' a6 }* n
@.DrivingHome := true;' b; C) @# u( a5 v; B9 n( B% E
rgManager.tryToStartTransOrder;
6 _; X1 L4 K$ _3 b if @.Destination = void$ Y$ W$ s( z1 j0 P/ }0 N1 M, G; S3 S
then -- no transport order for vehicle @1 Z' E1 ?9 G/ C0 ^
@.Destination :=
; `9 o& K4 s! m( R: S9 U rgManager.nearestFreeStation(@,track.~);3 R5 A l' b9 }3 _& n
newDirection(@);
: f4 y8 H% q' D& c" l if @.Destination /= void then
( |8 A/ Z8 z, d; H @.Destination.NumReservation :=! |: a- |) _! a* s% K
@.Destination.NumReservation + 1;
# ^/ T* r6 T+ S6 h" F end;
( o1 w7 Q r/ } @.CurrIcon := "drivingHome";& R9 A% V2 l5 n G% ^+ P5 {
@.DrivingHome := true;
# y- j* x( m. f; B ], t end;
6 S# Y2 ?8 m' d" ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 g) O+ f& V+ e
part := @.transpOrder;
$ r6 `. g; `$ l8 |0 F3 v1 B2 j part.move(@);-- load part* X% X# n) }8 O+ i0 N5 b
@.CurrIcon := "load";2 g/ E8 K" n1 U8 {# [
GlobalDistObj := part.globDestination;1 A* P7 n& R3 }# D# ?7 R" w
assignLObj := rgmanager.rgAssignL;( }6 `6 G% R0 a9 P' |
row := assignLObj.getRowNo(GlobalDistObj);6 D8 v" R6 a. z
if Row = -1 then -- since 70
9 x, ]/ i# E+ q) O9 Q8 I if lan=1 then
7 S5 t* [. h X& w; ]4 h! Q: T: w- F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 {! m* m; y, @) v6 A
to_str("in der Andockstation: \"",?.~.name,"\""));) z8 o- Q$ d2 k+ K
else' C8 o; G+ _6 h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; \! n1 k6 ?# m, j' g2 A: [ to_str("in docking station: \"",?.~.name,"\""));
1 C/ f; M3 w: o end;) P$ J* R1 `3 h! {2 m/ I
else
# G& N" U/ w7 r8 J5 r @.Destination := assignLObj[1,row];
2 G4 s# c9 F8 T$ x end; U6 M% }2 _4 _" R5 G A
newDirection(@);; E% j8 f( E. d2 ~
@.HasOrder := true;* F4 s0 e) i) `. T5 I9 c4 }
end;
9 b% r3 ]: o4 b. [8 G" X end;
) i. b, \' b2 jend; -- of the method3 L9 X0 f& S: X" ]4 @
|