/* called by: entrance ctrl of the object 'track'
5 n' R6 r% P! M0 U; Q' [# ^; x- l*/4 W+ }8 @8 {2 f' g7 h
is
4 }; k' P# M3 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. n" q3 n6 z- V f/ T. L0 Mdo
$ r- v2 s1 H! C% s6 b) A" [2 b Lan := rootfolder.Internal.Tools.AOLlanguage;: E8 K% s4 |; d8 g
if current = @.Destination -- else return) J; h% m0 a: _* i
then9 ~1 C6 J( I& H% }
@.Destination := void;3 L& l4 ~3 e' V6 O% u5 i) v B
if @.occupied then2 z+ L; N- r6 w9 l, D- u
part := @.cont;! g5 G% n( I9 t9 c- q; X- I
@.transpOrder := void;
$ z3 J+ _1 }: Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- J1 |6 @, C8 u2 J' F
@,root.eventcontroller.simTime);2 S! j& \. u6 G7 q# {
@.HasOrder := false;' D4 r$ g4 Y% K8 M1 J
@.DrivingHome := true;; d4 _) c& t+ {0 F' f& N y. m
rgManager.tryToStartTransOrder;
; M" G, |. [4 u7 e2 G if @.Destination = void R1 }9 ]6 j( n7 H8 ~
then -- no transport order for vehicle @
3 D; R7 R9 { e6 z' B @.Destination :=9 Y% u( m w) J# Z2 L2 X2 g, N2 \
rgManager.nearestFreeStation(@,track.~);, p( _; x, B* s9 |8 T, T9 l
newDirection(@);
0 A* g' ^0 w/ B; U if @.Destination /= void then6 t9 z5 H/ |( L( N# |% M/ M+ v
@.Destination.NumReservation :=
% h3 k- j. |; I @.Destination.NumReservation + 1;
3 }0 x- x# K; T1 o5 ?! m4 L2 ` end;7 ^5 v9 [+ v0 O& M4 w, \+ M
@.CurrIcon := "drivingHome";2 S* I0 B! V7 b" ?2 b5 Q9 K
@.DrivingHome := true;
5 h- o! z% Q: O" p: R$ S end;
( Y. E3 q# s+ W s5 J% b1 T6 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 \* V) B9 m. k; h* e/ V# l7 o part := @.transpOrder;
% p# `" u# [/ F* E( i part.move(@);-- load part
# t4 i! t: X) r. I @.CurrIcon := "load";" d4 H+ {! d4 g% f
GlobalDistObj := part.globDestination;+ j3 V2 v. q% s1 S# H' L1 E+ @
assignLObj := rgmanager.rgAssignL;4 P) P( D8 _( U) }; l( z
row := assignLObj.getRowNo(GlobalDistObj);( K; l& l3 Z9 X$ Z1 E
if Row = -1 then -- since 70
3 d& _. b2 }2 E if lan=1 then
z* J# X7 D% U! J! A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 h! E! Z1 N% D7 }
to_str("in der Andockstation: \"",?.~.name,"\""));
2 F" _3 t( T5 V7 z5 j else
( N0 q% m3 z m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" W8 L D) Z9 N. l$ a1 _( t G to_str("in docking station: \"",?.~.name,"\""));
0 j& q( b) S/ m5 `" n1 D end;
6 j. u: R9 M n6 f# } else
1 Z* O% ]! B4 ~- Y2 S4 L) W9 [3 J8 j @.Destination := assignLObj[1,row];+ I0 M) Z1 n2 _: J) \9 i% q
end; & z w5 `. B7 K9 b: X, G5 ^4 Y% s
newDirection(@);2 M5 P$ B+ v2 S2 s% e5 ~
@.HasOrder := true;2 h9 x L# S# u7 O7 y# G0 |5 _5 @
end;
' M+ L6 Y @! J& `# |( ] end;
) f- h# {; g" aend; -- of the method7 p* R9 H0 t9 G% k
|