/* called by: entrance ctrl of the object 'track'
2 p/ p# `4 L0 [% }7 |*/" \: ~, k' [; C
is( I) L6 s M0 |0 P- p# ^0 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 V8 k1 T) _; Q5 S1 ido
* I! c8 [0 Y7 n7 M- { Lan := rootfolder.Internal.Tools.AOLlanguage;
) k( H* o4 v; b9 \% a if current = @.Destination -- else return
1 r8 P$ T( b2 y7 O* Q: _ then( ]' z. \5 M- s7 h
@.Destination := void;
" a1 ^' I3 m% c, q if @.occupied then
! G! d7 ]7 _* l0 v0 @0 m3 d part := @.cont;# H0 ^6 v% w/ U1 ~* ?
@.transpOrder := void;
# I& N% d# y7 ~) V$ n8 S( ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 v5 p+ F) [0 U0 v3 d" r
@,root.eventcontroller.simTime);! M/ P4 m! D0 T: S
@.HasOrder := false;
( c: g( A' B' D1 Y @.DrivingHome := true;
+ y( R& ]* V" U- I9 C( E rgManager.tryToStartTransOrder;
( E ?+ b' w. y4 H( r$ W5 n7 a" a if @.Destination = void6 x' R, \& z2 M) n- d, E7 ]! W
then -- no transport order for vehicle @
! p; N) _# x P/ L: b @.Destination :=
0 \" b4 O$ }5 i9 T: R rgManager.nearestFreeStation(@,track.~);
! X# y( Y3 I: K, z; d: R newDirection(@); / W+ n* V: V# |2 J/ k& ^
if @.Destination /= void then5 v, P6 h# {9 H: p# G+ f, U/ O' |
@.Destination.NumReservation :=: X6 Q; u) i8 I3 b2 T
@.Destination.NumReservation + 1;- L- l. q- K8 B# O1 q
end;
' _% w$ c' w$ G7 M @.CurrIcon := "drivingHome";
3 x7 ~8 q y& E @.DrivingHome := true;7 v* E' Z' F, S/ S
end;
. `2 I9 Z$ J! l1 C else -- the vehicle @ is empty, both vehicle and part are in the same dock station: P5 {: X! X: G/ b: X( { C
part := @.transpOrder;7 e- b" j& m2 G& D' p+ [ J
part.move(@);-- load part; T" S) b: j K# }5 A ~) W o
@.CurrIcon := "load";3 l% A4 U; t, x& e
GlobalDistObj := part.globDestination;
1 a& [) t& E8 k1 I/ V G: ~ assignLObj := rgmanager.rgAssignL;: ~4 C) t) [' ]" p7 J$ l
row := assignLObj.getRowNo(GlobalDistObj);
# y: S' r; d3 v! L- B if Row = -1 then -- since 70
. U: L4 m* q, \9 d3 Y if lan=1 then5 v' ?$ ?4 j0 b; M! ^! H) }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' \1 e* b* d& }+ |
to_str("in der Andockstation: \"",?.~.name,"\""));4 U$ Y Q& ]' v- H9 c( [% i
else
( h0 |% m9 [3 ], ^# j5 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# L+ S. S: q: t- b+ n0 F
to_str("in docking station: \"",?.~.name,"\""));
/ m# v" |- U' w, _: @ end;7 }# M3 Z9 A; O
else
% E3 v- x( J6 D4 n, p @.Destination := assignLObj[1,row];' M h9 k+ g2 `9 k" r
end;
0 ^) S8 |4 K& ? newDirection(@);
( N* K" J( k+ T @.HasOrder := true;
4 G% p, @- o& T& Z5 @ {3 v- M end;
+ l' P0 e' {* m: S end;
* Q0 X# y( G. i' p3 U9 Y% Bend; -- of the method
+ e, _( t6 s, T# a |