/* called by: entrance ctrl of the object 'track'
9 i7 h# Y& H0 C- P9 q) K*/
/ p% j# k# }4 H0 r9 vis+ H! T. l3 T, Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. c) E. }5 b$ w, B. z
do6 j5 w$ |4 S3 L
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ P& X% T7 M- E0 ?7 x3 ]8 H: E, L; q if current = @.Destination -- else return
/ ]+ P' C0 ^! W then
8 \3 c# n3 O1 R" n4 [; _# M, | @.Destination := void;. K2 ]# Z3 j0 |; |5 F3 j
if @.occupied then# ]/ L% E8 O# u' j: E# p
part := @.cont;
9 T; R4 E% n, w. N3 V P @.transpOrder := void;
8 @: r" g( g8 H5 @# m5 i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ H0 E5 `6 d6 K5 R* M; e @,root.eventcontroller.simTime);
& _* j3 O) E8 V1 _9 p: H3 y @.HasOrder := false;8 z# k* i: j" G$ b/ a
@.DrivingHome := true;
/ Z8 Z. v, I2 P3 V2 V rgManager.tryToStartTransOrder;( s. @8 i+ V4 z0 |2 w( k( s$ j
if @.Destination = void8 H0 Z( ~- [0 a S8 G' v
then -- no transport order for vehicle @
5 ?' Q- ]. D, ] @.Destination :=, r# d. O0 N0 |7 {4 L- I, R0 k! ~ x
rgManager.nearestFreeStation(@,track.~);
6 I+ j1 h! S$ S7 g8 U: G& c3 R newDirection(@);
* _7 o6 _( [+ v% s8 q. x) f, p, h& q if @.Destination /= void then3 H6 j, H2 B4 G7 L
@.Destination.NumReservation :=
: R; m6 G% d& s' i% c @.Destination.NumReservation + 1;
L7 V4 q6 f K. S end;
f$ f; {3 W! f3 I, [: D0 \ @.CurrIcon := "drivingHome";
4 M: [) @* s: h$ p: g @.DrivingHome := true;" d5 {5 Q- ^. F. w2 k
end;
; S4 `3 ?0 ^$ C3 b* z else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 D9 x/ d# r9 ^2 r
part := @.transpOrder;+ o; |# \9 @) z1 ~3 j1 e
part.move(@);-- load part0 J# S1 |8 U! B* c n1 M% m$ Z
@.CurrIcon := "load";
( i _. y6 n! q6 v; ] GlobalDistObj := part.globDestination;
! A g+ C ]+ A8 k( W assignLObj := rgmanager.rgAssignL;9 n2 d- U: c' h% n8 B9 O
row := assignLObj.getRowNo(GlobalDistObj);" h! v6 e- O1 r( }* T
if Row = -1 then -- since 70
5 B3 E# F& }8 B: [, Y if lan=1 then6 q: r) c6 S2 h( g; U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# c0 R% P2 u4 |2 _8 }
to_str("in der Andockstation: \"",?.~.name,"\""));
$ X" k5 Y- I1 L! u; ]% F3 D else
" Q% R/ C6 k5 m+ [' Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. b! R- d7 U' |/ r" d& A to_str("in docking station: \"",?.~.name,"\""));
{) H% L# Q: y end;4 X- S: R1 j0 |" u. _
else" [1 N; a8 [1 a/ ?4 V
@.Destination := assignLObj[1,row];6 H4 l- ^5 m; R t/ a- h: j( \
end; f7 ^( }. s: [' h/ Y$ D1 f
newDirection(@);; h# E. L; P. v& l
@.HasOrder := true;
2 A% X% k+ @8 V9 i1 l- @/ I5 ` end;) C m$ i: N! w% d
end;
4 Z5 }$ X' Z" L. send; -- of the method2 _1 N; {% ^7 G! s
|