/* called by: entrance ctrl of the object 'track'+ P8 V$ x2 Z8 Z% I5 }( q* F' L
*/
2 C ]5 K" W0 [) s5 S: sis
" T' ` O4 G; f" i9 {2 ^# V$ E part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' h( N: K: R4 J. n* Pdo$ _0 A4 h4 ]; `0 h& l( k
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 R% H' b! k5 L1 z# b if current = @.Destination -- else return
. H6 j8 s+ m0 I$ [9 z' i- B then
3 q( K( C. Q8 X- u; x @.Destination := void;
$ `! R3 h7 I$ u0 X) F' n% o* M6 M if @.occupied then$ [# [# K$ J( J& r- A
part := @.cont;
. Y3 [. ]$ w: R8 B3 G/ Z6 Q @.transpOrder := void;
* f, J9 ] c! R( M/ _8 ^- S" p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" U1 U+ F* t! F# z6 B$ }, X @,root.eventcontroller.simTime);2 N6 X7 x6 a$ }/ z. h# P
@.HasOrder := false;
( F$ `/ v1 G& y: x7 Q- z @.DrivingHome := true;& { m% Z& u( F" I
rgManager.tryToStartTransOrder;/ W8 c2 r- }$ E, ~" @& m0 i
if @.Destination = void, S# }, F* {9 x) k- P
then -- no transport order for vehicle @
& R2 A$ J* C7 T2 U @.Destination :=1 t6 @* K/ y8 ^% M$ n" L7 M, L
rgManager.nearestFreeStation(@,track.~);
3 B. e) S/ c5 ] {- ] newDirection(@); " }) Y$ z5 N0 t7 i" h/ z) ^
if @.Destination /= void then( y4 X3 [. T/ U% ]$ }2 g- H1 b
@.Destination.NumReservation :=
; q" K6 Y4 p. r# } @.Destination.NumReservation + 1;, I/ `+ s) l) @$ ?: D) w N
end;2 Y; G( ^$ v( g0 f
@.CurrIcon := "drivingHome";
9 a# @6 G/ y6 Z/ @! ^# k @.DrivingHome := true;+ b7 R, `! U% |1 C! h
end;2 }1 N. B. h% i* c, H k1 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& f4 a+ l y) E2 \$ L7 n part := @.transpOrder;
# ?1 H6 _$ C3 F, D c" S part.move(@);-- load part2 y! B) [8 V J7 c0 l' r
@.CurrIcon := "load";0 Y+ [3 w! E6 i: e
GlobalDistObj := part.globDestination;
2 h8 }0 i1 k% U2 L" ?5 }9 h# {, g assignLObj := rgmanager.rgAssignL;/ }& B" Z- n. g- ^! ?
row := assignLObj.getRowNo(GlobalDistObj);
' @) f: |3 G( u1 E if Row = -1 then -- since 70
2 Q+ s! }; O7 ^* b" Z ]6 Q* C, Q if lan=1 then" `2 M. g8 G1 {0 M& L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 r2 j, S' \" G7 ^4 y" j0 n& d
to_str("in der Andockstation: \"",?.~.name,"\""));
% o, k: s8 W# A0 @2 I* p% t% m) \/ m else9 z0 J. W2 q( M+ ~4 f6 A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 v1 m) T) U3 m7 ~( l; O6 ?# R to_str("in docking station: \"",?.~.name,"\""));
2 m0 p( s' [: j+ X end;
3 i- ~4 u% I# P% ]3 ? else ]& e5 Z# R9 x5 R
@.Destination := assignLObj[1,row];6 g4 ]' h4 m5 C4 g' i
end;
9 p3 T9 V* `, _$ ~8 m$ \ newDirection(@);
! K/ G5 A5 n# w1 t6 v. @ @.HasOrder := true;
. r. m* o1 {. z( C! c& m" g end;
* N( ~1 ~' v& C6 ^) N& V5 U7 o end;' Z" v( z6 j) b" B( I* x
end; -- of the method1 R" Y" K0 w* ~* C4 o' s- V& y; u1 X# J
|