/* called by: entrance ctrl of the object 'track'9 n$ ^/ j3 s$ Y; T5 u; r
*/& S' L. \; d5 L) i- a
is: I0 L1 b7 s' u4 W; ] H1 N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 R" @, L' |) C# v5 c, N h! X- @do P) Z4 X) }: d0 L5 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;" n1 {: o2 i# s- m/ p5 }4 w
if current = @.Destination -- else return5 q: i, H/ k1 {% z. E/ |7 ]% m
then
4 A/ p& v% w! Z! Q6 R @.Destination := void;
* I% d' m, E5 t if @.occupied then
. I/ X* c( a. N; d l part := @.cont;+ X- y. A& N% |, l- _! V
@.transpOrder := void;6 X+ ?7 G$ ]. e( y* m1 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ F$ v0 d1 X6 E" o& e9 {3 V/ R @,root.eventcontroller.simTime);
6 i1 {; n+ i; O# {: m; K @.HasOrder := false;
+ g. q" E+ ^; k. V' v; J @.DrivingHome := true;. h2 t8 L- ? X1 S0 i( Q
rgManager.tryToStartTransOrder; w# q$ |5 l. b9 h
if @.Destination = void
1 `% s2 _4 h- P+ d2 L+ U then -- no transport order for vehicle @
' l9 n# T# {+ q @.Destination :=
5 I* x2 A4 D3 W1 V G rgManager.nearestFreeStation(@,track.~);
+ U) E8 Z1 I4 J0 [ b! P- ~ newDirection(@);
% o% ^1 s0 E+ Y( s% F) d if @.Destination /= void then1 b7 N/ w% I7 @& k
@.Destination.NumReservation :=
+ B+ {- `1 \* b2 A2 T8 c$ c4 ` @.Destination.NumReservation + 1;
8 }- x# K6 e+ @; j6 l- m- M end;: Z( M w7 f7 B q+ k4 i# O
@.CurrIcon := "drivingHome";
6 G9 V; T+ a: f, s+ ?5 X @.DrivingHome := true;( Y( F8 f& l3 N- \0 H
end;
% Y6 Q5 ~' m* T4 `6 F1 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station @& O7 i8 d8 D0 d6 T
part := @.transpOrder;6 [ y. ~9 t3 y
part.move(@);-- load part% P* P# a1 x Z# `* @
@.CurrIcon := "load";& {8 _! E0 d& N5 x. r
GlobalDistObj := part.globDestination;0 X, n8 |& I7 \; M9 u4 |0 ^
assignLObj := rgmanager.rgAssignL;0 ^) `6 T, I+ v$ `
row := assignLObj.getRowNo(GlobalDistObj);4 S5 H' Y _! n) ?
if Row = -1 then -- since 70
9 v2 \3 @5 ~7 y% ]4 c6 Y0 M6 K if lan=1 then8 Q: ~' M- F: |6 h9 S7 d) Y2 q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 b% B1 X+ c' b- X. V& @) \- F
to_str("in der Andockstation: \"",?.~.name,"\""));
; x) Q0 L( R; q3 g- T, A; F5 C; q6 ? else" z# b: Q0 h3 F9 o' V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% e, F/ z: f1 Y) S5 p to_str("in docking station: \"",?.~.name,"\"")); 1 V; T( t I, L' p; b# K+ X0 I8 e r
end;
. K: z" s' H! g+ v& n' u else
& y7 ~% g& R0 W+ z: ?% W& M @.Destination := assignLObj[1,row];1 e6 d J* z3 f8 K$ w. t- _! @
end;
/ a! f" `. O; P2 z& r4 p newDirection(@);
$ u# i$ i, S# p) {) i @.HasOrder := true;
! x4 v- \* u! T4 N9 Y9 N end;
" a' {& C1 z% Z' G0 g end;
: V4 ]4 z0 S+ ]- gend; -- of the method8 s h8 L" e+ {: d7 g* _! J
|