/* called by: entrance ctrl of the object 'track'* b$ m- I3 C4 [! L1 L/ C& I
*/
* r& v! W) n7 M7 Yis" d7 t8 i$ L4 ~ J' e# j' G: @% S* L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- r* ]! S( m) ^( }9 udo' f& ~7 x, C" q! f; t" L
Lan := rootfolder.Internal.Tools.AOLlanguage;9 k3 g6 h5 g: G5 q" ~
if current = @.Destination -- else return
% g1 t# G' Q/ ?* ?/ Z then1 c) ?8 P; @0 o. y
@.Destination := void;
" @' S0 ]# m& d2 A6 G1 m if @.occupied then
0 s( \* R& @5 H) |# i l: y7 \ part := @.cont;
2 Q l: v& s( s* @0 r5 Z$ Y @.transpOrder := void;2 V. R( B5 `* \( ~$ b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* t# J! y1 l# ~! C! ?9 c+ V5 ]
@,root.eventcontroller.simTime);8 ^7 G @7 _0 \0 x3 v
@.HasOrder := false;. r' d2 ?8 G( b: x4 Q. y
@.DrivingHome := true;
: ~* s' K* t' H3 ^0 B6 ^, g8 L rgManager.tryToStartTransOrder;
; ]* ~* X, ?5 P if @.Destination = void- a* v3 |1 R8 C" u1 F
then -- no transport order for vehicle @- i$ F$ v/ o6 I7 ?8 v4 i: a
@.Destination :=
2 p" }+ U2 [6 ^( s; M rgManager.nearestFreeStation(@,track.~);
! H0 r- ]+ ^6 x4 Z `) m# l newDirection(@); # r" o: W7 X6 S; z `$ y( |7 l1 s0 x
if @.Destination /= void then
! J3 H+ t2 @7 ~- R3 N- d! B: J @.Destination.NumReservation :=
3 u" Y, f" e. n @.Destination.NumReservation + 1;8 Q: s2 C* B k7 f
end;
' f6 V ?9 d+ ^4 ] @.CurrIcon := "drivingHome";* [# t5 \4 ~1 X |# Y
@.DrivingHome := true;
" y* ^7 l7 U u9 a7 k7 }7 O+ U2 H8 v6 Y end;
" ?( X3 r5 v' { z4 K else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 m) @9 o4 _- x
part := @.transpOrder;6 ~8 z$ S' H( l/ v" \
part.move(@);-- load part* T4 Z# x- h C7 k
@.CurrIcon := "load";3 S0 J- Z) u! h+ g
GlobalDistObj := part.globDestination;
: f, w" d, B& d$ d/ k assignLObj := rgmanager.rgAssignL;/ t( s& Z+ F* K
row := assignLObj.getRowNo(GlobalDistObj);5 ^: q2 s# h- C0 a
if Row = -1 then -- since 70' T7 I3 z+ k; i
if lan=1 then$ x8 G4 f9 ?* F9 h* B3 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 T9 V9 @: T# N
to_str("in der Andockstation: \"",?.~.name,"\""));
& z# T5 j0 e8 r8 Z( D else
+ s; o& O/ n2 P9 b# X* N; p5 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 r2 ?% l3 h& G7 k3 A. @4 u+ {
to_str("in docking station: \"",?.~.name,"\"")); ) i6 B4 q# W7 `, R' C# Y, F3 E
end;
# E4 G) G* }" c- h5 t9 e else" F8 w# ~. N5 k- w
@.Destination := assignLObj[1,row];
`. p, z+ E" B3 r. @$ r end;
) b2 J, ^2 ~- {9 } m! a newDirection(@);
$ O. V+ a) ]5 B L @.HasOrder := true;" d9 O1 `9 m! ^% p2 s$ @& m
end;
" L( {6 C" G: k end;9 z; w; T( P5 `5 ]' J% T+ `/ R# k/ M$ @
end; -- of the method5 D" z/ ` ]& l, I/ ^
|