/* called by: entrance ctrl of the object 'track'+ {& S) Q+ c; e7 g2 ?5 m- V
*/
) Z7 q) p; i* @9 {4 U: nis6 f7 K1 |- F- F5 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: u# L9 p8 g/ ^& ]
do$ c; L- a6 [3 A a) ?+ I/ Q
Lan := rootfolder.Internal.Tools.AOLlanguage;+ l. C! l5 o# b | f
if current = @.Destination -- else return4 }* z. v0 |! {* t
then
' {# x2 L1 I f$ g @.Destination := void;
; R2 {( Q0 _ r; s) t& {+ M if @.occupied then
* Q* b4 K4 f1 Q2 |1 q/ O part := @.cont;, G+ @5 x- m8 J/ f
@.transpOrder := void;
8 a2 j+ s# [) _6 l/ T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" y" |- ~" i/ w, ^) y @,root.eventcontroller.simTime);
( V5 Y6 [7 L3 c8 p @.HasOrder := false;
7 s: K8 c0 Q% A @.DrivingHome := true;
. z& A8 g- u8 a1 q* P' X; [4 ] rgManager.tryToStartTransOrder;9 [) |! b2 _/ V+ y
if @.Destination = void
* H% J7 `* T$ I" m A/ B& m then -- no transport order for vehicle @
: U$ u& v; P; x& l7 m. r- u9 g+ w @.Destination :=
' A4 w7 Z/ k% y5 h rgManager.nearestFreeStation(@,track.~);
. E6 D( p- d% p* `9 d* L0 W newDirection(@);
7 c% w/ \+ ~) B3 j: M& y0 s+ a# X if @.Destination /= void then. J5 u* s8 i; t( \. V+ a
@.Destination.NumReservation :=
1 e7 C- O. q" D8 [ @.Destination.NumReservation + 1;
, S1 b3 A+ X8 p% _; G end;! R' j2 B' U+ U$ t
@.CurrIcon := "drivingHome";
h0 G! K3 s! r8 ~7 T0 J6 ^) T @.DrivingHome := true;
- Y$ h0 u; g2 T) k4 } s$ P9 V7 i end;( `7 r% [. p6 \8 |0 J @" ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 q5 h: a8 Q* S# J' R% G
part := @.transpOrder;
& j/ j' N: ^, [) j part.move(@);-- load part
2 ~& H) c4 [/ \/ L3 I @.CurrIcon := "load";/ Q d, z% o2 |
GlobalDistObj := part.globDestination;
8 s; U0 c5 d" }% B! }8 i- g assignLObj := rgmanager.rgAssignL;; ]. V( @. h8 F$ A8 R" G
row := assignLObj.getRowNo(GlobalDistObj);
/ f& W- ?1 }( j; {+ F if Row = -1 then -- since 70
! _0 K& t, z& D* W if lan=1 then7 |' [, M) O; Y8 v+ ^( K0 ]4 |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# U% \' m3 u; K+ L2 k1 h- h4 w H% E$ Y
to_str("in der Andockstation: \"",?.~.name,"\""));
H' S) [; O* k' X0 z/ X* J6 }0 c else
5 Q" K( }! ]) d2 J8 g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 z6 b9 j! ^$ g& t& V
to_str("in docking station: \"",?.~.name,"\"")); " e" e C% J Y K8 n* K
end;! ^( D, }" n3 `9 Y- J, Z4 X+ x, A' m
else/ ]0 y2 x" n. ]
@.Destination := assignLObj[1,row];' S% Y6 }/ H3 S/ k$ p4 ]% f
end; ! D7 T/ A" v p+ S" L2 H- u
newDirection(@);; c8 l& U+ ^, \. ?' a. b0 N
@.HasOrder := true;
/ l: H9 l( Q8 K' y- j; S- ` end;% c. V- ]5 ?4 ?) z6 A
end;' A8 H) d! t7 R, J1 C4 U" z
end; -- of the method
3 A& t4 B& O1 u1 k$ Z! X |