/* called by: entrance ctrl of the object 'track'' L: |1 d2 |7 q
*/
\ t D5 x' Vis
( u6 C' I% e/ u5 Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ]9 O4 o# |4 f
do
2 X, V* J! A9 z0 X% s6 F Lan := rootfolder.Internal.Tools.AOLlanguage;
/ q' Z' i( N: T( W- r& W+ g5 }, M& q if current = @.Destination -- else return
2 t+ X% Y" P0 }) @; H4 F then( \% q$ s. D; ~) U' k7 \" N* w& f; R
@.Destination := void;/ ^ U4 I" A/ G/ U
if @.occupied then% V6 t/ E" b/ S" ^6 c
part := @.cont; B- b/ ~6 [4 }6 |! K" Q: r9 V2 [
@.transpOrder := void;( [) z4 q5 O& C0 ^, X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* w; a3 `; x' z8 ^' H% b5 C @,root.eventcontroller.simTime);$ E J- F3 j( H" d0 q% ]
@.HasOrder := false;9 ]+ D6 M% s: b- v
@.DrivingHome := true;
# O7 c9 r" H4 K" E& F$ Y rgManager.tryToStartTransOrder;
: f3 r% c/ T; p; t if @.Destination = void
- B* ~- V# a+ Y* B then -- no transport order for vehicle @
- N4 {" C Z0 s7 s' J# [4 q( R @.Destination := T3 v: ~* ~9 M
rgManager.nearestFreeStation(@,track.~);
* }0 ?' i* W1 {' C, G% S" h newDirection(@); 3 P4 a0 j- H6 t& G
if @.Destination /= void then7 b c$ `0 K/ A
@.Destination.NumReservation :=
- t4 ^5 _+ b9 |* U0 c2 ? @.Destination.NumReservation + 1;1 t: O: B( s2 a
end;/ Q% C! J7 ?2 C3 ~) M
@.CurrIcon := "drivingHome";/ _2 ]+ H" b; [ B# C, p4 |
@.DrivingHome := true;' Z% [( @7 a7 X4 @. S$ r; @/ }
end;2 h, i6 W4 h) Z0 W& N8 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- c( p8 D4 ^2 V3 O0 h- T+ A part := @.transpOrder;
6 Q& }9 r+ I$ Z, K) ?0 k" V5 ^2 b" g part.move(@);-- load part
/ `4 J# S* W+ q% B; i) r @.CurrIcon := "load";4 L3 u1 S. b4 b
GlobalDistObj := part.globDestination;& |! ?* e: T* J
assignLObj := rgmanager.rgAssignL;
, J' w# h: i3 a row := assignLObj.getRowNo(GlobalDistObj);
( o/ L+ {8 T! w7 b7 P8 Y; { if Row = -1 then -- since 70
0 k' {! L& H* y0 c$ Z, l if lan=1 then
0 |" g3 u9 B. r) N( |1 }& ~9 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! T! m% W, [( O+ I! [9 ~" H to_str("in der Andockstation: \"",?.~.name,"\""));
; K% s% V4 S) O' J" R. Q4 y$ D else+ N3 [! H* d9 I2 j4 n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," b+ H9 A7 a% j1 o2 R4 \
to_str("in docking station: \"",?.~.name,"\"")); , j( S* Y& t' G) [
end;
9 d* w7 i" N) [3 f( f else
; V3 Q, b3 o1 @( n, h @.Destination := assignLObj[1,row];
' \, o2 i' L( z; \: u end; 9 [3 w( u0 c$ @; c4 a9 J: j& i" r8 X
newDirection(@);) D/ t$ R: U7 b- ~7 ]
@.HasOrder := true;2 |' b: u" j! L
end;( ^+ l8 l0 I. l* @ M' N
end;
- ~! s+ B* ~+ Xend; -- of the method7 v* b, L# H+ R
|