/* called by: entrance ctrl of the object 'track'
5 R# Y' n, d, x: s4 i*/
4 x3 j' c* |% S5 [1 l# r: Sis9 Y. x8 ^& ?" L, p* ^4 O Q' a4 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' x' J1 X. W! N0 R( s2 W
do! M- }* B1 |; h( t4 e2 y. N1 T5 O
Lan := rootfolder.Internal.Tools.AOLlanguage;$ r. s9 E) ^- f# j9 R, I
if current = @.Destination -- else return( R6 P/ s) B/ K$ k6 o
then
; @, l' }/ L! s @.Destination := void;
- R& B% W$ M9 D# r if @.occupied then
0 V. _; E, p- p9 { part := @.cont;
+ K! S3 }! [' w" R @.transpOrder := void;
& x) u: h+ l! c; ^# I: h- P* U* V- @! { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 F1 l$ z* ]7 H8 h4 b# g) K2 y8 ^ @,root.eventcontroller.simTime); i& T- A! |/ O& M3 @8 h
@.HasOrder := false;' U' w/ M; h8 S2 D+ c3 \
@.DrivingHome := true;+ m6 o; R$ [* _7 a1 u; D C) ^
rgManager.tryToStartTransOrder;
; o( _1 \2 \) n/ I if @.Destination = void
9 Y; v, ^% L& h4 ^ then -- no transport order for vehicle @
& Q* w& y, T& C5 w8 C5 Y @.Destination :=/ K! A( G9 P, ^6 {1 c1 B1 c
rgManager.nearestFreeStation(@,track.~); [& G' m. E# X3 {1 ~- f
newDirection(@); * ^2 x& G9 u8 S" w: X3 W7 k
if @.Destination /= void then: H! f( [% q2 S$ e! W% ^7 N
@.Destination.NumReservation :=2 P# I& Q% w" I) s6 g3 s
@.Destination.NumReservation + 1;* ~( E5 q& L; d' Y, Z4 G
end;9 ]1 Q. E! j$ F' {) `. C8 C
@.CurrIcon := "drivingHome";3 _3 H. u! [1 r% s( d
@.DrivingHome := true;. `/ I5 [# s8 K h
end;
2 Q/ T; i I% q; a* V$ @8 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 j* s9 [: C) L3 x" t
part := @.transpOrder; x6 ^1 j( Z( d, H8 e
part.move(@);-- load part
8 _7 v" u+ {. J2 l5 m' F @.CurrIcon := "load";& E; s+ ?' g3 C6 e$ x
GlobalDistObj := part.globDestination;
7 v: P& B- n- ^2 l) {3 ? assignLObj := rgmanager.rgAssignL;3 O" u( s6 ? N( R' n3 U; }
row := assignLObj.getRowNo(GlobalDistObj);: y/ }/ Z& D6 s; i
if Row = -1 then -- since 70
. `! z( v- _& F! B9 e# L1 u# K if lan=1 then
4 f! s- ]7 ~+ t4 o8 y1 r5 V* T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) t) e4 X- r/ e4 j5 F to_str("in der Andockstation: \"",?.~.name,"\""));
( n6 N3 G. [0 d4 I! p8 j8 {9 G: C4 ^& f1 u else. v' g9 d* v0 G# W" ?9 V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* C6 x. l& D4 i5 ~# Q& _+ V0 @
to_str("in docking station: \"",?.~.name,"\""));
4 y% v! I) ]% i9 l; T$ n7 k end;% D+ {, U3 m O. K. a6 ^
else
# K6 t, F7 X& E0 t# c @.Destination := assignLObj[1,row];# l1 q* e& \& ^
end;
$ D2 J+ Z4 `0 W$ A: M" P5 B3 P newDirection(@);6 M+ K! B; f3 q$ C' @8 @0 L5 T" _ W
@.HasOrder := true;! x6 V* z! n/ ^; {. A" x2 N* K. V
end;
: r9 i, K' N/ q. _0 j5 y end;
) F1 Z( ^- S& lend; -- of the method) Q7 x4 A% t$ `2 |. \" h3 |
|