/* called by: entrance ctrl of the object 'track'
! _ P/ l( [1 ]& X7 S*/! o6 O0 {$ D( r; T4 Y. z. B$ ^' I2 U
is; t# ?5 D& q _7 [! e1 e/ d4 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 i5 ~+ B9 m5 l8 ^ } m
do
( J; w6 u: Y5 F2 g! u% r Lan := rootfolder.Internal.Tools.AOLlanguage;* K" p" R; ?# p4 e7 p9 V( M
if current = @.Destination -- else return
$ Q* n* }6 {2 d; g* ]8 D then
9 M# K9 t$ u2 F: w. Q& K @.Destination := void;
: y& x0 |% H) I# @) e4 R \, o if @.occupied then
W1 \) D9 t4 m' N5 G7 g part := @.cont;% H* d% j" N, F( `9 t+ T
@.transpOrder := void;
; \5 \. c: e; ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% [* [/ c4 `. G1 a @,root.eventcontroller.simTime);' q6 W4 H. z; k# C
@.HasOrder := false;
7 b# B" K, h* m S, F7 v: V @.DrivingHome := true;
% T1 A8 M8 @ A5 v5 _/ h9 I9 F rgManager.tryToStartTransOrder;# u" w4 e% W/ p3 p
if @.Destination = void
; {/ y# O' Y0 d- A9 J4 v$ T; Z then -- no transport order for vehicle @0 {, c2 F. U; C2 T2 s {
@.Destination :=
4 [% X: V- B% S+ S! u& I% Z rgManager.nearestFreeStation(@,track.~);
" w4 K7 O. V, K S newDirection(@);
8 I& G. ~6 D! Y+ b3 |( T if @.Destination /= void then- Z* X, M0 S* E4 ~: v
@.Destination.NumReservation :=; i+ K2 h/ ]% v' V, ?& C
@.Destination.NumReservation + 1;; {% O& h8 ?: A8 p2 y$ U0 Y. a
end;* H5 g9 g! { T: R a% N
@.CurrIcon := "drivingHome";
$ l2 D5 ~2 T1 l+ f: S, s @.DrivingHome := true;1 U5 J( Z+ u% B' p9 Z
end;
! P% S9 l9 w" U else -- the vehicle @ is empty, both vehicle and part are in the same dock station% Z3 ~+ m8 o' N" A# E" F
part := @.transpOrder;
6 P h1 t- S( \5 d; L; @# W+ r part.move(@);-- load part# K1 V5 U; L r: A
@.CurrIcon := "load";
2 `+ c R/ T9 `5 A. r2 n) l GlobalDistObj := part.globDestination;
4 u: g/ l+ s9 y assignLObj := rgmanager.rgAssignL;
- G6 P6 b# \/ p+ J: `9 H2 N5 s- R row := assignLObj.getRowNo(GlobalDistObj);4 j! t2 s# J6 T
if Row = -1 then -- since 70
, ?2 e3 x( W# Y if lan=1 then
# I x% d7 ~) s! c5 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% H! X$ ~8 ~- {& H# Q3 Y+ E* D to_str("in der Andockstation: \"",?.~.name,"\""));! E! m5 M0 T8 G- Y
else
+ a1 \/ q' M2 M" o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ Y% H" C( x! {( A- @ to_str("in docking station: \"",?.~.name,"\""));
! _1 p7 P0 K" N3 v4 U3 \. W% \ end;$ w; I3 g7 D6 w, E0 F
else
, e! j U( i a% ?, @ @.Destination := assignLObj[1,row];7 L3 S$ u$ C" H8 U5 L
end;
* y3 E" |8 d- Q# n8 e7 m0 E6 c newDirection(@);
! j/ R* C) W; u, B0 x U. C9 V& ? @.HasOrder := true;7 k$ U3 p A' ~& U+ t( I' ]$ B
end;9 [1 L$ Q P% q0 U2 k% M
end;
) Z. W( j2 z$ ^+ }6 m! Zend; -- of the method: ]! n3 C1 j% w. t; i. n- M
|