/* called by: entrance ctrl of the object 'track': A n5 c1 U3 I6 d y7 {# e8 a
*/
& {0 L6 A+ D. T/ X! l+ Mis( X8 q2 y$ [; r& U' F" s9 S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' ~# f7 g- U% s- jdo
# Q/ p1 H4 S, q& H, x" c1 J Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Z5 ?( I$ e/ {6 ]: T! W7 t if current = @.Destination -- else return
4 r- w+ T P* D then
! [: g% z* e) J1 P+ `. L @.Destination := void;( e6 H) F& C, m
if @.occupied then% b3 R. l5 u5 O4 ?2 |. b
part := @.cont;
5 i: o l* K( y( L. ~- @2 @2 `) b @.transpOrder := void;
/ S+ q" P7 F- p, S, W7 G* C$ f; e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( G' p/ ^* f( a3 }# t4 ^$ i- t; z
@,root.eventcontroller.simTime);
4 n: ^0 ?$ C# |: t+ U% Q4 V @.HasOrder := false;
/ O" Z9 a6 K+ T# p; p" N1 X @.DrivingHome := true;- _( r" l4 A7 u/ e1 T% I. b6 X
rgManager.tryToStartTransOrder;1 n. b, v% @$ p/ ]& c* z/ l, Z7 F6 ]
if @.Destination = void3 k% H) M( U2 ^
then -- no transport order for vehicle @0 o5 u2 g" O( N8 ]
@.Destination :=
4 e) o7 X `, I rgManager.nearestFreeStation(@,track.~);
) l: A' E4 D. e7 b newDirection(@);
/ F0 x. _; d, O5 @7 h1 A1 H% @ if @.Destination /= void then6 |, `! M1 m1 [
@.Destination.NumReservation :=; E- m' B0 d. e/ u s6 U$ |% z
@.Destination.NumReservation + 1;% f3 b# d3 A, H* w
end;3 s. s! M7 m& S; D v U
@.CurrIcon := "drivingHome";
4 `! q; V1 G# R A% x1 Z' d8 I @.DrivingHome := true;
3 {3 Q% u+ a; e3 x: q$ E% Z end;
9 p6 F( c* Q Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station& d; N: z5 b# w: ^3 Z4 J1 ^' q6 `
part := @.transpOrder;5 G. f" \- s3 E9 P1 T" ]' U
part.move(@);-- load part
4 ]! ~) ]( o) `( q" N: Q5 E/ d3 Z @.CurrIcon := "load";" T5 ]; I; g% S& `' \
GlobalDistObj := part.globDestination;
p: ~# Z% Q+ e' q6 C l assignLObj := rgmanager.rgAssignL;# }3 m/ K% S8 ?5 s
row := assignLObj.getRowNo(GlobalDistObj);$ N8 e: J+ X7 s0 g/ u
if Row = -1 then -- since 70
( F- _ o: S+ n2 Y: f+ [ if lan=1 then
0 O( `& d+ r4 f3 m8 {0 S0 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 A8 ]7 y4 n* P9 p( \3 q to_str("in der Andockstation: \"",?.~.name,"\""));
; C6 [4 S' E) y: ], p else3 p; d- `( a; t* B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 L$ R! c0 y. e5 d
to_str("in docking station: \"",?.~.name,"\"")); A$ v0 D) v( Q. @) e
end;
& t: K# K/ X- w1 m) V& j; L2 U else
1 e ^6 K2 e8 J* L# t% F* H! R! ~ @.Destination := assignLObj[1,row];
1 U5 V" I4 m' K end; + w3 O; L' D( O6 U1 G- b
newDirection(@);6 w3 v, K0 m' \5 F
@.HasOrder := true;
9 [+ j4 q) k/ D+ P1 t end; Q' N: ?- |3 V6 R
end;
1 T, G2 R. t3 A! W/ K% i; {end; -- of the method1 X; h: v( e, S! r; n0 j- m( x
|