/* called by: entrance ctrl of the object 'track'
! W# E2 [- u+ |+ O- I*/
% A e0 h' F8 C' `: zis/ J; O7 N$ e$ D: u6 j; K( |( c: O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 ^ o4 V. Q! p7 o7 hdo
# C0 k' Q) q7 E3 u Lan := rootfolder.Internal.Tools.AOLlanguage;
0 t) u7 g1 k- b$ k$ R$ r7 m if current = @.Destination -- else return& p* T0 T2 L0 y1 a
then2 G7 Q( h' `4 U* K0 B; ]
@.Destination := void;
* U H q- a& I; w0 }8 d$ ] if @.occupied then" w5 Z& r# Z- h! Q( N' `% u a
part := @.cont;. @, u( J/ F6 }# j$ P" e9 ]
@.transpOrder := void;" f( [2 I6 `6 r( p: J3 g$ {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 Y" D4 Z, V1 C @,root.eventcontroller.simTime);2 f- w& V" Y) ?% S; m
@.HasOrder := false;+ _% g8 j) e( I! |) T5 D1 j
@.DrivingHome := true;
( b) @1 s. A2 v4 G& @# A rgManager.tryToStartTransOrder;
% ?' v: G$ }; l- P$ U; E if @.Destination = void5 ~/ A9 e: ^* \( G* K
then -- no transport order for vehicle @) s* w* R9 i5 c
@.Destination :=8 o6 `) I9 `6 K$ n. W+ B; }' w' Q
rgManager.nearestFreeStation(@,track.~);; A/ ]3 R7 m& O: W+ I0 ]
newDirection(@); 6 V2 [7 [: ~$ k8 H$ ]3 h# r
if @.Destination /= void then
7 P9 y$ S% ]: G E @.Destination.NumReservation :=7 E# Z$ m* u; Z0 g6 ~
@.Destination.NumReservation + 1;
8 ^ r; H9 p1 ?( E$ a' z, P end;. _8 { J' Z! q/ {7 o4 _
@.CurrIcon := "drivingHome";0 P' x' k/ t- u
@.DrivingHome := true;" w: f7 ]) ^; P# X) Q' A; F
end;
9 k7 k3 E( q) B1 X7 @# M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ ~. H7 v B! \% {% G+ g part := @.transpOrder;
* F& D7 r1 q( ?) z2 a/ a part.move(@);-- load part
- [* b, i/ f& z- M @.CurrIcon := "load";
7 v: G1 T( X' {7 M3 h GlobalDistObj := part.globDestination;3 P$ j+ a6 h2 ~1 G2 s7 E+ R1 q
assignLObj := rgmanager.rgAssignL;
& O6 G7 N* {& E! N! d. R row := assignLObj.getRowNo(GlobalDistObj);+ q3 I1 i# N8 w! Z/ X% s2 P- [
if Row = -1 then -- since 70
" {! b- l' {: E( k. a4 m if lan=1 then4 i, w/ [2 e3 e7 h/ i3 ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: d+ G( w5 x" T' n4 b0 J# K" v7 `. s to_str("in der Andockstation: \"",?.~.name,"\""));2 l8 @: A5 J' u) s7 I8 z1 i! K
else
0 q0 Z! }2 w4 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! o# B" L4 ?" T
to_str("in docking station: \"",?.~.name,"\""));
* v2 G$ `! F1 y+ G! A end;6 u5 k: a2 Y) I
else6 M. y4 o" O% ]
@.Destination := assignLObj[1,row];* t* z; r7 V/ G; l6 q
end;
7 ^% [, d1 h' A( ?. a$ v newDirection(@);. Z4 y' N4 h, U( [" }1 I6 ]: p
@.HasOrder := true;
% Y6 n/ M- Y5 x; x1 B+ h5 b end;" I: `* N% C- q9 e1 n$ f: B
end;. @4 O; |4 T: @; ]- s
end; -- of the method/ ~1 b( f( i/ ?( L# E: C
|