/* called by: entrance ctrl of the object 'track'
9 e: N' e% U: g! R*/
. N# Y7 ]9 e5 U- |is
3 @; P& h6 q! z% b& x% b part, GlobalDistObj, assignLObj:object;row,Lan:integer; O; C5 c% _. b: m
do7 g$ @5 H6 z$ `
Lan := rootfolder.Internal.Tools.AOLlanguage;# |- L5 M' ]7 i# X
if current = @.Destination -- else return
7 P, H# e" Y, a9 @( } then+ ?" m; k& [! w5 G! e- p, z
@.Destination := void;3 I2 T/ B1 {. \# U
if @.occupied then
/ S$ j9 j+ T) t) Z9 m% g part := @.cont;! f1 P: o0 ~ ^7 x, G
@.transpOrder := void;! ^& V! U2 W' h; `& w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' q; m9 `- z: P% v3 m/ a' E @,root.eventcontroller.simTime);3 X( ~+ L) n: J* W9 l/ H
@.HasOrder := false; x8 c+ \3 _) n% F
@.DrivingHome := true;& {# T) K* R" N7 I0 Y7 F
rgManager.tryToStartTransOrder;
+ t2 D3 A$ g8 {- u8 D8 B' p if @.Destination = void( K0 Q+ X! |% @, i X( H o1 z
then -- no transport order for vehicle @
8 \1 L" I. h+ c& s0 K. u s @.Destination :=
3 |! S9 o$ U M& N9 E# t! o rgManager.nearestFreeStation(@,track.~);
p1 P# C9 O! s% ?5 d newDirection(@); ; v1 u b& H0 M% Z
if @.Destination /= void then6 ?* }) f! ?% Y$ Y+ o, o
@.Destination.NumReservation :=
; Y) `& p2 x% [3 k @.Destination.NumReservation + 1;
6 O( W' W Z! `8 v }& } end;
6 ?8 x& T. e) W O1 ]( c( ]: ~ @.CurrIcon := "drivingHome";. q. w0 {, j- x- I
@.DrivingHome := true;
% U& s0 a" J' n) s- \ end;
# H6 D% h5 D* W5 A* Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station& Q" U- \0 A( U
part := @.transpOrder;) ^4 x& \# l+ k: m
part.move(@);-- load part" R- ~2 r2 A$ `( ~1 N
@.CurrIcon := "load";
1 b+ o2 N5 j, n0 w9 m; Q GlobalDistObj := part.globDestination;% j+ ~2 D z5 }+ L; y
assignLObj := rgmanager.rgAssignL;3 L/ V# l- f5 M* }9 M
row := assignLObj.getRowNo(GlobalDistObj);9 L+ H, M0 A) U U, A2 B7 M1 G- ^
if Row = -1 then -- since 70
7 f; u! j2 X. M: I' Q8 V if lan=1 then0 K" K' u. F. L4 U- ]2 P1 w9 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 | C2 J. H5 }* J( U to_str("in der Andockstation: \"",?.~.name,"\""));
6 i/ _) u0 K; b% [ else
, B- \8 V, t' m+ V7 o# v) p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 U/ k- z4 M( p, k
to_str("in docking station: \"",?.~.name,"\""));
+ C. n$ {2 l' ]9 y% G% z end;0 e& I# f! A! b/ T# d1 F
else) V: b/ `; j0 M; ] T; E
@.Destination := assignLObj[1,row];$ G1 R) v% M R+ j* I+ B8 G/ t
end;
4 Z5 _0 i$ K8 n, K) K8 M newDirection(@);
+ M) j# E6 {! ]8 L6 A- _ @.HasOrder := true;: V* ]: g# i% a
end;
: M" J2 e! T0 [2 d3 S end;- H7 h7 G- T1 |* x
end; -- of the method
9 l" N# E+ l3 n$ l, s! N6 q |