/* called by: entrance ctrl of the object 'track'* s: m" o! O3 H( Y3 \8 ^2 H
*/
7 v9 d* g R& |' ]: q- Z$ Wis, r! {" K1 @- q, K8 R$ A4 p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" _( I( i4 C h8 Bdo. u# t8 D% r$ R& W' u: F8 W
Lan := rootfolder.Internal.Tools.AOLlanguage;* Y3 N- c$ y. ~) w
if current = @.Destination -- else return
1 l8 [- P9 t. B' \ then
( X' ?) l# e- I j" {+ [6 [* r- W @.Destination := void;7 R, m& |, c! m$ |8 j
if @.occupied then
3 L V& {/ j: P7 _; {& b# M part := @.cont; n) r% l! ^$ f; t
@.transpOrder := void;2 o/ ]0 t4 m( A& Z, F! J# i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) K* J- O" O2 l+ B; ^6 q4 o& q0 X @,root.eventcontroller.simTime);
! m- { \1 u- w3 u8 j1 w @.HasOrder := false;
8 d" q4 @' ?" q6 R @.DrivingHome := true;0 k4 e. P3 u& H# |8 G N
rgManager.tryToStartTransOrder;7 X* z7 y0 ^$ W/ J3 w9 y
if @.Destination = void
3 v$ ~ M R, i1 F! { then -- no transport order for vehicle @ }6 J7 L4 H6 u
@.Destination :=
k) R# M+ t) c rgManager.nearestFreeStation(@,track.~);5 R3 j8 z. d+ x! A Q
newDirection(@);
+ G( Z" t! |8 F* Q if @.Destination /= void then
3 f5 V4 i# N* Y; i3 G9 F( i" V; g9 X @.Destination.NumReservation :=
# \& V2 g. n& ^( M h @.Destination.NumReservation + 1;# a( a o8 F& u/ N: L B F
end;
' m" }- V+ T% x7 V @.CurrIcon := "drivingHome";
; ~- R, j+ W7 n- S8 u6 S. ^/ u( Y$ w4 C) s @.DrivingHome := true;% M0 m8 J: ]+ ^# Q+ ?: B, u
end;
h0 Z* `9 {8 I! ]5 e: S& A else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 z0 X4 K3 [: K4 b2 F9 I* H
part := @.transpOrder;$ J( T( _9 f, j4 j% i
part.move(@);-- load part4 u. {: b; K8 n: q' c+ v
@.CurrIcon := "load";
& S5 ]* G- @; O" Q5 p6 z GlobalDistObj := part.globDestination;& F9 M* K& e/ `% k/ |- M! s" N
assignLObj := rgmanager.rgAssignL;4 M- ?' Z! b; l1 |
row := assignLObj.getRowNo(GlobalDistObj);" ?& E' q' Q& @( u0 n
if Row = -1 then -- since 70 Z% s# G- n f8 {
if lan=1 then
) l& s3 w' `5 J7 \5 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," E2 Q/ ?* J( ^1 H% k
to_str("in der Andockstation: \"",?.~.name,"\""));
/ o" m/ l6 Z! @$ d# _ else! y! M" m2 f7 u! c. G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
a2 q. f9 f/ @# F6 z+ Q to_str("in docking station: \"",?.~.name,"\"")); , ~4 i k- `! a# B% v+ Q: t
end;
4 N; W9 h3 ]' W, O* E$ J else
# u" V" O6 F: j, q, @, Q @.Destination := assignLObj[1,row];
2 ^9 A9 L+ k) G+ d5 r end; 9 A( K4 @: J- I7 Z+ z
newDirection(@);
% b5 j+ g3 z9 @. I/ f3 O" W4 |. `+ n @.HasOrder := true;
+ Y, @* ^1 A: `, C% o4 a end;7 B0 c, S( x8 l
end;+ q, i3 C$ F1 L7 s
end; -- of the method7 K9 [; }6 a6 w1 x
|