/* called by: entrance ctrl of the object 'track'! G7 U' e b J1 s |
*/( H6 w9 X* G/ _" ~9 g$ K
is
& Y/ m# C9 ^0 v# R5 b, i g part, GlobalDistObj, assignLObj:object;row,Lan:integer;! s1 {. w: o- b' [1 K
do% y9 r5 Y- X7 [8 l# u- [; S+ P; X
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 r# \) q2 t! Z' q, C if current = @.Destination -- else return, m+ d+ Q3 B! L
then
4 [/ E( m/ V& W) A; Y9 s! Y @.Destination := void;0 i6 A' m& E% h
if @.occupied then
" F# h4 m( B/ ^6 n, L' I2 N8 h part := @.cont;
0 S. G4 P" O5 z. `! ` @.transpOrder := void;
- d( N3 f! A- Q8 @4 l! n6 s- X% L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 C$ E( J1 f2 O5 R2 R0 G4 d! n6 D
@,root.eventcontroller.simTime);9 Z: |, m0 | q) t
@.HasOrder := false;
5 n' b8 M* B, c9 d* u" |/ } @.DrivingHome := true;" S$ b# i/ m8 H8 \3 p* \% c
rgManager.tryToStartTransOrder;6 ]5 l& `( t& j, ]& W6 R
if @.Destination = void }& q& F8 N( `; C+ S- F1 v0 L" p
then -- no transport order for vehicle @
0 f& Q* K# g6 ], b( B @.Destination :=1 D3 q* {, R+ X5 F
rgManager.nearestFreeStation(@,track.~);
# V% k, d& d" \/ h" {! k newDirection(@);
8 v3 e3 N3 V# e6 i6 @* `. j if @.Destination /= void then& F1 a& n& x; n
@.Destination.NumReservation :=4 g( f8 d( Z: S2 @) c
@.Destination.NumReservation + 1;3 P# P. G' R. B2 g& \
end;
0 m$ \) r$ A7 \ @.CurrIcon := "drivingHome";
/ O8 I6 i3 M3 c1 a, ^: q# F @.DrivingHome := true;0 Q: r2 k% u2 ^% I' l" l' H
end;
2 [2 e/ t# @$ j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 x* k5 k; p( L4 S part := @.transpOrder;. W3 O% a4 s p B2 p" q
part.move(@);-- load part+ k* Y1 i" t# i. x4 `& y
@.CurrIcon := "load";2 a* k6 G2 N) W M( X0 u
GlobalDistObj := part.globDestination;! ^# y; ^9 `5 h5 B
assignLObj := rgmanager.rgAssignL;
8 ~8 {" N* h( ]: J1 ^7 @0 L C7 {$ K row := assignLObj.getRowNo(GlobalDistObj);
! |2 p$ k& J3 ?+ ]$ P2 B if Row = -1 then -- since 70$ w& ] F; E' t! f( |2 ]' H
if lan=1 then
8 W7 q6 R/ `) S* G6 D5 i# k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 V$ |2 T7 @. ? to_str("in der Andockstation: \"",?.~.name,"\""));
) Z5 g! E0 Z7 c- i2 {& m else# @, B7 w* @- |2 A9 W" I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 H2 k; {- A+ L! @- | to_str("in docking station: \"",?.~.name,"\""));
7 M3 i' R2 |, I8 G2 O0 n" B. k$ |7 u end;
" g; ~. h* p: X. L) e else: I8 m+ J6 `" B+ e
@.Destination := assignLObj[1,row];
& H, i1 [, w% H8 l$ g8 d/ G8 k end;
# K8 v1 p+ J& F% A: ] newDirection(@);* y* J4 U, S7 V. X8 [
@.HasOrder := true;
& f, q8 S( Z3 n& i- T" I! K; T end;
' K0 z! ^* M# ]7 ^, w, @6 r end;
' l$ x0 W; [$ ], F5 o8 bend; -- of the method7 i/ p. q5 g$ P
|