/* called by: entrance ctrl of the object 'track'
, @$ B7 ^$ p2 r/ i8 _9 {& [9 Y*/
2 F/ d1 S4 a. i# @8 R: \is' R( |- B, n7 C; t: K5 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: ^5 a1 i% v( N7 L# v h" {- n1 h
do' ^4 R: k5 e5 x1 x& w) I
Lan := rootfolder.Internal.Tools.AOLlanguage;, t( `" X, J( @
if current = @.Destination -- else return# r& J- l7 X9 f0 y
then
8 |) I7 |, R7 q: H% N @.Destination := void;0 C1 ^! w4 B* Q4 Z5 _
if @.occupied then" `, ]+ p$ Z% n: {2 _9 h5 H
part := @.cont;, D E+ d) a0 `) H
@.transpOrder := void;
. P" z! y( `7 I- [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," Q7 H1 S) P! ^' o8 A$ _
@,root.eventcontroller.simTime);& }8 q+ o0 }* v" S- b: y
@.HasOrder := false;
) [8 Y+ f: @% p7 ^! G( x @.DrivingHome := true;
( q/ m% C3 o: X1 k6 I& C rgManager.tryToStartTransOrder;
' h5 {5 ` _7 V4 K, \% c if @.Destination = void
" ], W m5 f- a& f6 p then -- no transport order for vehicle @
0 L8 A3 Q' c" L1 h% P7 I2 Q @.Destination :=2 {* D( N) W. M$ B8 D% ~8 T1 m
rgManager.nearestFreeStation(@,track.~);
8 v* q/ r: \4 ^8 ~. {1 M G newDirection(@);
/ w* T7 T' l5 B/ o3 t% u/ d( N2 H9 [ if @.Destination /= void then
% y0 M# b+ S$ {9 n8 F @.Destination.NumReservation :=* \6 ?/ e5 m# e: e
@.Destination.NumReservation + 1;/ H- U7 [5 s8 S, h4 ~1 f' L. y- m
end;& R4 G2 I d# H- A! r a
@.CurrIcon := "drivingHome";
7 N% J* Y) U3 j3 S9 I3 n0 `/ [ @.DrivingHome := true;
! {" F9 R% ^6 i/ M" R end;
0 l3 x1 d: e [! v else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ d- y \' u( P E9 D F6 y2 T
part := @.transpOrder;0 a% w3 p. e3 ?8 F2 M$ H
part.move(@);-- load part" @; O1 B+ V% z
@.CurrIcon := "load";
" Y3 t- ^0 s( Q* \ GlobalDistObj := part.globDestination;+ z$ r7 k5 |* \. F8 K: b& h
assignLObj := rgmanager.rgAssignL;. r0 f2 v* W4 m) b8 E
row := assignLObj.getRowNo(GlobalDistObj);
) w- R9 _' P7 D5 q if Row = -1 then -- since 70
( i* G; D" s9 g& M# B if lan=1 then* ~! U4 e% g2 U" ` v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- P( p+ R5 K/ Q7 o8 V4 k7 E3 V& F) V
to_str("in der Andockstation: \"",?.~.name,"\""));
- c/ e7 Y6 _5 I else
' G6 D* G/ [& A) K* b7 F7 v$ a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), m+ O% v N7 v! s# m7 [5 L1 o- v
to_str("in docking station: \"",?.~.name,"\"")); * F6 L B9 O! [7 P
end;
, S, Z" b8 M- t9 _4 G& S else# o! S/ ]$ Q8 R) m4 s M
@.Destination := assignLObj[1,row];
/ \! M k# [! ^1 | end; 1 \2 R% X, V; T9 H
newDirection(@);$ S7 ^; O' w: s. _& C* t
@.HasOrder := true;. _' k5 Q: C6 ~* x/ }; F* y. @
end;" R/ O# w: A2 \9 @
end;
: K* d" T) h2 T# D$ e% r8 pend; -- of the method8 E+ I* ~# p, _9 B# M% Y$ ? I! W
|