/* called by: entrance ctrl of the object 'track'
0 k I% ?& d% {3 Q- H*/
! W6 u t" w+ E4 J! a: ?is! q9 |8 H- v7 t5 m) r2 i% u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# d1 ]- f. } i& y! L
do
5 S8 F' e. ?. ^- Y) [ Lan := rootfolder.Internal.Tools.AOLlanguage;& R) X7 W$ \ Q. j6 x. l
if current = @.Destination -- else return
; d) E+ D! V0 D& f: }$ I+ E7 U then
9 w# u7 v3 z4 l9 C! G1 B% y @.Destination := void;
- N6 Z* G8 _ |& e2 _. i# C; } if @.occupied then: O6 G8 {9 h" w% W) U# R/ _
part := @.cont;
7 H" G. j- a, m( G @.transpOrder := void;6 Z6 ]! q: \0 [1 G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 q: J8 z& r* c3 F/ p @,root.eventcontroller.simTime);
1 m' F, o* t$ f0 n* {, n% M' V @.HasOrder := false;
/ J/ C3 B7 I5 `* X* p( [# ~) N @.DrivingHome := true;6 W- T" K R# F( a1 `* O' Z
rgManager.tryToStartTransOrder;
% x, {% o+ b. J2 K+ d& e if @.Destination = void
5 x5 `1 y4 q/ B$ `" l' _' b7 p* n) Q then -- no transport order for vehicle @$ D6 E+ I- Z" |
@.Destination :=
6 K/ `1 _: f Z! x" v2 X rgManager.nearestFreeStation(@,track.~);+ U3 n" |! N+ L$ k) \; t* i
newDirection(@);
1 Q9 q+ K# D. K% V$ F if @.Destination /= void then
7 m/ n; s+ q/ N% \& x' A @.Destination.NumReservation :=
' E+ L, @/ Q/ O$ C$ B @.Destination.NumReservation + 1;
) O0 H4 }7 b0 U- i9 g end;
# @+ b5 y& w. B: P# W @.CurrIcon := "drivingHome";- d! K7 {" `+ a# M* o* [
@.DrivingHome := true;
4 ^4 l# }+ Z& G- Q( ]. G; [/ P end; D6 @6 w6 ?/ a" _9 Z+ O7 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" @8 U: ~# N) ~0 b2 _ part := @.transpOrder;, y( t6 j+ p. Y* U' ~
part.move(@);-- load part8 x, |0 E* [2 ?* n4 F$ O
@.CurrIcon := "load";
D& m! t" R, M( v3 U GlobalDistObj := part.globDestination;8 P; k ]; [; r9 S
assignLObj := rgmanager.rgAssignL;
, \6 l# y g! ^2 P row := assignLObj.getRowNo(GlobalDistObj);
; g* {3 k- r. q4 a# c, Y if Row = -1 then -- since 70
. y6 s) c& u& N' z. z5 G if lan=1 then
/ K p! g% x/ N. M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, ^) i1 V& ]7 O7 C to_str("in der Andockstation: \"",?.~.name,"\""));
* y* K) k; g3 P) e, { else
; A5 {4 N. J8 y; i% m* n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 ?2 _# ] G K" [2 F1 C5 { to_str("in docking station: \"",?.~.name,"\""));
$ I/ a5 D% v9 [5 ~ end;/ h* r* F1 ]2 B4 N0 D7 |
else/ q9 I' |8 Y0 m
@.Destination := assignLObj[1,row];5 w- h/ K$ h3 e5 `
end; ) A. P& y& u6 F' |' J/ k: [
newDirection(@);
% L5 _& F) Z4 A @.HasOrder := true;
6 H/ o3 k7 p- F' `4 W end;# B$ H! b! T j3 [7 G# s
end;
9 F7 _; S& U' `6 Gend; -- of the method5 G( |; q) Y& \- R! C9 F1 a
|