/* called by: entrance ctrl of the object 'track'
' t5 v, g7 J9 u1 A6 i/ C3 Z& e*/
+ |- Q) r: E0 Y% ~8 Qis
9 M: v# Z. K7 B8 M- w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: N6 L6 H/ n) k& ?4 cdo
2 s9 o/ V& O1 Q Lan := rootfolder.Internal.Tools.AOLlanguage;3 m+ X- ^4 o4 l U8 B n! ^( B
if current = @.Destination -- else return
. l- f/ F8 X! Q; {/ a% l. f7 r then. n a) B2 w. n0 P- r9 G
@.Destination := void;# A" E- {' ]! ]+ C. R, C5 D% |
if @.occupied then1 v2 Q5 D2 k$ |$ w9 p
part := @.cont;5 h* {- b ^2 i; d/ G" t/ n) Z
@.transpOrder := void;
6 S _# X' i: D9 z9 | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, e' Q$ w: M) h% S3 D% U: h9 m
@,root.eventcontroller.simTime);9 g. D) V! ^* U1 d
@.HasOrder := false;
4 S: k7 o3 P( z @.DrivingHome := true;/ _) u& F% u! t5 W) |+ N/ u
rgManager.tryToStartTransOrder;
/ x: n O5 R/ ~4 C6 D7 Y8 Y if @.Destination = void
& _+ W6 g: a0 `* f' ^% Y then -- no transport order for vehicle @
/ {' G1 m) T) I @.Destination :=4 g# F+ p! ?/ V/ F* f) d
rgManager.nearestFreeStation(@,track.~);3 C0 j1 x, B. o
newDirection(@); 3 L p" w8 E% D# k* h
if @.Destination /= void then$ e4 {' T9 H" z# @) L5 Q# ^
@.Destination.NumReservation :=
5 V& l4 H, Z- Z( k% ^" g% s @.Destination.NumReservation + 1;* F( M( p9 p/ ^; N* g* ^ j
end;
/ Z3 }( Z7 \2 A* G2 B @.CurrIcon := "drivingHome";
9 d3 s9 f$ `2 o6 Z+ _% W- w9 P% X @.DrivingHome := true;
6 c8 P6 {0 p9 F- D D) g end;8 ^5 o, z6 c# _9 P: w" }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' Y6 p1 k; b# v" p9 j part := @.transpOrder;* l4 ]1 P, t3 x6 J* A: ]
part.move(@);-- load part
2 T) L" F0 D, E2 Y2 `+ W @.CurrIcon := "load";- `, r' j7 i) ^1 `3 w# ^
GlobalDistObj := part.globDestination;
% o% t' p& b- R0 ?0 u0 t assignLObj := rgmanager.rgAssignL;) @& x9 a( ]% p0 @- n7 o
row := assignLObj.getRowNo(GlobalDistObj);% h6 x" Y0 N1 F; h- u6 G* T
if Row = -1 then -- since 70( ~* ^+ U+ I8 Q2 ]' m' @, |* x# n
if lan=1 then
' i6 v# x, q. ~. E i( o+ o: i# y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 k* k7 l r: _
to_str("in der Andockstation: \"",?.~.name,"\""));( {; S& X) a' [- Y- }
else h) n4 |: l' f2 S/ r, K q% n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* @% G$ Y; `4 ]2 Z ]. o# z to_str("in docking station: \"",?.~.name,"\""));
! i' [. X) Q( a9 X end;
& D* c% M: f* a* Y8 g8 v else
- F9 J. `6 S7 ]! [, J @.Destination := assignLObj[1,row];
t7 H- m, s; M4 ]+ O2 y! D/ U# ]1 ^ end; 7 U7 X9 q8 h. a8 y
newDirection(@);9 A9 b4 Z" x) ]5 U) G! g
@.HasOrder := true;" A( B9 L: R* H) A; Y) E$ b$ J2 V
end;' N) D* T( Z* B+ M
end;% I: x2 V: ^, r1 i
end; -- of the method# d, G2 s- R) s# t4 f
|