/* called by: entrance ctrl of the object 'track'
" i% G* G. x1 D" Z*/
1 f% u R# O( a0 Uis% e2 }1 _$ ~( ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 _ D& M, V* M2 C" z
do4 U T2 h- C r8 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;, c# u* r7 n! d' J* f2 i, m
if current = @.Destination -- else return
% v. Z1 }$ E4 R1 ^+ \- x then
7 j ^: O5 }& i @.Destination := void;0 f# ^ {9 Y" o
if @.occupied then
) I5 e. X& Z* p: N% G7 t part := @.cont;5 [2 L+ A2 Q) {- A
@.transpOrder := void;
1 f, J6 @9 m9 P. @2 L# f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ H6 N' i# N( W
@,root.eventcontroller.simTime);
1 F7 `' ]; i# g0 I/ w @.HasOrder := false;9 b! o" K+ N3 ~' t' O/ Z/ N8 A/ b
@.DrivingHome := true;
, u( m: |+ V9 ?/ a rgManager.tryToStartTransOrder;
8 K0 N$ R1 H% N9 E2 T7 C9 h. k6 t8 l if @.Destination = void# u; U' `, C2 B. Z2 b
then -- no transport order for vehicle @( R# D7 u/ h8 G* Y. r
@.Destination :=7 M% k; o3 c( ~, u
rgManager.nearestFreeStation(@,track.~);5 G* A/ ~0 J7 k' g+ f
newDirection(@);
, l& Y9 [0 j/ h/ W. D3 U3 ]2 R) I if @.Destination /= void then
" w% j7 @# Q4 D8 Q# f1 z @.Destination.NumReservation :=4 `# k8 M& r4 ]
@.Destination.NumReservation + 1;
" b2 ?% h- |5 L& K2 u+ | end;8 f8 \9 {& D' z
@.CurrIcon := "drivingHome";
% a& Y; q: }$ ~3 F( d7 q) A @.DrivingHome := true;$ T- ^ A& d0 r# a
end;
9 C9 Q O' n* j: G7 |; V* |& a else -- the vehicle @ is empty, both vehicle and part are in the same dock station" [: j" O7 m5 `4 K
part := @.transpOrder;
" }& o2 B# A# E part.move(@);-- load part) r! T* [/ i/ P, |) `, G: n0 t q0 O( ?
@.CurrIcon := "load";7 o9 E* q- K) y" X. J# X0 r$ t) E
GlobalDistObj := part.globDestination;. u% j1 P. w" r) q
assignLObj := rgmanager.rgAssignL;0 K6 }, H# t4 c; [" e: x
row := assignLObj.getRowNo(GlobalDistObj);
9 n* o" U# M* _ if Row = -1 then -- since 704 y$ @8 Z2 y' N2 Q# W
if lan=1 then
+ R% j% k5 L% K3 P* f; b5 R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. b; u# S8 I. Q! U8 @* G to_str("in der Andockstation: \"",?.~.name,"\""));/ |' t2 w1 s( A
else
! S9 c; w: c/ D% ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 p7 t# n2 M( g0 T to_str("in docking station: \"",?.~.name,"\""));
0 F9 p7 ^+ o4 Z/ U- f/ q end;
4 Q5 p) @' `" E+ z4 g7 X9 i else6 y; J( u$ P! o4 F: z/ o
@.Destination := assignLObj[1,row];( t# j0 n4 e" }" Y
end;
1 ]! g; l g) P) o9 g& T( _8 t newDirection(@);
j. k; T5 t# C @.HasOrder := true;. f! V$ k2 L; R7 v2 h
end;
/ d I( e4 J5 F end;8 W' D1 {$ \2 v: V
end; -- of the method8 A1 a" y/ Q* m
|