/* called by: entrance ctrl of the object 'track'; i, x: b& N N3 B4 A D6 u
*/
5 q/ e* y# q4 u5 `0 Iis
' X# p5 {$ ~/ h6 i/ r8 ^& {7 a+ R6 x part, GlobalDistObj, assignLObj:object;row,Lan:integer;' E2 b. C6 u/ x$ j H
do2 Z' b) P: [: A; \' a6 o0 x% G
Lan := rootfolder.Internal.Tools.AOLlanguage;5 X- K8 S' q4 S6 _ D
if current = @.Destination -- else return
! `& D3 K) ]2 g. @ w. e8 K then1 ?9 s* e, B" e, B
@.Destination := void;
; K+ g2 r# B9 v# {7 K if @.occupied then
/ X& B9 ~ u ] P* Q! ^) q part := @.cont;( _. ?7 \( r0 ]" M
@.transpOrder := void;
+ {- M2 |# z$ j$ p" X5 ~) N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 j- c$ x1 q/ f) F
@,root.eventcontroller.simTime);
! n& n, ~/ y' b& X+ `$ ` @.HasOrder := false;5 k. y/ l% m4 h( i4 \$ L
@.DrivingHome := true; [* n5 ^ Z! R$ W/ k# i% f
rgManager.tryToStartTransOrder;
9 K/ Z p9 k6 `: @4 B' b' s4 t if @.Destination = void& e8 a, E+ y! G! J
then -- no transport order for vehicle @6 E( [$ t. q$ J; i4 z) O
@.Destination :=
2 W" G f$ J$ i0 Q+ I' p6 T rgManager.nearestFreeStation(@,track.~);+ `& c! ^5 x& W4 [( \% A
newDirection(@); ! c0 v, L2 ~/ j( F6 |
if @.Destination /= void then/ z- G8 U4 l7 B6 Y# J
@.Destination.NumReservation :=
3 L& m/ y$ ]% u% w z @.Destination.NumReservation + 1;
: p( U' ?1 Z; ~& j! l7 X end;
7 L* s( @# C5 `8 }8 ?: y0 q4 i @.CurrIcon := "drivingHome";' m5 _+ q$ q8 }4 r u
@.DrivingHome := true;! U# l$ W# x( Q7 Y- \: t R
end;
5 @4 c9 T* @, K& _! O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# r: f; K) Q# M+ `' S+ @ part := @.transpOrder;
) R/ Q* v3 S7 o, S" {5 e, e part.move(@);-- load part G, }& _ t) c
@.CurrIcon := "load";2 r( U8 j5 V, |) y% h
GlobalDistObj := part.globDestination;; C; R* i, u; m$ u; f
assignLObj := rgmanager.rgAssignL;9 T: C$ ]. L6 `
row := assignLObj.getRowNo(GlobalDistObj);! @- |! B/ q1 N
if Row = -1 then -- since 70
. s3 t! Y, e& |% h if lan=1 then0 `6 F, T* W1 Q( q( Z; g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# |& m4 f5 P/ Y0 y
to_str("in der Andockstation: \"",?.~.name,"\""));4 L6 h$ C9 [$ V$ j& z- r6 X4 A
else3 `& {- W: y9 f9 f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 c4 p- w @6 i& K) }* _( U
to_str("in docking station: \"",?.~.name,"\"")); 5 ^4 E" }6 v* p4 B
end;6 N* W; Y" `9 ~+ j F
else
5 T& M2 r7 s; C: V. x" P1 [9 i @.Destination := assignLObj[1,row];
1 C8 B; I; {# O7 V3 i, S/ o+ I9 w5 T end;
7 p- o* ] J0 ^, t newDirection(@);
5 A& @6 n( _4 {1 l* R# P2 m @.HasOrder := true;
0 Y3 C4 ?5 Z% A- z% B end;/ ^& s) \4 P( V9 a' e
end;; z. J/ J5 V9 Q% z7 `
end; -- of the method
; G, L6 e* W0 }( V: } R; l9 D |