/* called by: entrance ctrl of the object 'track'& N& y9 s; I* N) s9 ~% t4 C9 V Z
*/8 k/ v9 U3 e! ]! Q$ J3 Y3 \
is4 G0 _& [ N2 B" F; ?3 ~; z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ S% |. m. e& \; m# \6 bdo4 Y$ W- V, {$ U: w
Lan := rootfolder.Internal.Tools.AOLlanguage; ~, N, j6 y% L& O1 R
if current = @.Destination -- else return; p4 ^2 t5 d0 k, k
then
, e: z5 H9 |! c& |5 o @.Destination := void;, Q- V( U1 `& q, M6 R
if @.occupied then3 l; R# T) u) }# u
part := @.cont;
1 U: ^$ k" S P. | @.transpOrder := void;0 c1 _ n& F. R3 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; c4 H ]. w% G @,root.eventcontroller.simTime);
" J# O; R& M; x @.HasOrder := false;
" f p& X& S% L' x1 H; N @.DrivingHome := true;
1 F8 O. b1 a/ W! X2 | rgManager.tryToStartTransOrder;
1 E' v5 s/ P- o; o2 S7 i- ? if @.Destination = void
4 b& Y E1 d6 k- ^% q then -- no transport order for vehicle @
* D8 p O* K8 e' F2 y- z d1 g @.Destination :=1 {) Z' G' `# ~% P$ Y6 G2 e
rgManager.nearestFreeStation(@,track.~);! z9 D7 A) g* D7 Z( ]
newDirection(@); , @/ Y# U0 l' Q# ?" e
if @.Destination /= void then$ y! N, x4 x4 A/ S
@.Destination.NumReservation :=. \, U& Q5 c; }
@.Destination.NumReservation + 1;+ T# t- F) `9 v
end;
/ J* k) t3 n4 s @.CurrIcon := "drivingHome";
}) o0 ?) `. F @.DrivingHome := true;
& R. V" @( g1 U. `$ ~' e end;
. ~: m; H1 b% E/ o6 b% ]9 l; B else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 V5 y" I6 H( e2 A# K
part := @.transpOrder;; o W; \! W2 W7 q* g
part.move(@);-- load part% g$ b) J5 ~, V* {
@.CurrIcon := "load";6 I9 R: S* Q4 w" _. r- d; O, p" h
GlobalDistObj := part.globDestination;
1 W* ~7 X' Q! k( J4 p assignLObj := rgmanager.rgAssignL;9 `; x' S3 E6 Y) {, S9 @$ V. j
row := assignLObj.getRowNo(GlobalDistObj);
4 ~' Q. E& K% x/ F( c2 u if Row = -1 then -- since 70
, u& |, J7 i0 Q if lan=1 then/ }( W4 q, ?# Q$ ]5 q" S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% I8 ]2 o$ C0 P4 h, }! Y) }
to_str("in der Andockstation: \"",?.~.name,"\""));& K* E. Y7 s8 B, d: t
else
3 A8 s6 O% S7 Y8 r$ h. y3 Z# ]$ S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# Z* Z# H/ P+ r1 F
to_str("in docking station: \"",?.~.name,"\""));
' E( _* @8 ?( V: L end;
7 d0 T/ N! b' g3 p! ~( I+ S) } else
% A |, W# x* L. d5 Z @.Destination := assignLObj[1,row];* s7 K, L3 H& D1 A, w
end;
) g. d- _ {& @% K5 H, j newDirection(@);5 Y b# G# w4 F. [6 S- j8 l( s% q
@.HasOrder := true;
& V2 H$ S. U, U% K end;( x4 M9 A: X; X) ^
end;1 `0 s0 ?" A% V0 Q
end; -- of the method; D" y1 V6 {6 |, F% ^( L! z9 ~
|