/* called by: entrance ctrl of the object 'track'
- [8 y' i' Z) y# i! \- M7 V8 [*/
9 k$ D; _0 X9 J: ^ @( L! Tis
5 t# M7 Y, i3 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
}5 ~3 g# C( X. d8 `do0 z/ D9 }+ O* f8 Z8 z' `+ l5 z
Lan := rootfolder.Internal.Tools.AOLlanguage;& e$ m% p! z$ r( p7 `+ g
if current = @.Destination -- else return
, r; M) X# J% L" r, u9 \ then! g2 h) Z2 F7 c* v- G0 d& {7 P' G
@.Destination := void;( H# {: b3 \$ ]- ?9 F
if @.occupied then
O9 E! w- c! y part := @.cont;; ]+ O' b. d/ h0 d7 ~+ o
@.transpOrder := void;' ^6 P: |3 ^$ K/ S! R, Q2 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. c6 W$ R2 D2 |
@,root.eventcontroller.simTime);; ^9 t# L4 v) P8 L! D% f/ F
@.HasOrder := false;
, [# t* @+ Y" r9 m @.DrivingHome := true;2 A# |* J' H) ^# v& K M7 e
rgManager.tryToStartTransOrder;0 J: c# N8 i2 U1 H+ ?1 c' R. T
if @.Destination = void
, F C5 y) s0 @4 }. G then -- no transport order for vehicle @
. A6 A& u. c/ R7 I- L; Y @.Destination :=: K5 ]& u7 h# U0 ?
rgManager.nearestFreeStation(@,track.~);
& [1 s( t/ ^% i2 K+ J newDirection(@); 8 u, o5 ]5 [9 f, ?3 b6 v
if @.Destination /= void then
* N+ [$ Y% j/ P( i7 L& ^ @.Destination.NumReservation :=& H, P- K$ { I
@.Destination.NumReservation + 1;( j$ F! g( D1 {2 I2 `9 A6 [3 m8 T
end;
4 D ]! v2 M R* c. k5 R @.CurrIcon := "drivingHome";3 c# J8 X5 |# r2 B( o7 B8 Q5 A6 c, z" q
@.DrivingHome := true;
2 n* t; X0 O/ k+ Z% p) P end;; s, o# G9 K. K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 i3 {3 I! a, f: ~/ T* r& p part := @.transpOrder;
4 k$ X6 Z& H7 e! q part.move(@);-- load part
5 ~* w+ n! Y+ k5 F: s! p @.CurrIcon := "load";
' F, ?* Q# B; c; }6 |0 n0 \1 b/ i GlobalDistObj := part.globDestination;
. ]$ N r7 o, Y$ i* [0 n assignLObj := rgmanager.rgAssignL;$ l0 X' v- p4 S+ p
row := assignLObj.getRowNo(GlobalDistObj);. w, W/ ^& ]4 l8 o7 {, k, @0 s$ y
if Row = -1 then -- since 70
1 j4 S" K; R" w if lan=1 then
. i- o. I4 p1 W8 B6 Y4 N$ n+ c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: C: w n9 Z- o' T, L9 T; c9 l to_str("in der Andockstation: \"",?.~.name,"\""));$ N, N& M0 y9 G/ v
else
8 B; J& x, H5 h, |, `+ |% [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 z% V$ [# V+ r. v. g4 s" G) p! t to_str("in docking station: \"",?.~.name,"\"")); 6 \9 _) ^+ z0 b* ~ @
end;% Y( c- [# v5 `& H
else
. U N3 i& w! N9 j- |5 m b @.Destination := assignLObj[1,row];
/ g/ Z3 T! o8 H/ Y! O9 _/ d9 q end;
: R* j3 h, H& y newDirection(@);" A) L2 v4 Q: g9 x! A. ~
@.HasOrder := true;9 J9 J9 V/ p+ y% o0 X2 J; x
end;1 b4 e5 [. Y7 G) D" r
end;& v- s1 U1 O* t0 r! ~ R
end; -- of the method
. s# i- T* X. a" g1 m4 A% m' x |