/* called by: entrance ctrl of the object 'track'
+ m0 B8 d) n" u5 U( n' z# D*/
$ C. s* o( U& P; e* lis
! O4 ^; Z3 Z2 k9 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;: J$ r9 R j4 w' k
do1 ~% E1 |5 G0 n" j
Lan := rootfolder.Internal.Tools.AOLlanguage;1 ~' J& {1 d5 D$ w! { r7 C
if current = @.Destination -- else return" |$ N+ p! f ~
then. X; r( F# V, P0 S
@.Destination := void;
7 i) I- Y# O, k" f: v& \* l if @.occupied then& N! u, x( q% T z4 I
part := @.cont;
3 A$ h( w* S1 W# d. W3 Q' V0 p8 p: p @.transpOrder := void;
- l/ k2 p7 J' m2 A' ?2 x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- Q6 o+ v4 Q+ {5 V* @+ e @,root.eventcontroller.simTime);1 @* A! O {( x. F4 E# }( v* v" X
@.HasOrder := false;# x2 e/ D# I( r
@.DrivingHome := true;' w+ p# d8 ?# {7 j; A; p
rgManager.tryToStartTransOrder;
: f* x7 h% v: G! }* h* c if @.Destination = void: W) z- T; \/ W# G- R( r( H3 i. d, p E
then -- no transport order for vehicle @9 w# t9 A' j2 }+ e
@.Destination := }0 @5 R# l2 z- a' o# Z6 M
rgManager.nearestFreeStation(@,track.~);1 J! g/ ~' ]8 [7 a
newDirection(@);
$ }* S/ ~0 X2 z. d if @.Destination /= void then
9 i+ A5 o2 z# I+ ^ @.Destination.NumReservation :=
4 \- m- k$ [ @: o @.Destination.NumReservation + 1;
" r/ A6 K5 a- c! J end;# O( ]! `* U1 D) r4 i5 Q7 H& X. X) D; f
@.CurrIcon := "drivingHome";
* f- ^2 d9 M# }5 V H& V @.DrivingHome := true;- T) L" e, \ ] O; B# I/ j) t
end;
3 ?1 s, m9 [8 u- W else -- the vehicle @ is empty, both vehicle and part are in the same dock station* w: |* e$ l2 D0 F2 N! M4 A& t: c
part := @.transpOrder;6 W# [7 V, F R3 X1 u R
part.move(@);-- load part% e2 x3 z( D$ e2 v# z, z
@.CurrIcon := "load";6 c5 M F, `- ~0 a4 B7 n3 P
GlobalDistObj := part.globDestination;
% y" t( ?, a) g' S7 F assignLObj := rgmanager.rgAssignL;
1 ?4 ?4 M' s* W row := assignLObj.getRowNo(GlobalDistObj);) o1 w1 E# I! d" L- X8 |
if Row = -1 then -- since 70
% p9 q3 D1 c! M' q if lan=1 then
+ }+ Y* ?* \; g w E* S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# `; L5 @& O ^6 \, X! i to_str("in der Andockstation: \"",?.~.name,"\""));
: x, a2 y; x6 D. ^ else
! d. T. r& H0 U% [* D& I {" i) B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: M- s5 J) b# `1 v' d* h6 [ to_str("in docking station: \"",?.~.name,"\""));
6 {+ b8 s( j& l' e2 p2 V1 j end;
+ _* H5 l! S- B% N% k" s0 }0 k else
6 P1 v8 m+ r3 l1 s4 F$ ]' X/ ?3 o @.Destination := assignLObj[1,row];! K2 j2 `& h7 s+ E1 x2 Q4 F q
end; 5 D; [8 L3 o* i
newDirection(@);1 Q, R. M6 n$ Q# Y" A* M
@.HasOrder := true;
3 M( K9 O% K D! Y4 D- X end;# F1 Q# f' ^2 e$ g& Z) \- b8 i
end;: `, \6 C; I( e$ S5 u! K; Z
end; -- of the method$ B) w" D2 c) @* Q4 q- Z
|