/* called by: entrance ctrl of the object 'track'4 R9 y2 b# i1 R& {1 t
*/
4 ~" T9 e! f* W5 T0 ?- r) G) vis% H* e$ f0 w( S) f6 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ K* X6 k$ o( A$ [( x
do
: Y3 L9 [2 e b: E" I9 G Lan := rootfolder.Internal.Tools.AOLlanguage;; g, G0 O: H5 B. A
if current = @.Destination -- else return; A- J; n& E* u& |
then
, g0 Q! G) @# P @.Destination := void;
# A: |6 A1 r' K- b2 ? if @.occupied then
+ m" M! {+ D% \7 _% Q& } part := @.cont; A9 V' I2 t! x4 q
@.transpOrder := void;0 a' {1 w. C5 h& G' c" O" J" C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 v _5 p$ t7 _' f8 |) v
@,root.eventcontroller.simTime);
! ~8 u$ }9 T: [2 u5 b1 ? @.HasOrder := false;
/ \+ f/ G( `' \4 l m @.DrivingHome := true;
1 |/ V" ?! q2 s, q2 z rgManager.tryToStartTransOrder;
$ c0 v3 L1 ^3 Z* M7 b, X$ b7 g% m if @.Destination = void; n! @2 g, _2 p z
then -- no transport order for vehicle @0 v( A& l* n$ M0 w3 ^
@.Destination :=, ^7 O/ [+ D2 h2 j7 ]7 l
rgManager.nearestFreeStation(@,track.~);
5 Y; ]7 J3 A" V newDirection(@);
3 w+ c2 G; S) C. b5 B if @.Destination /= void then6 j6 V7 s0 {0 A; w _- \
@.Destination.NumReservation :=! x6 @0 p2 d6 F4 ^
@.Destination.NumReservation + 1;
7 r1 Y7 A4 L" Z# ]! z end;# Q: @4 z& n$ S# B; w9 ^4 r) e
@.CurrIcon := "drivingHome";
2 {1 G$ U& W2 H% B7 a @.DrivingHome := true;" K& s! c7 Q0 ^& G
end;
. I+ k# q4 T/ k! l. }" [1 A* C' B3 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 w3 W" a4 _( \
part := @.transpOrder;/ F8 g+ _! f% Q
part.move(@);-- load part- w, `2 N7 k8 E. `8 j3 G5 u5 j2 [
@.CurrIcon := "load";
. R' e! u; y) i: f4 F4 @ GlobalDistObj := part.globDestination;
/ c3 W# x/ p: O- M/ P+ M' z assignLObj := rgmanager.rgAssignL;
# J, l! E+ G% k) ?$ e! c( m row := assignLObj.getRowNo(GlobalDistObj);
4 }# I3 m/ T8 p8 D. o if Row = -1 then -- since 705 [/ n9 ^! G1 Y
if lan=1 then' G/ x2 `5 k% q: Y* @# M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' f8 C. B, \' T6 Y& N0 ]6 Q to_str("in der Andockstation: \"",?.~.name,"\""));
4 E/ B8 w( Q. G' j; o" e+ b else5 y" x0 Z% K9 V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ z# R F& u1 C6 T% | m9 M& V5 S
to_str("in docking station: \"",?.~.name,"\""));
( ^1 t2 m, y$ j end;! `. L5 m2 X! _) g
else( A* s% d/ }# r+ r6 M
@.Destination := assignLObj[1,row];/ h/ M1 m S" u
end;
; |$ N6 B; q5 P7 i$ J5 [6 N newDirection(@);( c$ O; @2 k8 r3 a
@.HasOrder := true;8 R' [( |, W$ A
end;% _/ u ], S/ L) u5 M; a
end;% l" D0 _- {* L# @% l. Y
end; -- of the method# G- c, \1 n2 h$ z* s9 a! n
|