/* called by: entrance ctrl of the object 'track'% l( C; e3 O( V( M3 N- s
*/' c7 R, C9 D* ~1 g5 y5 |! b: I4 Y
is# L% D, b F; B, K" k0 I% i+ d8 j0 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 e. h( H" s& e, _do; N" w/ b; F6 N5 l1 }
Lan := rootfolder.Internal.Tools.AOLlanguage;* P0 A: @# N1 u' E
if current = @.Destination -- else return2 p) a' z5 H5 ]# p
then
$ W/ @" [$ L" H @.Destination := void;
$ e% k8 k# F+ v. n- m if @.occupied then
$ M2 X2 [/ F3 f' T6 m5 B part := @.cont;
4 G, ]9 |( g$ t& t! q2 w, ]9 w @.transpOrder := void;" ^- u8 `: }! p! R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 Y) t' P& D# w. _9 R p! H
@,root.eventcontroller.simTime);' e2 E8 |& D: D2 A! Z# f, N
@.HasOrder := false;' d5 R T/ A7 Q& ]. z1 H9 D# H
@.DrivingHome := true;
4 ^+ b& `" V6 @; t$ S rgManager.tryToStartTransOrder;
* X z A E) W4 Y$ z if @.Destination = void; x b q/ z; e/ z8 O! r
then -- no transport order for vehicle @* Y0 K8 v5 D: ~. m/ m- O1 {. a! r
@.Destination :=
! p+ b# _* P" W/ v% w/ X rgManager.nearestFreeStation(@,track.~);
, h1 b* B! \+ C newDirection(@); 6 O( r) V' i$ P0 ~
if @.Destination /= void then* f# n* D6 s# t
@.Destination.NumReservation :=
' V4 _( `* ~. \! { @.Destination.NumReservation + 1;
4 u% u) A0 w9 z$ d0 V$ {8 N; C end;
a* G6 b& v# h4 C @.CurrIcon := "drivingHome";
3 K4 ^7 x0 b h( [ @.DrivingHome := true;; w7 d' q2 W' W9 M
end;) C+ D& j' Q4 ]/ G0 r3 _- r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! {3 i, j/ R0 W/ w# j part := @.transpOrder;
% R! B% w/ y2 ^7 Q# Z part.move(@);-- load part! }. E5 [( K" N& N
@.CurrIcon := "load";
\! G" P0 V# k1 j+ z# K GlobalDistObj := part.globDestination;! |- w4 u. ~6 }4 q
assignLObj := rgmanager.rgAssignL;
8 j, s8 M( r& R1 {4 c6 F5 ^3 h row := assignLObj.getRowNo(GlobalDistObj);
+ I# s# R4 A6 Q* v: p9 |/ Y if Row = -1 then -- since 70
/ V5 Q% a* E# L& \0 i- S if lan=1 then
/ p2 q. b# w r" C) m4 I+ F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. K# z( _7 G5 z" e
to_str("in der Andockstation: \"",?.~.name,"\""));
( y1 q( o# c8 R7 Y0 ^6 c) I6 J else
8 L* n3 k; e# C! E8 ?7 g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 v d0 j4 A" s: `/ b' n; @
to_str("in docking station: \"",?.~.name,"\"")); . Y5 s/ O7 s7 k; v: x4 l
end;
Y( h! ?6 X9 N' x else0 ?$ t: K9 I7 e7 I) U! m* @! q
@.Destination := assignLObj[1,row];! D% I4 e& ^5 \8 |/ u1 q/ M
end; , Z0 n# {2 V" o | q
newDirection(@);
* @5 q1 b" G4 u4 E; v @.HasOrder := true;! E8 Q! t, H1 @, g; m& y) W
end;, f1 K# f9 h* p7 d! d* e: b
end;$ G5 [" y: z B2 ~ y1 ]# U$ P5 \ ^
end; -- of the method5 U; ~; G5 K: [' n) B
|