/* called by: entrance ctrl of the object 'track'' G# v# N8 {9 ?& C5 B* c
*/
N, b& B, {0 H& @is+ ?$ t# G- s, ^0 N8 h7 I! ~8 d6 L+ ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% K# A# ~* o1 n" ^" p1 z6 J- D" vdo
& T! K9 ^2 D$ `/ C0 N4 t& `" [5 t- U Lan := rootfolder.Internal.Tools.AOLlanguage;
7 w( m8 p- V0 ? if current = @.Destination -- else return1 X V- O0 n! W5 V2 t4 }4 ~
then
% f' i3 m3 x+ E5 V% v- \5 ` @.Destination := void;
; w( j+ U1 O9 ` if @.occupied then
7 m* v7 e. l0 m% F% m1 |( O$ G part := @.cont;: y: I$ Y# `2 s2 N9 F1 C
@.transpOrder := void;
4 k; D% I: b! E" d/ U0 b6 d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 h; B5 L& o2 U
@,root.eventcontroller.simTime);- F0 M x- R' p( G0 b' a3 o4 e
@.HasOrder := false;5 R) {/ I |+ V6 h
@.DrivingHome := true;
* b$ }- H! g3 A0 P n; B, ? rgManager.tryToStartTransOrder; Y: m! ^4 M2 K& _1 z# \4 Y: O
if @.Destination = void1 e* \0 O/ |, m1 m6 S( z
then -- no transport order for vehicle @1 h- l- E) X% o+ V. v% {: _* ]5 z
@.Destination :=
% B9 B7 M+ _ E, E8 O' y! O+ c rgManager.nearestFreeStation(@,track.~);: {8 P4 T7 y- _4 M
newDirection(@);
$ b2 x# {+ H( p; }, V if @.Destination /= void then
2 _$ {: ^; d K; M0 ]" S9 G @.Destination.NumReservation :=, n+ M4 i+ K& h) k& t
@.Destination.NumReservation + 1;
: a; l9 d3 }6 K( B; ] end;
, T; Y* E$ G+ W W @.CurrIcon := "drivingHome";$ J* j4 l& z* t% R1 C
@.DrivingHome := true;
& z8 B9 ^9 i" q; a end;
0 T+ S) H8 @" S# b9 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ h8 T; y9 ^$ @ part := @.transpOrder;
$ J2 o$ y0 v! u: L part.move(@);-- load part9 o- g" p4 s6 r
@.CurrIcon := "load";
" F6 E. S/ C8 ^2 ~* ^3 Y6 x GlobalDistObj := part.globDestination;: V4 X9 J1 w" l3 X9 X
assignLObj := rgmanager.rgAssignL;
9 T3 ?# Q( v/ T) S- L4 k( l0 W1 x row := assignLObj.getRowNo(GlobalDistObj);
3 f$ N3 d6 v$ J if Row = -1 then -- since 70
v% k3 u, c! y# X if lan=1 then3 w$ v% F( [0 x# S/ q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ i) V5 N/ i- |4 ?/ C) f) @ to_str("in der Andockstation: \"",?.~.name,"\""));
! j" J I- @) c# s& q else6 B t% n; p, \* @0 t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. c3 H6 ?% ~9 \( R; D }) b to_str("in docking station: \"",?.~.name,"\"")); $ w8 d- j3 v5 ^
end;
% c; \2 e2 u6 A1 G( @4 }& t D else/ a) q6 M: Y$ w; Q
@.Destination := assignLObj[1,row];
' S. K8 U7 X* j end; - v! d/ o, d5 ~2 @; b
newDirection(@);
_" F! R6 a5 ]% n* s; y @.HasOrder := true;
. D1 |( A; S6 P i( x( N end;( H0 Y6 I: o1 \8 n' J
end;7 C( v1 N+ _* g. D7 ~2 V- m
end; -- of the method, W* j. F5 R- `$ H, N% H
|