/* called by: entrance ctrl of the object 'track'0 x$ F4 n& I# P
*/
4 R+ [3 A% D2 j+ b- Kis3 s3 ^+ ]- M9 A9 @9 @( K+ r! s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ G1 {( F& S7 c) S. M+ P
do
0 Y0 R. E+ U; _. x Lan := rootfolder.Internal.Tools.AOLlanguage;
* @9 Q) ^/ J$ m if current = @.Destination -- else return, q% v+ s1 y3 K0 y% J; S1 V
then
% j# o% P( M" a- M1 k0 e @.Destination := void;; f# O# j: ~" o9 Y7 M
if @.occupied then9 D0 Q9 Q' h9 \+ m/ m) G4 O* i
part := @.cont;) e; p9 E2 a# @ R D! H% c7 ]* ?1 L
@.transpOrder := void;1 P. p- Z" ^$ g6 r6 l6 U6 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* d' l7 w2 i8 l2 Y
@,root.eventcontroller.simTime);
* n6 r& t; I- {/ S5 z) X @.HasOrder := false;* U; T) q/ ]* H
@.DrivingHome := true;% e, S+ e1 c" S T" a
rgManager.tryToStartTransOrder;( q, a9 f$ m2 S% b5 O$ k; ]
if @.Destination = void
: U& h* e8 y) o5 ~7 s8 }2 u then -- no transport order for vehicle @) n q# C) E+ @( ~/ f* [% O& Q' _3 l
@.Destination :=
6 G+ m8 Y; ?$ u5 C+ k$ q7 M) C7 n rgManager.nearestFreeStation(@,track.~);- i7 i/ h2 l m$ ^2 p7 g
newDirection(@); % ~( p6 L- y1 S! j+ D
if @.Destination /= void then+ X+ q7 w* _ L3 B0 ]
@.Destination.NumReservation :=
/ U6 H2 D* O: g9 I @.Destination.NumReservation + 1;6 v) |6 x5 k% Y0 f% {# V' H2 ^
end;3 l# e" ?- x$ F3 d& F& S( i
@.CurrIcon := "drivingHome";
" j, k S o6 j @.DrivingHome := true;
$ ^# |, U. M9 k8 i, ^ end;
& R; I/ i% X+ `7 |5 r5 w7 N% k/ r else -- the vehicle @ is empty, both vehicle and part are in the same dock station: g I- O8 |# A" c7 P9 M
part := @.transpOrder;
% n& w) \4 G1 ]* m part.move(@);-- load part
4 S3 c @* A2 |: }4 {* A' \ @.CurrIcon := "load";; y' {( K. A- _* G, O
GlobalDistObj := part.globDestination;
& r3 Q! ]& {0 `7 ] assignLObj := rgmanager.rgAssignL;
R( e8 ?6 @7 W7 s/ R3 u0 ^/ L row := assignLObj.getRowNo(GlobalDistObj);
. c0 i6 v& D3 Z! {' i if Row = -1 then -- since 70
* E# L% u& \- G6 }1 v6 E- ^6 R if lan=1 then
/ {3 }8 c) D% Q, C6 q G+ n% D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 ]) t9 @( U' g" H2 B
to_str("in der Andockstation: \"",?.~.name,"\""));
/ D& C: w+ { T. j( r else' n3 Z4 ?2 H$ w3 l- b) W) s! B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! I6 X+ g b3 K& O/ K% m: V
to_str("in docking station: \"",?.~.name,"\"")); ; E$ o7 t: Y) W8 e8 v+ F
end;% q4 M) g @) D9 B: ~# Q
else! w, k/ Y9 `! x" v2 d* B
@.Destination := assignLObj[1,row];
- _0 J$ B0 Q+ `1 o end;
! X; W* t- [' H5 R- m1 z, x newDirection(@);
6 h {; W2 ~+ T% N7 O @.HasOrder := true;2 |& b4 Y6 K# d2 A2 }) a: ]+ ~
end;3 [* K H1 b5 T+ `- U# H$ L- ~' I
end;$ C8 m# c& r4 a( }7 {1 `: r: |, t
end; -- of the method# {4 P& `/ y: @% M8 s; L7 d) _; ` \8 v
|