/* called by: entrance ctrl of the object 'track'
) @3 Q: d/ x) N* q. ~*/
" e3 M8 E" Q% Gis4 H1 `8 q, T1 Z9 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) P8 y0 E0 J: q: I! E4 {
do
$ ^3 o' ~* r$ C6 |( A1 U3 F6 C: r Lan := rootfolder.Internal.Tools.AOLlanguage;% S" u$ p6 |/ [; G5 o0 ^
if current = @.Destination -- else return$ d a2 e" K/ m3 i8 ~+ m9 v
then; U9 I3 W; `4 I' }# u
@.Destination := void;7 q* y+ g; T: F5 r$ ~3 i5 T
if @.occupied then" N8 l2 C1 [4 |
part := @.cont;4 \! e# O: _- j8 [( E
@.transpOrder := void;3 q3 M6 P8 J" O C% Z+ p# L S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. p0 K2 _, l) T% v+ a
@,root.eventcontroller.simTime);
. f8 r$ k' O+ X0 E; k @.HasOrder := false;( [5 P0 B2 s2 Z' q
@.DrivingHome := true;
$ O3 F, \5 V# i rgManager.tryToStartTransOrder; L0 r! L* u# z+ s9 I# ]/ H
if @.Destination = void% m0 J: }7 ?7 r' Y4 y
then -- no transport order for vehicle @5 `( t x7 W) Z2 N
@.Destination :=
y7 a4 M7 G" `$ W% B9 F rgManager.nearestFreeStation(@,track.~);
8 B' A( k) N% M, w newDirection(@);
7 N x) `/ L) _! e if @.Destination /= void then
0 r; u/ K& b, j' D1 X @.Destination.NumReservation :=9 k" s* b" B; Y6 k6 k, V
@.Destination.NumReservation + 1;8 o- b( x! v2 P$ {1 R7 K
end;
; f) ]/ O$ A1 _& W0 K2 { @.CurrIcon := "drivingHome";' z7 t h: C1 H& D5 C3 B" R
@.DrivingHome := true;
1 I! t+ M+ O4 \* x: B8 F1 |- ] end;
+ c. N I% t2 C9 z. @: ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 d7 T6 ?. K7 n# } T
part := @.transpOrder;
3 s$ ?" g0 @. ^: \- ~ part.move(@);-- load part% ]7 A6 Y4 `# ?) y" [1 x
@.CurrIcon := "load";2 T0 a& ~/ [' {
GlobalDistObj := part.globDestination;0 l% U5 J. F6 x2 i/ ~+ l
assignLObj := rgmanager.rgAssignL;! p) y. Z' m+ x
row := assignLObj.getRowNo(GlobalDistObj);4 m' @! A; f; W
if Row = -1 then -- since 70
! ?: ~: C6 ^8 X( T! l if lan=1 then
' H* D% b3 ~5 {4 a9 S4 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 t0 E, W3 O; P, E; y3 d to_str("in der Andockstation: \"",?.~.name,"\""));
6 e+ |& ?2 N+ i else! b9 d; w+ \5 B+ y' v, U6 C) z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' z4 W8 j4 c. V
to_str("in docking station: \"",?.~.name,"\""));
0 h' g# I) _# R+ R! w4 b! ? end;
0 x" ^1 f2 {5 O3 X; S' m else
0 Z) H9 Q% w p' I @.Destination := assignLObj[1,row];
/ N0 J; ^* x1 O end;
: T: _, g! `8 q newDirection(@);
- G; \% e! x% l7 @' Y0 u4 g @.HasOrder := true;
# ^. c! Z8 ?' V; u end;# I7 R: i: I/ Y s
end;
! s6 h. {; S" G/ I: R6 y# n# \. Vend; -- of the method; B" b% v& E+ R {, m
|