/* called by: entrance ctrl of the object 'track'
1 `; w, V, S1 w( T9 V' k*/# o# Y; E; U/ M+ J4 M
is- d% ~& b( Y7 J& t! U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 z0 X# [1 W7 G5 Y' m5 v: u/ kdo0 D/ C0 i2 h4 R5 Q' F& T
Lan := rootfolder.Internal.Tools.AOLlanguage;
; p7 J B7 q' m8 X C if current = @.Destination -- else return
: U/ j9 a6 s3 p4 I4 ^" Y then
6 G/ y0 q! P. t0 i0 A3 i( h2 i: C) W+ P @.Destination := void;
0 b1 O# m: R* @3 n2 w if @.occupied then8 O! G. l, {3 P% ?3 [# Z" \# v7 \! W
part := @.cont;
" ]5 d' l: {" s' Z+ q @.transpOrder := void;) C/ q) }1 ?; M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 S Q( f* C& s' F4 Z @,root.eventcontroller.simTime);2 x" t7 d0 ` p& ~; J- l
@.HasOrder := false;* ~- S5 y. ?0 Y# G! `7 o& r
@.DrivingHome := true;
7 R2 |6 Z; K' i4 L) l* I: u rgManager.tryToStartTransOrder; }6 v6 r, }2 s8 n- J9 A
if @.Destination = void! S7 C4 M8 j3 a
then -- no transport order for vehicle @
0 w- `0 L- \/ P; c @.Destination :=
- s: l; W8 ?- i1 }3 G @ rgManager.nearestFreeStation(@,track.~);
0 ?9 i, G0 Z3 w3 F* s+ j newDirection(@); R; G& M1 w) `/ s% L
if @.Destination /= void then' h9 M1 N8 {2 M) e
@.Destination.NumReservation :=
/ B. W1 |( [/ J0 g; K @.Destination.NumReservation + 1;
. y4 M& Y* ]" S! h# I f end;! d+ {1 J9 L! P: I/ P: ?
@.CurrIcon := "drivingHome";
; N3 `0 j( C' ~* w, Q1 J @.DrivingHome := true;8 T5 D+ w3 }( n6 e6 _( s
end;
5 X( i; m+ l2 D4 ~- f t else -- the vehicle @ is empty, both vehicle and part are in the same dock station* t1 q* @/ @) K: h+ h
part := @.transpOrder;
$ z( ^, a+ O4 v1 L. d( ?- [# |$ V. e part.move(@);-- load part- E7 Q9 ^( s* e: w1 Q$ x- h2 H1 Q$ f
@.CurrIcon := "load"; ^- y6 K! {& U& x: x/ \/ A
GlobalDistObj := part.globDestination;
0 J# q5 Q- _; N3 I assignLObj := rgmanager.rgAssignL;
- F. L- }% E; J" j# k$ b row := assignLObj.getRowNo(GlobalDistObj);3 {+ l' V$ a0 d" {( ?- j
if Row = -1 then -- since 70
4 ]' T; j) X+ W: r3 | if lan=1 then
( B X( g( k; f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: n$ L% E% F3 R6 v3 u$ T# ? to_str("in der Andockstation: \"",?.~.name,"\""));
" B6 o! y+ Y: @& c: ^ else5 ^7 N' l" X# W) _+ o+ U* g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- I7 j( X' L) `' @# }
to_str("in docking station: \"",?.~.name,"\"")); 2 j$ A: W k2 b8 q0 |5 @: o4 X5 n
end;
2 Y5 b* J- s$ J- p7 y else; ^4 a0 @$ R6 B* _: ?7 |: a
@.Destination := assignLObj[1,row];$ [7 [" `4 w# S: R/ A8 n/ {9 M
end; % i( H3 V# T3 d, c% |
newDirection(@);5 y* y' @9 C1 z
@.HasOrder := true;
' h, F/ O9 I6 G" M( B6 y4 y. b end;# ?- r5 u8 C! |! y9 k6 s* o2 w$ E
end;
" x1 U1 A% f' A& Z) D) Qend; -- of the method( Y" m' X6 L0 |3 X2 B& s' ?
|