/* called by: entrance ctrl of the object 'track'& ~; W. D1 J! L3 X5 t! r |- A$ w7 M4 j
*/: g& x: }# T1 m& V9 v, r
is! V, \8 [ ?% R0 @, Z- {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" M% E9 |% j' w# \' ~; Gdo
6 }, h& y: F2 P9 ~0 C7 k" s0 c" N Lan := rootfolder.Internal.Tools.AOLlanguage;
- [6 B' m8 X- E \ if current = @.Destination -- else return
# d: f+ J9 C& T+ ~ then% ?3 ~+ e4 o, ^3 E% B1 Q# m/ Y
@.Destination := void;! K B/ s! E% k: ]6 @
if @.occupied then2 z. y* J% ]* R+ }! m
part := @.cont;" D, h: g9 T0 f2 M+ R
@.transpOrder := void;
& Y0 I5 V" w; U% L! y' C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! E$ C q- G+ F5 n7 J8 H9 b @,root.eventcontroller.simTime);
# t3 g, ?3 a" ^$ `+ M @.HasOrder := false;
8 B# e3 m( Q) d7 Z @.DrivingHome := true;
% Q/ L8 E' v; w4 M rgManager.tryToStartTransOrder;
) x1 { `" o; @ n) A0 g: Z if @.Destination = void
7 U. F# p' Y& W2 W/ V: Y then -- no transport order for vehicle @5 t; D, X9 G5 j; Z: w5 r
@.Destination :=& u" z+ I" c ^! o
rgManager.nearestFreeStation(@,track.~);
" d8 n5 {1 Q) F. }* {% z& e' a$ @' K newDirection(@);
# j9 @( {- Q: Y* J% G* e if @.Destination /= void then: ?9 D. B1 X* A( g
@.Destination.NumReservation :=$ p+ \' [& v5 r7 U4 j3 N
@.Destination.NumReservation + 1;
# v8 ~9 ?0 k7 t6 n: ^- s$ U4 m end;' }1 T8 S% O0 i8 `1 c$ J7 h! V- G
@.CurrIcon := "drivingHome";
1 y: c9 R, e4 @ @.DrivingHome := true;0 R6 f4 I$ W% M9 ?0 x# @) b8 j9 x
end;
: c+ {7 z, e3 b9 n( i. o1 T2 T* @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; o7 V# p8 N5 f7 C9 U5 y part := @.transpOrder;
) i! X, i H c! C/ H. w* C( j part.move(@);-- load part
& c/ Z& J* w. S, ~+ W @.CurrIcon := "load";* K D, N) U7 Q* m& i2 S5 e
GlobalDistObj := part.globDestination;. ?1 U! P r8 V4 C
assignLObj := rgmanager.rgAssignL;
B1 R' o" ]" _# ^ row := assignLObj.getRowNo(GlobalDistObj);
* @* Q+ h3 J& A; R; v% I" G if Row = -1 then -- since 70
x& ~% D/ t2 c* S5 _ if lan=1 then
5 V. b( {5 r' B, _$ Q0 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( u- g2 G3 T7 W2 |( ~# k. R2 S, | to_str("in der Andockstation: \"",?.~.name,"\""));
& B1 `, P7 L' w1 ` else; f4 y( @ c4 J* m" P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 u% q. w8 I" C0 w1 M: a4 N0 @ to_str("in docking station: \"",?.~.name,"\"")); 5 H% h$ B0 K1 h( R
end;9 Y! u# R2 A7 `( |' [
else" W# J1 H! B7 Y; u* J
@.Destination := assignLObj[1,row];
0 W- i8 Z3 M$ b2 N: l- S3 M end; : \# p s. O' d4 h% ?2 W
newDirection(@);# J% H: L7 b4 h
@.HasOrder := true;3 ?% s2 O: g; [2 }( G" t
end;4 X$ }0 u$ o3 x3 J
end;
1 y' o8 ]( E' \8 t( I2 Zend; -- of the method
$ |; q& i, h# ^6 S2 U2 i |