/* called by: entrance ctrl of the object 'track'* f5 g8 g6 S# P3 @+ m: o
*/
- D% C$ H5 K, }% tis
: Z4 \$ e% ^! j: t5 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 B7 b& @" y2 P) ndo2 `; [+ d( r1 H! f$ z, l- s
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 ~) U# Y3 C! g$ u3 N if current = @.Destination -- else return
1 B; _# g* e* k5 `+ k' _& n then
F6 \, n+ e& a- E, E- b; Y: U @.Destination := void;
4 X; S* H; k5 N, X if @.occupied then( H0 K. g2 l ]! X& E/ z @- ~
part := @.cont;
# c/ S! l8 Y. ~3 e8 U2 ]3 y @.transpOrder := void;& L: o* y- X5 t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# q5 {; y V# [# v {
@,root.eventcontroller.simTime);3 \* w! E/ A) F' v
@.HasOrder := false;% n8 c8 H1 c) V4 s3 ^
@.DrivingHome := true;
' M4 n2 F! h" }/ l% ] rgManager.tryToStartTransOrder;
) x' ~% p7 s( B$ g# c' ~; g# [ if @.Destination = void
! H0 i5 a) r6 V4 r) g. t then -- no transport order for vehicle @
. H- ]; Q; m" a/ ` @.Destination :=- u( C. m# u; i
rgManager.nearestFreeStation(@,track.~);( G# Q- K: n6 t6 v3 `: Y" L4 L
newDirection(@); 8 c+ e$ ~' [) u- D$ u
if @.Destination /= void then4 D3 [/ o# a; G4 [. J5 c
@.Destination.NumReservation :=
9 e3 o1 r/ z/ e) X/ i& I @.Destination.NumReservation + 1;
7 w2 N2 `- C# E8 _* ?$ I end;4 h# q* H4 u; _. l* n2 \5 Y. }
@.CurrIcon := "drivingHome";# {8 Y) [" p4 C* g" y3 g1 V
@.DrivingHome := true;
: @, \( d" N2 I) a end;
a& p6 s! x6 h else -- the vehicle @ is empty, both vehicle and part are in the same dock station% B) x+ H6 |/ }! A( C
part := @.transpOrder;8 w, X3 E* [" B: u5 c+ m
part.move(@);-- load part
! R* j7 k r& r9 h5 J* W1 G9 B @.CurrIcon := "load";# u1 ^9 `9 ]# n+ K3 ~+ h) Q
GlobalDistObj := part.globDestination;
/ J e) o0 b; f4 q2 W% t" H assignLObj := rgmanager.rgAssignL;
2 O5 W3 }' \' m row := assignLObj.getRowNo(GlobalDistObj);' e5 ?; X, ^; D; I V5 ^2 W
if Row = -1 then -- since 70& B1 _5 }3 E+ A3 T: R p
if lan=1 then
* d" k/ ^' n* z, `: E7 K- K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ A9 x- S5 J9 M2 c2 r to_str("in der Andockstation: \"",?.~.name,"\""));
! K, @0 R8 v. h8 H" t6 a, r else
* M4 ]+ o& j3 o- Q4 `" r5 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: d3 W7 I6 S+ y( w- v r7 n- ` to_str("in docking station: \"",?.~.name,"\"")); 4 [0 Y" o+ L7 t6 G+ A4 y) J( O
end;# a( \" d7 C* p( D4 B6 S6 i# m" ~+ _
else8 A" W: Q3 |8 z$ c+ Q6 o9 s/ Z5 f
@.Destination := assignLObj[1,row];
" g3 H7 W9 x) T" \# n7 v' S end;
: q. n3 ^1 p0 ?) h$ k newDirection(@); b5 ^1 j, E% _4 n0 _
@.HasOrder := true;3 h# Q2 b: N/ J, Y4 V
end;* C0 Q1 ?* |7 u7 M$ z8 c2 C
end;
0 e- q5 ?! Y+ ~1 ]; [end; -- of the method% B& m5 Z7 X( q
|