/* called by: entrance ctrl of the object 'track'- p, t2 `5 f3 h+ @: f. C
*/
# B. Z! h7 ^3 B& cis
4 F0 [4 ]% h/ o3 I# {# [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" g$ ]* n) I$ u' A" H. Qdo
1 M l) g+ }; r7 n: p# Z V Lan := rootfolder.Internal.Tools.AOLlanguage;% F; e! u* j# S* S7 ~2 _ z
if current = @.Destination -- else return
$ f. L" R) B0 u3 g2 ~6 x) n, Z then6 W, M3 N. i- q1 J" ^
@.Destination := void;" ~. ^, ^+ k" {$ W
if @.occupied then/ ?& `4 t1 M. R; W5 B, C9 ]
part := @.cont;
4 B. ` w$ o+ ` }7 V) n; o; G @.transpOrder := void;
# X2 U! x% c5 o. m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* I5 V& O3 E* S' t4 F1 o3 x) m
@,root.eventcontroller.simTime);0 a w* |* z$ l$ w* B
@.HasOrder := false;
' l* e8 V, [, q7 a% ]. \9 e+ l @.DrivingHome := true;
2 [1 J$ Z$ x7 n/ p2 X rgManager.tryToStartTransOrder;
1 H1 E3 l% H/ |; Z9 D1 B r2 x if @.Destination = void% ?/ I& d# l/ ^' u
then -- no transport order for vehicle @# H& o8 G: l. P$ P% V4 q1 _1 e
@.Destination :=
, N2 o6 q7 O5 d rgManager.nearestFreeStation(@,track.~);# Z5 H" p7 P' s9 M
newDirection(@); 9 l+ T' p. Y( \. X
if @.Destination /= void then
6 g$ R4 v6 ?" ?# K, K: ^0 V @.Destination.NumReservation :=
" y5 i4 _2 W8 E( c. f# B, B- v* ? @.Destination.NumReservation + 1;
# `) d+ O0 s/ g0 n4 ]( U3 Z end;
( l* f+ q$ P+ D7 M @.CurrIcon := "drivingHome";- ] W1 X0 g: Q6 [6 T
@.DrivingHome := true;: A6 F. L: \4 U* B# h
end;
/ }. b& R* Z( \% `0 S5 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: O W* P# ?9 } part := @.transpOrder;5 Q" S3 H7 D: {; w% \
part.move(@);-- load part" P: k" B7 c0 G. f# q* w& |6 m" }
@.CurrIcon := "load";% R; e$ R4 |1 r/ e5 ^" U/ Y
GlobalDistObj := part.globDestination;
- w: e; ]' I- ~8 z; H% h& O9 x% X assignLObj := rgmanager.rgAssignL;
3 Y8 i1 z: A4 L0 p! f: _7 B row := assignLObj.getRowNo(GlobalDistObj);
9 O9 R- e- e2 i8 j+ ^' o6 v9 P4 {% } if Row = -1 then -- since 70
5 v& @6 c' C; k$ z. R if lan=1 then! Y% `% q- k2 E2 u# v& Z0 z2 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; H- p) F! U n" ^0 |. o3 u
to_str("in der Andockstation: \"",?.~.name,"\""));
$ [/ I0 u, r5 c" T5 v v% Y/ O, N else a! `5 D- T' n5 {0 e- [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 Z( g# [3 t4 f4 Y
to_str("in docking station: \"",?.~.name,"\""));
* O/ [! `$ _4 m end;
9 [6 S) @1 k3 ?: K9 z0 R else
9 j$ _% a1 O: {0 n9 j9 { @.Destination := assignLObj[1,row];
; j% |6 `$ Z* D& U9 n end; 8 N3 _# G! K& E6 {$ n6 N5 ?. x7 L
newDirection(@);
9 x: s+ p, l9 U' V1 A1 Q$ x" N* J @.HasOrder := true;3 A8 A1 v% m$ }3 J8 `/ o: ~
end;
4 @! @. ?1 ?0 t+ H, @- S end;; [6 c& e0 V; U& s0 c( r; j/ Q
end; -- of the method2 ]$ d& `1 O1 j+ L X
|