/* called by: entrance ctrl of the object 'track'
; x' D' `. L5 g# H3 Z; C*/! q2 [- |6 R1 ~
is+ z6 d$ X" h- O& z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 |! |/ J( n: Q2 w6 e
do
; H1 F4 o, m, A2 P1 K Lan := rootfolder.Internal.Tools.AOLlanguage;
a- D. M( {8 {3 }, J" e: h if current = @.Destination -- else return
! c1 Y* U1 H+ |" F$ M- q then3 L# n4 n* E& W% @- F
@.Destination := void;- Z$ A2 r! Y2 d( i1 O
if @.occupied then; t9 F6 v: d6 Q+ x$ @2 a- Q" x
part := @.cont;
! Y" W) p8 }' O, y5 z @.transpOrder := void;
2 b9 S' z* H8 Q+ T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, Z& h9 j9 Z; d4 r j @,root.eventcontroller.simTime);' i8 b* u7 g: J- @" ~: c9 u" A
@.HasOrder := false;
6 `+ P! I" u) e8 D$ \ k& F @.DrivingHome := true;
- O+ o) J" E3 V' O- B% ]* n rgManager.tryToStartTransOrder;8 q3 n" f1 k8 Y9 J: C
if @.Destination = void
: f/ D3 p% ^ [ then -- no transport order for vehicle @
; S: \3 X0 a" ]: c9 ^0 Y9 A! h% h2 P @.Destination :=
/ L/ m+ e& G# ~8 x rgManager.nearestFreeStation(@,track.~);
! B: }2 L: b2 P/ J/ J newDirection(@); 1 ]2 w" x, b5 }
if @.Destination /= void then
% W1 A N3 Z* v) ]* z: x# y" v7 b @.Destination.NumReservation :=4 D' y0 F% T1 c; \. K
@.Destination.NumReservation + 1;- Z3 Z1 v6 o% G4 ^" l4 H
end;
0 B0 q1 w5 T+ o- _) a* i0 R @.CurrIcon := "drivingHome";
3 E C* W# V9 G @.DrivingHome := true;3 g' i1 b7 p, g' ]/ \6 l+ e
end;
5 Q! g' n2 \6 u3 {$ ~/ |0 ]+ f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" O; n5 L. |( E& l part := @.transpOrder;
. \/ u# p+ L$ C6 A part.move(@);-- load part
( D# j. W l: C9 E& Q3 X @.CurrIcon := "load";( i- _* ? @7 ~; ~
GlobalDistObj := part.globDestination; R) |' p2 L- V _
assignLObj := rgmanager.rgAssignL;7 ]8 K$ ]* ~0 V: e
row := assignLObj.getRowNo(GlobalDistObj);& u9 v2 _9 Z) h# \9 n2 s
if Row = -1 then -- since 70# i- S9 i4 }) B- V; R9 }
if lan=1 then
4 S% o/ M- X$ S. _' I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 R- _% V' l* x; e3 `$ s" f
to_str("in der Andockstation: \"",?.~.name,"\""));
) [ N' @- l5 O% h* D; M- k5 M+ | else/ p/ L) }. t2 x" {7 c! c; O( f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, h4 f% I2 u ~6 {+ N$ s to_str("in docking station: \"",?.~.name,"\"")); n, n' q- l# r1 E) L# S
end;
( y2 n; x& ~$ [; \ else
; J0 e- F5 V( p# R @.Destination := assignLObj[1,row];
) a% g) c1 R w( C! k end; . T7 t, G3 x9 x7 r
newDirection(@);2 ~' r6 o* C5 x, l
@.HasOrder := true;+ m, o* b0 G5 \8 m! w
end;
: V) ]9 y! w9 S# a, e7 K' C( P end;
$ z' b, V2 _# dend; -- of the method4 z: f1 K( S; A% F
|