/* called by: entrance ctrl of the object 'track'
% V2 l5 j9 P* _. e2 [; d*/
5 X( x; J% F, r+ S3 p: l6 tis
. V4 O& L9 \. n: n$ b* |* n part, GlobalDistObj, assignLObj:object;row,Lan:integer;. b& l1 }0 x" d
do+ i2 i' K' g) o& B
Lan := rootfolder.Internal.Tools.AOLlanguage;" C5 h6 G3 E0 J. U% v' z& p
if current = @.Destination -- else return3 G% R# u0 A8 h# @
then0 X7 W: s7 V4 Z8 c% `% u0 J& f# g
@.Destination := void;) U8 X5 E) \# A9 x
if @.occupied then
, A; z; y) a! v8 Z* L part := @.cont;( @* f. a, {; d
@.transpOrder := void;' j+ c, v" g0 E3 @' a2 L3 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) `- T B0 v( z4 L @,root.eventcontroller.simTime);* T C6 Z4 }9 n' O+ J# u
@.HasOrder := false;% |% z" g( c5 Q
@.DrivingHome := true;3 ^0 U$ R9 e# ~- `% N
rgManager.tryToStartTransOrder;
& w& R- o1 q) `: F4 X Y if @.Destination = void
8 I' Y7 r3 @) V6 O; N' r" o then -- no transport order for vehicle @7 H7 V J& D3 m% Q3 K) j6 W: I b
@.Destination :=% X' k& y8 \7 {4 Z* M# g) W: D
rgManager.nearestFreeStation(@,track.~);
& \5 v# u9 L2 f9 [1 \ newDirection(@); , W1 P) d R0 ~" F/ ?
if @.Destination /= void then% d& U8 R+ @, {9 ]8 [
@.Destination.NumReservation :=) D& y K( h# J' T2 b) N
@.Destination.NumReservation + 1;
! C4 a8 [7 q7 ]! ^1 Z1 ^ end;* g& F6 {! `- Z* f1 R* E7 x0 f, F4 K
@.CurrIcon := "drivingHome";, L* b5 p3 `. g' t
@.DrivingHome := true;) Q* h5 }2 X; C, z" @$ [
end;
9 o _ n! ^$ U6 O3 P else -- the vehicle @ is empty, both vehicle and part are in the same dock station, o5 y* S o! a! Z
part := @.transpOrder;
2 D5 y7 r! k4 Z part.move(@);-- load part" U4 @0 P' V, D: I" A5 x0 C# c
@.CurrIcon := "load";+ i& I1 n, `% E9 R
GlobalDistObj := part.globDestination;# H4 @! C+ @0 ^
assignLObj := rgmanager.rgAssignL;$ i: \ k& o+ F
row := assignLObj.getRowNo(GlobalDistObj);7 k, k) M& |5 i/ Y0 X4 [
if Row = -1 then -- since 70; o4 }1 W' E& N: k. [3 w
if lan=1 then5 }, o" R9 p' J5 z* v p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 f. ?: u7 s! m2 X to_str("in der Andockstation: \"",?.~.name,"\""));3 A# o8 K5 l- Y) w; |4 |
else
8 [7 O( Z) i9 I! z' k8 p5 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. H# d7 |2 B+ y( m to_str("in docking station: \"",?.~.name,"\""));
& C P$ A8 M9 g7 y# f ~! R- m: z end;
7 @1 C7 _, N0 t7 v else+ `0 N9 g+ I! Z
@.Destination := assignLObj[1,row];
/ b$ @3 s5 z& M end;
* Z& O: ~: l U% h( l& W3 i newDirection(@);* r+ _: ^/ k) ^6 T0 `. `- C
@.HasOrder := true;+ H1 k7 y" j/ b; a
end;
( [( S, p X- V end;8 ~4 \! S6 b% o- a8 M
end; -- of the method
6 V; u: n3 c+ e+ `1 T- e |