/* called by: entrance ctrl of the object 'track'; t% A f5 f5 l1 n$ `( G8 d! }
*/
6 _4 o' c) |4 {is% P( { M% n! Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' a. v- [+ n' q* o4 z3 X0 G
do* B) f `7 B f& N+ G- l$ @6 Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 y& R* g: Q' C+ \! D0 X) L* D if current = @.Destination -- else return
7 g- _1 N6 i/ }$ I then
$ C! `5 K/ F% n3 r0 O/ W @.Destination := void;
# |2 s0 {- G$ X# i; r' K( ? if @.occupied then8 ], V/ G+ h' L+ ~- h9 K
part := @.cont;) Q k+ T! }- U; P
@.transpOrder := void;+ w/ H$ |9 v0 i9 ~) K/ i/ ?7 Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 d! k) [4 ~# R9 t2 ]" ]: B( G$ @
@,root.eventcontroller.simTime); `: i4 S& ?7 D1 C/ K& _
@.HasOrder := false;
) ^+ K& h3 E& b% K @.DrivingHome := true;0 b- K# k) X( K3 q+ \ Y
rgManager.tryToStartTransOrder;. b/ s. n6 @; a9 o
if @.Destination = void
C' s- e" u+ l u then -- no transport order for vehicle @8 {' g- c4 `+ r( h$ R: P" i
@.Destination :=2 h& x9 f* n: v2 q5 H4 `4 q, L
rgManager.nearestFreeStation(@,track.~);& T. }+ s$ l% w" L
newDirection(@); . ?8 v+ H( H0 Z$ @
if @.Destination /= void then, D* g# e" e2 ?" X$ G
@.Destination.NumReservation :=
# a0 O+ R5 N. l @.Destination.NumReservation + 1;
) P+ z2 |. g Q' ?1 ^9 X end;; [" @: x& f5 ?% I
@.CurrIcon := "drivingHome";
* Z# z! i' K0 O @.DrivingHome := true;2 l; N9 T2 ~4 N) f1 p" Q B
end;
+ e% `, _# ^$ q0 o$ ]6 @6 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station! N' @ P' J# I/ S/ H
part := @.transpOrder;& ] Z- I1 E& f" T, h
part.move(@);-- load part9 I# X! T; q+ W7 n) Y- x! b$ I4 m
@.CurrIcon := "load";
. z6 r# C2 t$ S' L0 S! x GlobalDistObj := part.globDestination;6 G) y y6 M- ]& t% F
assignLObj := rgmanager.rgAssignL;
- l* q7 ~$ L1 C row := assignLObj.getRowNo(GlobalDistObj);
' i5 d* T+ M# |6 [# ?+ c if Row = -1 then -- since 70
- w0 ^$ ?$ L/ g5 r' w if lan=1 then+ h% H2 b9 O9 n4 i$ ]; D7 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, `" x$ g/ V7 w- C3 g$ q to_str("in der Andockstation: \"",?.~.name,"\""));
- @, H- `( F* Z$ a( T$ u# d6 O else
! n/ q9 d! e! k h, ?( { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( b" x+ z; ]: H9 [. z4 u) n9 x to_str("in docking station: \"",?.~.name,"\""));
5 U' F, b$ d- F* r1 j9 R end;2 X# V4 Y4 \$ `* m# M- }5 n
else
. x. j! {; ^; v6 l; ] @.Destination := assignLObj[1,row];
7 ~( l& C8 J% D L- x- b" l, t end; ) x% [5 j6 [9 {! j+ V5 L- T+ j
newDirection(@);
) ^5 X7 X5 B9 n1 A# p4 ^! G @.HasOrder := true; w# N+ d6 \+ A
end;8 i4 k6 B b4 W/ u4 {; H
end;" q, K* j9 V& U8 E3 _
end; -- of the method8 A$ Y* @8 @5 y2 p6 e8 g& O
|