/* called by: entrance ctrl of the object 'track'9 c( J! k5 a4 L9 k5 k! p
*/9 b# Q1 [7 |5 W! W1 o0 s8 a
is
! U/ ^) F! b4 R4 p5 c- W$ H' j part, GlobalDistObj, assignLObj:object;row,Lan:integer;& i- S" w4 m9 t5 R& @5 D6 l9 q
do! Q7 ~: _! n7 T
Lan := rootfolder.Internal.Tools.AOLlanguage;
! h& F+ i9 G# j if current = @.Destination -- else return
" K# J, ? a5 t2 S then5 N+ A' Y6 m# }0 \2 n9 S
@.Destination := void;7 c S: p; f' a
if @.occupied then
8 j/ n7 h6 I1 { U- ^ part := @.cont;
, e0 H0 E" c( _/ V! s. j @.transpOrder := void;; D3 G% @& r5 {& K1 u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; n/ y) u2 D7 n6 w+ G @,root.eventcontroller.simTime);" d" X X8 ]6 F, P# |# ^
@.HasOrder := false;" e G5 ] K' Z* V0 {
@.DrivingHome := true;4 r# e/ i: N( x$ E- w+ J+ e
rgManager.tryToStartTransOrder;' e/ {! B3 \9 r1 q
if @.Destination = void* V# e$ A& n1 m' E$ i" }
then -- no transport order for vehicle @% T) W5 k# y7 @. Z# \4 u3 Y2 h
@.Destination :=9 j" `* F, _7 a
rgManager.nearestFreeStation(@,track.~);
1 }$ x4 A6 ~& m# Y newDirection(@); ; z# R, C! C- w7 P: n% M6 U
if @.Destination /= void then
" F* a4 K% \& x: a% {8 R& b# p @.Destination.NumReservation :=
, h) y* w2 @: ?3 h4 D# g7 T$ G k @.Destination.NumReservation + 1;) v0 I$ I0 q7 b9 ?
end;
; ?' R; y! q @& B$ b @.CurrIcon := "drivingHome";
e+ u) c( s8 @4 j3 L: ^9 K @.DrivingHome := true;
* u1 f/ F) Q, Y end;
3 W+ X Y# W, N1 d) t9 K else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 f8 ~+ E Z8 }8 S* q4 j+ `
part := @.transpOrder;
- U* ^3 J4 X" N% e# f Q' C part.move(@);-- load part+ ]0 g3 c1 e' [% R% t
@.CurrIcon := "load";
1 o1 U0 b/ P! i$ \# T: Y# ^1 l6 ] GlobalDistObj := part.globDestination;( m/ |& P' s" S$ S
assignLObj := rgmanager.rgAssignL;
+ D: o! A8 s! V9 U! j) P7 L row := assignLObj.getRowNo(GlobalDistObj);
8 m) P9 H5 B; Y+ G0 s' G if Row = -1 then -- since 70
) Y8 m- }- L E. p* T# [- J if lan=1 then
: F9 m% v1 Q7 q8 ]4 V; q" V" K% S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 S& S- W3 R% q! o: t$ U# r6 [; t to_str("in der Andockstation: \"",?.~.name,"\""));
: D; X: ?# J, I- ~( s else( T8 V- \% ]( d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; p! o; t+ O, H+ H
to_str("in docking station: \"",?.~.name,"\""));
3 Z9 I) i K% E+ {+ k1 T' |) o end;
+ O S' j) z) j% I else
1 N0 K* A) z* m" B+ X' s% \ @.Destination := assignLObj[1,row];( j" q% J2 D* h6 _$ j7 H) q# p; r
end;
; s, B J/ M4 W* R newDirection(@);
! f5 G* v0 d! D% t/ y# B h* ?: i @.HasOrder := true;
: J% k' j! |6 z$ r- @ end;6 S. a$ |/ `$ t% H5 D; G
end;
1 A9 h% ^" T: Uend; -- of the method
8 A3 Z! {% E9 B- \& G1 p! c" @6 _1 a |