/* called by: entrance ctrl of the object 'track'5 W7 A6 {: |# f+ ^. t9 S
*/
' I! O N a! c! n0 His9 z3 n" h h, ^) ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' }9 P# W3 M$ g$ D7 N
do
M* |8 d9 e/ P# b. F8 }, Q Lan := rootfolder.Internal.Tools.AOLlanguage;
8 H$ M3 @. I- K1 ^$ s if current = @.Destination -- else return
8 Y, y t5 \7 e& T% A9 ~ then0 F: X# X6 Z6 X- Z0 v E: J/ Q$ U
@.Destination := void;& l( @' M# R1 ^$ s# N# v! y) q$ p
if @.occupied then
) ?3 y" K6 Y/ g part := @.cont;
- Z! Q: B+ X- K% X% @ @.transpOrder := void;- p6 |3 b. c6 Z4 D& M+ _9 i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# \2 @ \/ ?: W( i+ G0 Z @,root.eventcontroller.simTime);$ Z0 C( Z7 ^4 L2 n0 P
@.HasOrder := false;3 A0 v( B+ V6 z2 h) R8 w e
@.DrivingHome := true;
' x5 \# G% X3 r rgManager.tryToStartTransOrder;: q. x9 c( o% T, n4 u1 O8 V( F
if @.Destination = void3 P2 P4 u- f$ [! f; g
then -- no transport order for vehicle @# X; D4 ?: \/ [* ~
@.Destination :=
0 j! }5 s# I* \7 | rgManager.nearestFreeStation(@,track.~);+ I2 Z1 `) ` {- t
newDirection(@);
" q. ?7 ^1 U) q; M) D A8 t- _6 x if @.Destination /= void then
& x5 J. k4 y3 Y& |# d& R7 k- y @.Destination.NumReservation :=$ K2 ~- P' Q) @$ M- s! R+ b
@.Destination.NumReservation + 1;4 B; g% d0 }! u1 K6 _
end;
, f- b) |% x" M* f @.CurrIcon := "drivingHome";
% T0 b6 `5 ~: Y, Q. x. p @.DrivingHome := true;% d* T# e, d1 z" R3 R9 c$ H5 d
end; q# v0 _% M9 R. q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 t. v: v6 G0 I
part := @.transpOrder;5 E0 A# G9 W% ~6 c) [* i
part.move(@);-- load part* V7 T8 a) m& d8 B" ?$ C! g
@.CurrIcon := "load";
( n: J; B" U! }& n* E2 `' t: I% G GlobalDistObj := part.globDestination;1 T! W" N$ z9 ?
assignLObj := rgmanager.rgAssignL;
3 }8 G {2 S2 V* h [- I$ e$ P8 f4 d row := assignLObj.getRowNo(GlobalDistObj);6 B R3 O" S" l% C3 x r
if Row = -1 then -- since 70
: Q! B5 D6 O( ^) E& i8 B if lan=1 then
9 s# \2 ~; O/ g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ h) f4 Z+ ^$ ]: S0 j
to_str("in der Andockstation: \"",?.~.name,"\""));
! l& a* z' N# m- U/ W9 z/ ` else* |& D" f7 E: M/ E# j Y2 X6 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 n; S) o6 A/ {. X3 V- V/ X" A
to_str("in docking station: \"",?.~.name,"\"")); " X/ n3 V4 X& l- s4 [% Q
end;
: ?4 J6 f# X) t' A B. F# ^: X else
" b& q4 Y+ S+ s$ Y# t# y: _" F @.Destination := assignLObj[1,row];
2 r$ \4 b* }0 k5 U9 z2 d. ^ end; 9 |% t ~% U7 L' O4 J- f7 r8 @
newDirection(@);! D( x1 e2 @3 w7 G$ _
@.HasOrder := true;" \0 b* L+ @- t; [& }% W
end;
5 v l7 E2 X+ c4 ` end;
" W; W- b) Z4 \0 L6 X. K, Dend; -- of the method
6 p0 I, ~: m H! l! Y4 ^0 g$ R |