/* called by: entrance ctrl of the object 'track'$ V% Q6 \- q, r! S) F0 `4 B
*/
5 @6 I/ p( p6 _5 z4 n7 Yis
1 L( I# V( i+ N2 X% t7 a/ C! q% j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- z( x: h B% }1 {& Wdo( O Z* N7 S: z4 C% c$ z# h- n
Lan := rootfolder.Internal.Tools.AOLlanguage;& J9 k/ A! U0 ~
if current = @.Destination -- else return
. v. r- Q! R0 J( |' n6 E% [ then% \: {- w6 H1 j$ u2 Z
@.Destination := void;: o8 P4 H! s4 \1 k" ~
if @.occupied then% h7 R6 y2 b2 j
part := @.cont;
3 q( b0 x0 C7 Y9 [4 E @.transpOrder := void;
1 t/ b- r7 }2 m( a. C) p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 m) G. T0 }5 j! X( m8 P1 U0 J
@,root.eventcontroller.simTime);
' g* M8 G- r$ E2 a* x7 H @.HasOrder := false;: [' x1 N0 v# O$ E5 v
@.DrivingHome := true;( ~. u& ~% F8 q% L# {3 A
rgManager.tryToStartTransOrder;
. I& q% h p# ?( l; W7 a" {1 N# e) G if @.Destination = void
% h2 |+ K- N3 [5 f, f% h then -- no transport order for vehicle @, @) o/ s& d* P( R9 E1 f3 j' |
@.Destination :=& t+ X6 i" }9 q6 A( C+ |- Y) g( l
rgManager.nearestFreeStation(@,track.~);
. n; h% t% Y* f* H1 H! h newDirection(@);
& F8 |7 F7 O1 V if @.Destination /= void then
$ Q& E: I. N% J6 n3 e9 `8 H @.Destination.NumReservation :=1 y% ~" _7 z9 P0 B
@.Destination.NumReservation + 1;
9 L# ^# ?% X/ R! L5 Y end;7 p. [- S9 p: K$ ~; o1 p
@.CurrIcon := "drivingHome";0 r0 o3 X% @' o6 s* K- `% F- a# k
@.DrivingHome := true;" _5 ?/ ^. ? a2 H! q3 m
end;
2 w6 l5 U" d. K& s else -- the vehicle @ is empty, both vehicle and part are in the same dock station* A8 H. W$ H+ j+ { q
part := @.transpOrder;5 x; j# W' }: A" i+ D7 T: R+ d0 o
part.move(@);-- load part- ^" l" @- t5 w3 a4 Q
@.CurrIcon := "load";
$ Z5 o# ~( J3 H/ M1 `" L GlobalDistObj := part.globDestination;
6 j$ j" }& H9 m" z; q3 j6 L assignLObj := rgmanager.rgAssignL;' b0 R3 @" a) v7 i
row := assignLObj.getRowNo(GlobalDistObj);$ D$ P+ Z5 U* q( c7 n/ k# P
if Row = -1 then -- since 705 _$ h/ c7 |/ c/ H! s% ~
if lan=1 then' w5 g" C$ Z$ T% v) B j& i' O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% s& K! a0 T+ O. l0 ^0 G
to_str("in der Andockstation: \"",?.~.name,"\""));
2 w! R; L5 I- e! x: y! ] else
: o- U) y7 y, X; E, e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 T. p4 t1 A; F3 R
to_str("in docking station: \"",?.~.name,"\"")); ! m7 z- p9 R3 Z) h: b
end;( K+ `1 i+ a6 c0 |6 R b& {' @7 S& R
else* u& q# i& j0 n& e
@.Destination := assignLObj[1,row];( Z8 a: J7 o6 _7 b5 c* b3 g
end; 0 X1 o! ^1 G) L# X0 I/ K" b
newDirection(@);
0 P1 N5 v- ^( ?/ v @.HasOrder := true;/ e# q) d4 ?' g+ A
end;
, @/ k, t! K+ x0 e" q end;/ `9 L8 R3 x) D2 z
end; -- of the method X- x5 E3 `& Q. l U+ ?) G- K
|