/* called by: entrance ctrl of the object 'track') q/ o, M \, B$ U5 ]. P
*/* c% `/ i$ d+ j+ [) A
is
! e. Z$ }( `' M( J0 B$ v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: x+ ]% d8 @- h; H5 j$ mdo
: M# @% k( d$ E7 O. V Lan := rootfolder.Internal.Tools.AOLlanguage;
" n5 i+ g0 L5 ? if current = @.Destination -- else return7 p9 J) V% O2 j2 ~6 m3 d ]8 f
then9 q' \) R- U; g( k" f- r) d
@.Destination := void;! Q1 A5 E4 F" o% \4 I/ T
if @.occupied then
" I% l/ c" H2 H5 V B part := @.cont;$ {# c3 [1 ^" M. i3 j% s0 b
@.transpOrder := void;
* W4 Z( u8 }% x8 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# {/ I7 T1 X$ ^9 W
@,root.eventcontroller.simTime);
4 j; i* z! l; }: v* l" s9 y @.HasOrder := false;$ ~2 t9 V# G) `/ Q5 I7 Y/ [
@.DrivingHome := true;4 v& ~, g# y8 _' Q; D: [$ M
rgManager.tryToStartTransOrder;
5 I9 C6 ~, G# G2 u if @.Destination = void6 s* H, t3 s. d8 c/ q
then -- no transport order for vehicle @
9 K4 \" k5 d2 ?1 t- l4 X @.Destination :=7 p( F( S7 b3 C O* ~: G5 R
rgManager.nearestFreeStation(@,track.~);
. }/ v2 W4 t `, M4 n9 H newDirection(@);
( a& W4 _8 k5 T/ ^8 ` if @.Destination /= void then; h& A1 q, \) q4 F; D+ F/ Z; \7 @8 Z
@.Destination.NumReservation :=
+ q) z$ R, u' t0 N% j @.Destination.NumReservation + 1;
) s" G6 i6 y- H( @ end;% l7 T0 Y* C$ P# `* `$ R( }! T
@.CurrIcon := "drivingHome";
# n; O# b0 H) |( e: i6 k @.DrivingHome := true;
{; `- s. C3 w: n! {' C$ z5 R- G end;
7 {! r2 [1 f) f$ f, Z0 o+ y, X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 }8 u4 n( y; n part := @.transpOrder;
F' v+ ^! U2 J$ [9 R, | e part.move(@);-- load part# |! J( [. z" _+ f. l
@.CurrIcon := "load";# I' h4 @. z0 ~1 }( _9 v! |
GlobalDistObj := part.globDestination;
s$ _/ t: ]) Y: }- E: P% V assignLObj := rgmanager.rgAssignL;
. @( @: @& U- w. o7 v4 [" S; { row := assignLObj.getRowNo(GlobalDistObj);
# W& U8 [* \- ^5 h* ?0 e if Row = -1 then -- since 70
) r0 n4 R) V, j if lan=1 then8 Q' x( a! {" E! t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ Z) x$ y; o; j to_str("in der Andockstation: \"",?.~.name,"\""));
/ y% L6 s. t; Z( k! a- a& @ else# \7 l4 W9 F* _" X# |; q* z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 e6 b% n& M. f' j' p3 ?
to_str("in docking station: \"",?.~.name,"\""));
: \/ M1 O1 M3 F2 \4 V end;( P7 B. B; z+ N
else6 ^* a1 S+ A: i: X. k% }
@.Destination := assignLObj[1,row];
4 t( V- ?, g2 W& n& ?# L7 @- W end; : R# j% @) K0 g& M" T
newDirection(@);
) h# a6 Q3 A$ N' q, i @.HasOrder := true;
. P) E( a- L) c( ]' z5 @) o end;9 b5 L* D2 y5 C3 y7 \9 q
end;& D" g! F& ?7 L9 C+ a
end; -- of the method5 o$ x3 M1 S5 e% B; W8 I: a. ^7 V
|