/* called by: entrance ctrl of the object 'track'& Q4 l& P. {0 e4 k' c+ `
*/
% Z( M: c1 \2 H8 P3 bis5 `; S# }0 q- f. V. M' I6 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: D" [" k4 |9 H. U a, U
do7 p4 r8 G Q+ x9 E* c+ u# q* K7 C
Lan := rootfolder.Internal.Tools.AOLlanguage;/ b5 C K# [ J" ]0 A- Y
if current = @.Destination -- else return! j* j" l0 N' [$ h) u
then( D+ b# F/ h7 l/ w- Y1 N
@.Destination := void;
9 L) u6 u) Q# S& d" c if @.occupied then
9 I- w1 x6 a1 i Q) u part := @.cont;; E8 A0 ^0 E. s( J
@.transpOrder := void;' y5 ]$ I( ^* c' z" J! Z( U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) h" d$ N5 V. o" P) n @,root.eventcontroller.simTime);* H# _- U# K* `6 [$ |! I
@.HasOrder := false;
: @" Q* @1 t) }7 L8 M! X4 }8 A# P/ ^ @.DrivingHome := true;! @9 `4 O( t$ T0 l( K% ]7 R, w$ j: C
rgManager.tryToStartTransOrder;3 B8 u) p& @( X, U+ h" {
if @.Destination = void& }0 t) ~/ W/ p! x7 Y. r. `; o
then -- no transport order for vehicle @
* \' M8 G9 j& O7 { @.Destination :=3 A$ a- O+ K% N* ]% I0 L% N5 u- S( j
rgManager.nearestFreeStation(@,track.~);1 \6 `4 e& n' z/ e! I6 ^% P, I
newDirection(@);
% R# |6 O0 q$ X- }4 n# G1 D if @.Destination /= void then# h g9 N1 Z) |. I- ]
@.Destination.NumReservation :=- r- j$ F2 t" N+ h( k4 G5 `' L
@.Destination.NumReservation + 1;
9 O0 @3 ? b9 d( v end;
+ Q* k+ \! O: M# r( [# W% x @.CurrIcon := "drivingHome";
9 W1 S' k# o# L% C) P+ g3 d @.DrivingHome := true;
& I5 A+ o5 E8 j* _) o; U, n9 t end;( [2 D, o( b' C5 c" c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) U0 H: @$ [4 \1 Q: C" ~; @
part := @.transpOrder;
: n8 {5 z0 t$ m6 _: G0 {9 c" P" ^ part.move(@);-- load part- ~, A% f7 E! o' I: Z! Y; j
@.CurrIcon := "load";
' d) D5 l/ I# e( p GlobalDistObj := part.globDestination;0 w/ q: n; H( k v! k
assignLObj := rgmanager.rgAssignL;
! c5 Y5 C* b6 S row := assignLObj.getRowNo(GlobalDistObj);
% @4 T& r4 d s3 H0 @ if Row = -1 then -- since 70
( P/ E- Y$ m' ^ if lan=1 then. q# E( y' j- M1 V/ D C! [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& L `& r' _! g+ L9 \ A to_str("in der Andockstation: \"",?.~.name,"\"")); A! z! `* v4 L+ ]" M
else: @( p& l+ G. p: w7 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% O/ Y4 T P0 n* \$ c5 k
to_str("in docking station: \"",?.~.name,"\"")); ; c! S# s8 L# @' `- ^- Y
end;$ R' P: Z: x+ y$ f8 c
else- y$ H* }% e( d. o
@.Destination := assignLObj[1,row];
9 C- K( ~& Q9 W0 |2 C end; 1 r( U' a/ a% a, S, \1 \
newDirection(@);
& d+ c; u2 }" L/ I! c9 ?3 o F @.HasOrder := true;1 d- [+ }- Y9 u' o
end;/ ]8 k/ N* |) _( L% S
end;
. k3 v( V. Q3 f8 R4 W0 p6 T, Pend; -- of the method9 ^+ H1 t' F' ^8 i- |1 G
|