/* called by: entrance ctrl of the object 'track'
, E0 B: N2 n9 l1 L*/
# ~7 d& P5 Y, q! R8 Lis4 R8 ]4 j3 X/ G6 \# \5 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% d6 X) s: ~$ j- _7 c, H4 Sdo1 T$ P& l' ?$ G5 X" K
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 j9 `# c' A3 I+ P% u; R6 ? if current = @.Destination -- else return- O: P( M& ~6 N2 q5 R/ z! |& \
then
. v9 y; j l2 X% F: k @.Destination := void;
9 [( ~- W: ^! ~% a$ M2 Q# R if @.occupied then
- N" Q7 O$ H, I7 @5 b- ? part := @.cont;2 R4 e- v+ D0 j a( _& K
@.transpOrder := void;
( B; S; O! F8 S' s7 h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ M' q) a6 c! l/ J @,root.eventcontroller.simTime);) \& V3 m8 q1 b0 Z! b- e
@.HasOrder := false;
) j9 l3 i/ q2 p' A& r- c( s6 e @.DrivingHome := true;
r+ t& M$ }6 V9 f2 ^3 k& F1 E& J rgManager.tryToStartTransOrder;
% K0 D* ^/ D y7 D" \" | if @.Destination = void6 A# N( f' x! C
then -- no transport order for vehicle @
) @* [7 T0 O/ Q) `, e( a( Z# a6 | @.Destination :=
! N9 c' z# }* ?0 n% {! ] rgManager.nearestFreeStation(@,track.~);
( [( H4 `1 z5 X Z# P newDirection(@); 2 G/ ~. \# m) [/ T0 ?- c
if @.Destination /= void then" b/ @( @0 ]* c; Y+ x
@.Destination.NumReservation :=
7 D: D: E4 ^3 {2 N! F! } @.Destination.NumReservation + 1;. v* Y- H. I9 m% ]
end;& k/ Z2 I' `) A. O8 `
@.CurrIcon := "drivingHome";& s* J- Z+ x* P3 ^* ~) |
@.DrivingHome := true;- d0 f6 Y; r: v* x7 d5 O, _0 ~# s8 |
end;! S- z" ?/ u7 J+ F3 i( t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# X+ K- ?) w( T+ ~% n part := @.transpOrder;& [8 P8 C6 b5 c+ E1 d3 F
part.move(@);-- load part
& ~* Y* J% U9 t0 R- H2 | @.CurrIcon := "load";+ ]5 g( l6 p, E# U
GlobalDistObj := part.globDestination;
: `/ ~# Q0 |5 n* a) C e* A assignLObj := rgmanager.rgAssignL;, G! M8 m: s" M% {$ a
row := assignLObj.getRowNo(GlobalDistObj);
5 y3 V5 e6 o% L) t if Row = -1 then -- since 70' P3 L+ N4 i2 F/ q2 X& } A
if lan=1 then" ?* J6 V s, Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" c: x: o4 y5 l$ r to_str("in der Andockstation: \"",?.~.name,"\""));/ }9 o: U& z0 e/ F8 e( p I2 F
else9 Y$ w; r' s$ {! a4 X& n& q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, n; e# E _* [( P7 l) R
to_str("in docking station: \"",?.~.name,"\"")); / G/ U4 ?' e! {, \! U8 E6 p; l
end;
8 {/ j1 p1 x" w7 Q) k else
% j' I3 }6 |4 J7 |% T @.Destination := assignLObj[1,row];$ C2 j% X" o3 Y( l9 c3 _5 d! |
end; 1 ?3 u" M o3 } x
newDirection(@);
8 b* j8 J: O- M3 [1 y @.HasOrder := true;3 L. h1 M8 [& j; J4 n* T3 w" V
end;; Q% Q5 F% U* K3 k
end;
$ r' z+ M+ a% z/ Vend; -- of the method0 J6 Q1 i! g7 d2 h6 ^& |) x. E$ n; B
|