/* called by: entrance ctrl of the object 'track'$ R( ?$ l/ P4 w
*/
' v* d* z4 f' n) |/ ?' f/ \is! }, f3 X s% R1 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 n# K* e' C- d( s5 Gdo' p: `+ ^) D8 e7 u" v1 C
Lan := rootfolder.Internal.Tools.AOLlanguage;+ A* y& E3 F5 E0 q) F, \
if current = @.Destination -- else return
+ ]( x# R+ T4 N7 E8 f8 L then
) F: ]3 J& b) P: ], z1 E @.Destination := void;
9 f4 v! d% b: _9 w if @.occupied then6 h% E, T3 p% i, }
part := @.cont;8 q: C# G N9 B' P- O
@.transpOrder := void;4 h& x) @0 t0 v7 d- B' C* D* ?4 K+ Z9 O4 J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ^& h- \2 C& p# \: O9 k5 V9 S p6 J @,root.eventcontroller.simTime);# Q4 A9 t; n3 R# I2 @$ d
@.HasOrder := false;
, o/ t8 g2 @, G2 G2 @ @.DrivingHome := true;
9 v: K/ z/ _ s" L8 h rgManager.tryToStartTransOrder;
7 w! Z5 _# X) u) E! c if @.Destination = void7 c( m9 p! B' ` v# g
then -- no transport order for vehicle @, d& N0 X+ y( n4 E1 @
@.Destination :=* e$ `3 {' O0 c$ j* h7 A5 K6 Z! R
rgManager.nearestFreeStation(@,track.~);
$ a; r1 t; P7 t$ ^9 L newDirection(@); ( c9 w7 O4 g) @2 `! E O
if @.Destination /= void then
. F/ k( l! f7 n& ~( m @.Destination.NumReservation :=
) M5 {, o7 M8 s; d& n& M @.Destination.NumReservation + 1;
* @) H3 T( A) D6 H! o- @+ o& b end;3 b! }( o! G0 f- N; o! X
@.CurrIcon := "drivingHome";
1 m+ ~3 G. x# `4 V. H* R0 d+ V5 y @.DrivingHome := true;6 {( q6 F3 B3 l+ V! F! w# _
end;
) w/ l( T$ D7 k) T else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ y& z2 @8 g \' J1 b4 b part := @.transpOrder;9 D1 J6 R1 M1 Z: I3 g# j
part.move(@);-- load part! a& L6 I3 U+ t9 m9 Y9 X0 R
@.CurrIcon := "load";0 J! l: o% A: c2 U" v7 G
GlobalDistObj := part.globDestination;
7 K7 B% Q9 e5 A; u3 a' _8 l# v$ O assignLObj := rgmanager.rgAssignL;
5 T/ r( I4 f) N7 d8 Y8 w' i$ H. \6 ~ row := assignLObj.getRowNo(GlobalDistObj);
: Z; ^9 c& }% S8 i8 a# J$ Q- x if Row = -1 then -- since 705 G1 o* e7 Q% a( E9 e
if lan=1 then
. j: y5 G$ N) d/ c: z1 c( F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ ?2 ^: Z. }( z* ^; s to_str("in der Andockstation: \"",?.~.name,"\""));( ^9 z: {& E' i* v6 C
else$ \% d# N. B F |9 \* N% X% c* p& j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 B) G. q ]0 O* _, W
to_str("in docking station: \"",?.~.name,"\"")); + G( w! C! [& `4 c5 y
end;" z0 o2 Q; |+ L
else
* |% I4 D2 A9 E4 ~: [! k @.Destination := assignLObj[1,row];1 P- z% A: W; u: M6 y0 G( F0 ^
end;
2 } H, k' [, G" j newDirection(@);, ^! U4 B6 y) V
@.HasOrder := true;2 c/ X( j4 j( c5 b% D
end;
9 [7 v- ~ k3 W7 C' g+ r2 Y5 A! V4 a end;
: |& M/ \' g( x: `9 l4 l* y$ @end; -- of the method c9 r1 y5 ~ F
|