/* called by: entrance ctrl of the object 'track'3 u5 {: V" U% f8 k
*/: T) Z$ a# L7 q, g' P* D" O' V
is
# Y5 {1 s/ b8 o3 x. x! V part, GlobalDistObj, assignLObj:object;row,Lan:integer;) {5 Z3 { K) z6 `) B- F4 ?
do
' N8 I7 F2 ?) }; M5 r8 W Lan := rootfolder.Internal.Tools.AOLlanguage;, v8 t9 t3 B# O7 s* I, v$ C
if current = @.Destination -- else return
' G% k9 o% {- o$ G- ~ then& X* X' a6 c2 ^) q
@.Destination := void;
4 A$ r" K2 v- r5 [' A6 a* Y8 j if @.occupied then0 d/ q: k. i( g
part := @.cont;
: ~0 Q3 \) t* {' N5 ? @.transpOrder := void;
) ~ ?8 X, v1 n- W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 x" G0 Q) G9 K6 M
@,root.eventcontroller.simTime);
# \% M9 y3 W0 |: ?% l @.HasOrder := false;
; m8 P" i3 G# s$ N6 y. l$ e1 o @.DrivingHome := true;5 U. I, x9 `8 o
rgManager.tryToStartTransOrder;+ Z( t- j# T8 j$ n$ N6 Y
if @.Destination = void
3 o8 v: Q% \, h( u4 C9 j then -- no transport order for vehicle @
- }& d( A' [1 e! p; R/ { @.Destination :=3 n! y2 k7 D* [, @7 \+ C2 L
rgManager.nearestFreeStation(@,track.~);; l4 T$ V) C8 i) J7 k/ s7 S- F( |
newDirection(@); % }3 P: U2 S: F9 A/ t
if @.Destination /= void then; k' D# Z9 D2 T& v" s
@.Destination.NumReservation :=
' z `9 T7 m7 ?3 Z" x' J @.Destination.NumReservation + 1;5 l/ i; d+ y2 A4 |. L
end;
4 M' L9 R* h& E* C' n1 Y @.CurrIcon := "drivingHome";- ~ w2 A- S+ p
@.DrivingHome := true;
% v/ n$ V' z/ k2 t" J7 z, q% [: F end;
* W6 ] Z9 D$ i4 A& \" X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; W! V9 z9 ?$ S& T$ S: q part := @.transpOrder;
) s: \& ]$ T9 q9 |: j part.move(@);-- load part
- h+ n. C6 W: [! H0 t+ n! {+ Z @.CurrIcon := "load";: J' X5 f( s& R& L. \
GlobalDistObj := part.globDestination;4 o) ~" I! S8 f& _" t( V! s" h
assignLObj := rgmanager.rgAssignL;
" V% \* w( n3 c' W9 b: t7 N row := assignLObj.getRowNo(GlobalDistObj);
( ~1 ?8 N! J) _ if Row = -1 then -- since 70
& M2 ^& j5 E( J9 n- N3 \; z if lan=1 then
: B0 H* l" W6 a: H/ {7 I( i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 L+ O: f& C) \4 O
to_str("in der Andockstation: \"",?.~.name,"\""));
3 E, [2 O6 D3 O9 w+ O else e" l# q0 u' ?& d+ s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 Y2 k. A& z' w$ T* F
to_str("in docking station: \"",?.~.name,"\""));
; D9 U1 k q l# Z end;
) F% ]% ]: V& | else) s) T6 g; H* x+ v# h
@.Destination := assignLObj[1,row];
" }" a* |4 O7 t end; . {; u l/ R3 Y( \
newDirection(@);6 ^, \% B( I7 q; g S3 l9 r+ N
@.HasOrder := true;6 e$ e! H) B5 g' ~/ ]# c4 Z
end;
1 S6 a3 {- M+ U1 Y/ j end;
$ ^6 A7 y4 }# R' ]end; -- of the method1 j3 F. _. e/ v) o; b
|