/* called by: entrance ctrl of the object 'track'
, I! w5 ?3 Z, w6 m' Z*/" M/ b: i# [0 p4 a
is
* Y+ V3 o6 {) k8 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ^# J+ \0 [& C0 @: k& Sdo4 U" Z, C+ {- Z$ A# M5 C; X! U
Lan := rootfolder.Internal.Tools.AOLlanguage;0 H! l) _) `: I" L n% P
if current = @.Destination -- else return" j: S* l, L) k6 {" ^+ @: a; k
then1 e; S8 h) v! F( A3 E( S4 {
@.Destination := void;: a+ u6 a% O$ Q# @, e4 u% w
if @.occupied then) M* O# E+ @$ G& F5 @ ]; G
part := @.cont;# N( t! T; |" q( f
@.transpOrder := void;
9 ^! W, k" |& K) n3 ^1 Z' ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 Q h$ R' E8 P' ?; b3 F
@,root.eventcontroller.simTime);
$ s1 h h, n( P. S @.HasOrder := false;
* Y3 M( B4 ]2 Q4 _3 I7 }) O+ G @.DrivingHome := true;
1 ^) ~6 e8 Q) v$ o" ~7 N' z rgManager.tryToStartTransOrder;
# p( [ \) G# z. x, F( y$ ^ if @.Destination = void7 M' Q+ E+ G0 R5 S, ^8 w3 e( _ H# W$ g
then -- no transport order for vehicle @! l* r- a8 o/ |4 l3 P0 ?7 k" D
@.Destination :=
2 B2 a. w7 R. U2 o' o/ |' x# F rgManager.nearestFreeStation(@,track.~);
, F( w* J& a) t1 r9 V$ k newDirection(@); * ~0 P$ ^% Y" T7 g
if @.Destination /= void then+ s( M9 Y" B5 c3 u9 z. |
@.Destination.NumReservation := ^# r7 X, ]3 t. z( B) D6 Y
@.Destination.NumReservation + 1;
- R# m4 [$ R- x/ ?; q end;
' X% ~; a t, O1 k8 t; k! ~ @.CurrIcon := "drivingHome";9 o6 l$ p! S6 \9 ?/ t/ g0 Z3 h
@.DrivingHome := true;+ s4 N8 R) I0 d8 O8 C/ N
end;3 k& W& `( k" ^0 p2 u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 F" c! o1 S- s part := @.transpOrder;
( P/ F0 o6 C0 p part.move(@);-- load part z5 x7 o ~$ s$ b3 P
@.CurrIcon := "load";" v/ ^* i% N/ b! b! b
GlobalDistObj := part.globDestination;% l* Y, M8 C" w [
assignLObj := rgmanager.rgAssignL;
]+ t: p) i' a5 q row := assignLObj.getRowNo(GlobalDistObj);1 a& n4 P& w2 K7 O5 `
if Row = -1 then -- since 70! @* a9 `0 |* G. o. G: i. y
if lan=1 then+ H F" c3 U& d1 g$ \, o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 I5 P$ ~' m8 O" K
to_str("in der Andockstation: \"",?.~.name,"\""));* ]# q" n2 x3 `
else |0 g, K0 k/ O5 Q: r" ~6 z/ f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: z: X3 u @# C& H3 p/ ~ to_str("in docking station: \"",?.~.name,"\"")); 1 b# T% [0 I x) L U4 Q' h* L7 x
end;
4 W* ^/ T: Z" i, M3 q, G! V* V else
; S% i5 e' W7 K0 Y' V+ b1 J2 s* y% U @.Destination := assignLObj[1,row];
% Y9 X+ \1 D- N p7 A end;
# N- x2 u1 [& N9 ^ newDirection(@);. n/ h3 O' H( G6 w
@.HasOrder := true;
, f5 ]9 r+ p& b$ E4 E end;" r Z9 k2 v+ S5 _/ e. B2 X- I
end;
' x9 |* ]1 `( x6 v, ~, e. _: uend; -- of the method! y! m; ~) {2 v/ e% N$ Z/ U
|