/* called by: entrance ctrl of the object 'track'/ {% l( y4 n, J) n% C% D
*/) T) W0 L* _6 U
is8 Y! w1 t9 b& ]: T! T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 k1 U: X5 _7 q A8 P( qdo( @$ S* n' q& \8 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
' I) N: J5 ?) S& r if current = @.Destination -- else return$ W, [+ ~1 }9 s& U4 A
then1 c8 j, L% J; [# W Q
@.Destination := void;* S$ @# L2 K) V ~$ c7 Q
if @.occupied then
% l. w' E' i' w# b part := @.cont;
! I' Y. i& u% ? w @.transpOrder := void;
1 o: N9 P/ ^9 u8 F9 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' \" g7 c" d5 H5 ?) [ @,root.eventcontroller.simTime);" k& W3 w' B7 P: A& u+ L
@.HasOrder := false;
, |; M, |/ I( p" z# F4 b/ e7 }* J @.DrivingHome := true;. h, Y* o; D! u! V# m9 C/ N* e9 _
rgManager.tryToStartTransOrder;' e9 M, G; E+ k2 W$ U* \
if @.Destination = void! U# ?/ w- [6 y- [0 P7 `, w
then -- no transport order for vehicle @
- E) _; i) |) e( M- T @.Destination :=0 h( ?8 \4 Z! ^5 ^& L
rgManager.nearestFreeStation(@,track.~);
5 H/ }6 k- @: V* a+ z newDirection(@); 7 |& m! P+ M. f- M' F" s( ?
if @.Destination /= void then5 l* n: ? V0 x- o3 g! G
@.Destination.NumReservation :=# a' X2 W7 t; [/ w" ]
@.Destination.NumReservation + 1;
# S y: T3 }2 n' s0 m- l( w4 t end;
\6 N2 i$ N% O5 r8 r8 s3 ]7 o @.CurrIcon := "drivingHome";; \# c; @1 L% w& b) l0 p3 Z0 R
@.DrivingHome := true;
& O: p: x- Z6 I0 o! @# x. h3 m7 s end;0 `1 O0 s2 }# b: d/ R3 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 U+ A' a' }0 e4 b. o; a$ a7 z0 y! Y
part := @.transpOrder;
5 h0 K( q% f t- ~: q part.move(@);-- load part, t% J6 E5 c! }% e
@.CurrIcon := "load";
/ j( V! R: l% ` GlobalDistObj := part.globDestination;. [6 q" \2 v& n4 }- q9 r; |
assignLObj := rgmanager.rgAssignL;& W, ]) F& K& e$ N
row := assignLObj.getRowNo(GlobalDistObj);
, i, o' p7 R0 u if Row = -1 then -- since 70
+ e: S7 u! E) o if lan=1 then) x0 i) s7 M! L* s* K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& H$ l: E1 [" o# S) Z to_str("in der Andockstation: \"",?.~.name,"\""));
# R! a7 ~; @ K/ ^. W else
' r4 P! \0 x! k. k3 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) Q1 y4 o, H" S' Y" X) z& l' W to_str("in docking station: \"",?.~.name,"\"")); % s1 j: x; C# M% G7 l
end;$ Y5 u$ p, U& v `- l
else) v6 F% U1 f8 ~- |# K) W: Q
@.Destination := assignLObj[1,row];
0 K0 l4 D; i2 x! G3 X% }& h' j end; B8 t: n; O) X. C0 V. u9 Y a4 T
newDirection(@);
5 y2 X+ a! Q1 s' \; z @.HasOrder := true;
7 t/ q. ?6 a4 [: X2 [) o; L end;$ a: l2 P5 {7 Q
end;
. ^# ^, W2 _! fend; -- of the method2 G; M2 {9 o8 ^) A9 ?# }( m: I. D7 T
|