/* called by: entrance ctrl of the object 'track'
, F4 p2 C2 l# v6 _. v# P*/6 D+ G5 E3 _ D* M$ [
is
- ^+ O& j4 }2 o5 N2 U9 P. f6 J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 ~, W% o3 M. x% v3 Z9 N2 w2 hdo+ j1 [* L; D6 k5 o* H
Lan := rootfolder.Internal.Tools.AOLlanguage;
) K; o* Y/ [5 f if current = @.Destination -- else return/ `6 p4 E- b, R
then6 U" i( p; q; H' I J
@.Destination := void;
8 ?# N! N7 Y$ Z4 ]& i if @.occupied then. L. i I) \- m
part := @.cont;' \( w% }9 p( }
@.transpOrder := void;
# h( ?: n7 M2 _3 a! R- Z) n& ~' X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: y, u& K4 R3 S2 v. E
@,root.eventcontroller.simTime);) q8 T2 C" P: t+ p
@.HasOrder := false;4 ^- s: |$ T4 _2 n* u6 o
@.DrivingHome := true;
# o j* {, t# F$ K. b, { rgManager.tryToStartTransOrder;
4 V$ v- I& o- x& Z if @.Destination = void' i" X- W2 ^+ T! B: O/ e5 C6 Z5 k
then -- no transport order for vehicle @& M, R) |5 h! d7 Z/ `
@.Destination :=7 K$ H" U8 g0 C: m; J
rgManager.nearestFreeStation(@,track.~);" W7 E8 |2 d1 j
newDirection(@); # X! e- c9 Z* f5 t3 `( t. q
if @.Destination /= void then0 V6 r/ Y! G4 q
@.Destination.NumReservation :=
0 v( }4 f5 u+ S3 o* R7 t @.Destination.NumReservation + 1;$ c/ e8 ?# r: b2 L: F
end;! a# _$ v7 [6 \$ r+ `
@.CurrIcon := "drivingHome";
% {. b4 i4 [* }" P @.DrivingHome := true;5 J! Q' D* y0 k
end;
5 T) T' J; U. j! Y$ S, ?; W* Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" }- u1 O8 C8 }5 r( G6 \9 p part := @.transpOrder;
- E/ K3 X+ D0 _6 B6 T' z part.move(@);-- load part
+ R+ e2 O$ {" h8 A @.CurrIcon := "load";- a. D8 r$ k/ B4 \5 d
GlobalDistObj := part.globDestination;. f2 |, o7 \( u/ r1 W2 I
assignLObj := rgmanager.rgAssignL;
" p# s, u# D4 v row := assignLObj.getRowNo(GlobalDistObj);
" H8 {' a$ m+ q" @2 f* [; O if Row = -1 then -- since 70
) S! t* @5 Y1 S/ x if lan=1 then8 }1 b; s$ w' E! F! c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; h$ w& q O5 X) W; Z1 n B
to_str("in der Andockstation: \"",?.~.name,"\""));( f5 o0 u+ z6 F/ z
else |# ?# P& t$ a, S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: \1 @7 y, q. K: f& [ to_str("in docking station: \"",?.~.name,"\"")); ( }0 Y* F6 p, `1 }5 \: J
end;9 _# V5 P* v/ i9 X t! r! t" Y
else3 v |/ q! z2 K! B7 f% a3 Q
@.Destination := assignLObj[1,row];* k" G) L8 |) R% ?" D- S* h
end;
# e+ s. R6 y7 \+ k+ r b. v2 r newDirection(@);+ z! j$ x4 ^0 v5 G* A8 b
@.HasOrder := true;
. H7 s5 t' [( c- u" L end;/ c( [9 f! v+ F9 w0 A
end;* A$ n' d4 Q* ^' M
end; -- of the method8 k2 @; D, t& z. V* K
|