/* called by: entrance ctrl of the object 'track'" \" { j( \ \ f5 }3 r" u
*/
; L* U& C" M8 X8 j J4 `is' `/ ^. M$ m: \! U7 t3 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 W S7 l4 h1 X
do4 V, |. A. g9 @* N. b
Lan := rootfolder.Internal.Tools.AOLlanguage;
, u$ D7 A7 `) p4 J$ ^) U if current = @.Destination -- else return
# G, O. |0 ]! E; G% m0 T then
8 Q3 F, E( J5 ?" P+ `& ^ @.Destination := void;) V. T, h, f' D% ^
if @.occupied then
: K, ^0 A8 g, g* g- b, Z5 T part := @.cont;: F, n |, P( @. |8 S
@.transpOrder := void;
# s& s/ X" q: ^% [; [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 _, e4 n7 W6 x2 |! h
@,root.eventcontroller.simTime);
* G: T e: q" a( o. M9 h: v @.HasOrder := false;
9 _/ M- U k8 W0 ` @.DrivingHome := true;
3 N x8 Y( P, R; I! _4 q( k7 H) V7 v rgManager.tryToStartTransOrder;, _" ~+ d! ~* F0 B3 ^
if @.Destination = void
& w) P8 }; l, m4 @ C then -- no transport order for vehicle @7 S4 |5 l% y, l4 t8 U6 \7 ^- v, g
@.Destination := i- v6 @+ F( d
rgManager.nearestFreeStation(@,track.~);( u9 \5 }! z5 e/ l% ^4 N7 |
newDirection(@);
: U' x/ s& q) k4 ~0 {2 d1 m if @.Destination /= void then
a! }7 ?6 L) [* Z, M7 \4 }* o @.Destination.NumReservation :=
r" N( { \2 U4 p* H @.Destination.NumReservation + 1;. Y+ R# `' n& r+ X9 p0 P+ D& g
end;
( d- T; y3 A: L/ _9 M8 N: | @.CurrIcon := "drivingHome";: ]5 U+ h) T& u1 q( l+ e; Q. q) h
@.DrivingHome := true;
0 E4 M) b n2 ~# O4 H N& a end;8 [, W7 y: M5 w2 Q3 F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 e* R' f- [' r
part := @.transpOrder;" r7 J8 p3 S" ?/ t% d- p* n
part.move(@);-- load part
_7 K" Z7 t4 K @.CurrIcon := "load";
: ]# q# t; l9 U$ V- F7 q |% a, z GlobalDistObj := part.globDestination;6 F6 e4 S/ v$ h& L4 U
assignLObj := rgmanager.rgAssignL;0 T8 ~' {5 k* `2 q5 p
row := assignLObj.getRowNo(GlobalDistObj);6 j) c* \/ y$ Z; a N( Y) v
if Row = -1 then -- since 701 u2 C+ \# \2 [" D
if lan=1 then
$ N" u/ S5 E8 u. v0 j8 D6 s6 B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 W l: X" g$ |$ D' z to_str("in der Andockstation: \"",?.~.name,"\""));
* {8 ^& s* V# v4 Q! m else* j9 |% D' I/ @# G, B! d; B; w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! i& d1 |# {+ O- d3 W5 o$ L to_str("in docking station: \"",?.~.name,"\"")); 9 N0 j0 |$ b/ O( t: f i `) ~
end;
, m2 R4 h. i" H4 G! x else
& ?, e. i' B1 X4 C. D @.Destination := assignLObj[1,row];6 m3 j+ }/ U" S
end; & ]/ e( V! e2 l! `9 ?8 k
newDirection(@);
6 l2 t2 B1 Z3 G, u% V. y3 I @.HasOrder := true;
9 ]4 D% e5 e4 g end;
. H- v* ~0 y. w- m6 g end;
# E$ j+ B* J1 c# Oend; -- of the method- i5 @- q Z5 r" S8 a* d) s1 \9 z
|