/* called by: entrance ctrl of the object 'track'
& P& G9 Z3 U, h3 m: J*/% {( T7 h# u- U& Y, z+ U* ]
is0 Z8 {) M% Q; {" x6 z5 V* x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* U2 g8 o7 }0 w. F. y6 T
do
. m3 p0 C3 \/ a4 u0 \ h Lan := rootfolder.Internal.Tools.AOLlanguage;
" p8 L7 R2 E9 a2 I. }0 t6 _ if current = @.Destination -- else return
. p7 ^4 C' G% v. y% ?, g( z( Z! C then2 A0 ^$ Z3 V+ S* m
@.Destination := void;
: J& f9 n, L9 t4 W( P: _ if @.occupied then. d0 V M/ |; b* d' U* c9 z2 X4 {9 N
part := @.cont;
3 X' O* b( J# ^ O6 D/ B+ y @.transpOrder := void;5 | x! I# p' X8 F9 S4 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 u4 q! C* b# e( r/ b
@,root.eventcontroller.simTime);) |" G' o; I# r+ g, q
@.HasOrder := false;
7 ]% ?' _2 o0 J) ~ @.DrivingHome := true;8 P/ {# k; N; Y! n% s+ w1 `: C
rgManager.tryToStartTransOrder;
4 s% M+ v% G9 F2 ^( q if @.Destination = void
* ^# C0 f* h- m& z then -- no transport order for vehicle @
! B( E! {' b% J: D4 ]; U @.Destination :=
+ j# `: f8 |8 z* B! q$ O rgManager.nearestFreeStation(@,track.~);
$ c3 x5 ], F8 B- l& C newDirection(@); {- I# Z' D# U0 A
if @.Destination /= void then
8 Q/ A6 a2 L0 i @.Destination.NumReservation :=
! m1 p- U8 n5 S0 X, I @.Destination.NumReservation + 1;3 x* J3 F& I3 [$ _
end;
+ @( y [7 X/ H# c5 g @.CurrIcon := "drivingHome";5 S+ H& A9 @# u, `" }) l# T
@.DrivingHome := true;
0 U- i% e) j3 h" u2 s end;
$ d+ E& y( w# E: \ G4 N/ \. {9 g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) x- b+ X# i! L+ m2 ]( n* ` L part := @.transpOrder;
' u6 z. h! q* z+ V2 N, W' |) h part.move(@);-- load part
" c0 |2 L' f3 }' L& V2 i1 S @.CurrIcon := "load";
$ @9 S! a. K& { Q GlobalDistObj := part.globDestination;8 n# Q0 V1 s. E, Q
assignLObj := rgmanager.rgAssignL;
% M* L V8 }' x* {# k' [ row := assignLObj.getRowNo(GlobalDistObj);# ~' T" R9 O9 W- t, x
if Row = -1 then -- since 70
# s: E0 m, t$ P$ o2 B if lan=1 then( j0 d: n* I/ j& a& s' |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 T, {4 o6 R, F$ l# b
to_str("in der Andockstation: \"",?.~.name,"\""));
8 v* r% m/ g6 t, M: K( W w else1 H/ [8 K+ @, q+ d* o2 Z2 R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' A1 x3 D6 X6 z, _, n4 I& ~3 ]
to_str("in docking station: \"",?.~.name,"\""));
; `# v! u3 q$ s+ L6 N6 T" L$ c- k2 Q end; T2 o' e( S. {# x& K, ]
else
! F0 t; x, y5 n1 q4 Y! E @.Destination := assignLObj[1,row];9 c% J( Y2 Z* `- l% H" l% T! U4 x- O
end;
8 w: k4 a4 k6 u+ n3 ?5 g newDirection(@);" V5 r$ E) J' N- o* h& `
@.HasOrder := true;! T' B U3 W$ V6 @6 H
end;7 O0 W8 D+ l3 N" {0 D2 n9 n
end;7 I+ u) Z* B+ E( Y4 q, P
end; -- of the method
- \0 m, _2 `' P' t1 E |