/* called by: entrance ctrl of the object 'track'2 k. H1 a5 c- a0 ~- \; R
*/
; \3 d) f2 t3 t& V" g. Bis6 I/ x9 c) r) j+ j+ C, p( M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% b, u% ~; m5 [% D/ t$ f7 hdo
j1 d" [! Z/ ], s Lan := rootfolder.Internal.Tools.AOLlanguage;
# \9 v; S3 ~7 v Q if current = @.Destination -- else return! b [" z* l: M0 {
then
' k; f L' i( P @.Destination := void;/ f. F; [; r* y0 ?
if @.occupied then" m, ~8 B2 g+ H
part := @.cont;+ r+ L6 } ~% T9 D
@.transpOrder := void;* A/ m8 C' c- b7 |+ ?7 g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! M4 C6 Z- {) A/ X6 @' l @,root.eventcontroller.simTime);
9 h m9 @+ o% ?- t( v) N @.HasOrder := false;+ _9 |! F5 q. r9 ^0 \
@.DrivingHome := true;
]5 q; I) ~; ^3 W2 L7 x( [ rgManager.tryToStartTransOrder;
9 ^) D% z' m8 }& L: V; Z( T if @.Destination = void5 d2 U1 a$ w6 e7 U, |/ g
then -- no transport order for vehicle @
' Y3 S9 _: X6 E# i) i @.Destination :=
' g+ p+ S. s+ z+ z. L rgManager.nearestFreeStation(@,track.~);- v! p& G* X1 b
newDirection(@); - f0 |$ I5 P9 p
if @.Destination /= void then
/ ~: M( C+ I5 ~4 s$ f8 d! A0 {0 i @.Destination.NumReservation :=
8 i# `6 b7 \0 o' |( z8 L @.Destination.NumReservation + 1;
a" Y4 C( I I+ n: O6 a9 | end;
- W: E& E5 ]+ R' e7 C% @ @.CurrIcon := "drivingHome";
9 @( g5 d s! J! ~5 h @.DrivingHome := true;
6 q! h3 Y* e- X$ D# C+ W7 w end;5 S4 Y2 [; V5 F5 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 `; C# K2 P: _- g* c7 Q; F part := @.transpOrder;
# ~. w! [) q9 s$ n part.move(@);-- load part, H: ?; [# O; _4 \1 d3 z
@.CurrIcon := "load";
1 b7 ~0 j, i. P1 k o1 y- ~ GlobalDistObj := part.globDestination;
9 j0 r N' Y! m6 M/ A( D+ i4 m assignLObj := rgmanager.rgAssignL;
: b& ? q6 A7 X4 c+ q row := assignLObj.getRowNo(GlobalDistObj);
~. G) B( a5 N9 `! V. _ if Row = -1 then -- since 70
* p9 h/ e( e' {2 s9 P! q if lan=1 then9 ]9 z' L! w' @) Y" m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& r4 B; d, {3 e; O% h to_str("in der Andockstation: \"",?.~.name,"\""));" z6 [5 v2 q8 _' O0 @
else" O# N+ ]% l8 }+ A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 m- f$ v7 ]& F) }8 J! q
to_str("in docking station: \"",?.~.name,"\"")); 7 m( g$ @$ R$ {, i
end;
$ B! i& B& Y. ~+ d s else' g4 a( k0 Z" D D t1 @4 P
@.Destination := assignLObj[1,row];
% A0 K/ C, C0 M5 f, D& y end;
; g/ x# a8 e; r x0 F5 Z7 C+ B newDirection(@);
: z$ c; X- U+ T- ? @.HasOrder := true;0 E; [' z0 H- V
end;: E v( a# }1 n5 n9 j
end;
! R& T2 M6 q& B' wend; -- of the method# D5 t! S6 Q* q
|