/* called by: entrance ctrl of the object 'track'9 }9 y9 ?. m4 [, A- L* B
*/2 g/ K% z- N7 e9 { l' a
is
1 R; S1 |- K# v0 O- R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* {7 c: t! C" P$ F$ Ido
; [: `- v! c: x( ]2 K5 R' G6 V: z Lan := rootfolder.Internal.Tools.AOLlanguage;% m! R6 C v8 s7 f) Y% D
if current = @.Destination -- else return
2 w' c1 s9 [. ]' ?$ ^6 {) J then
6 o$ M+ ?( C; V( V9 s/ h @.Destination := void;
9 _' I! k' L4 k if @.occupied then
9 I! ~, a- \! O* r6 P; O% S/ o part := @.cont;- ^* x& `4 t5 M }
@.transpOrder := void;
2 F. ?8 Z( P# f& k5 O6 l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) X, X0 u9 a8 J( t @,root.eventcontroller.simTime); E2 A N; ^0 c+ g
@.HasOrder := false;
0 [4 F! w5 d- ]/ x# Q" R" { @.DrivingHome := true;
/ D g, c" `1 v% F4 P& R rgManager.tryToStartTransOrder;: b1 v, c3 |( ]5 R& F
if @.Destination = void
- K# j, d2 Y" f) S% a3 I1 G then -- no transport order for vehicle @
5 V+ G: _( V, _ @.Destination :=3 l a& {; \4 J! [
rgManager.nearestFreeStation(@,track.~);
`' o1 V" g6 t newDirection(@);
' ]4 O O) [; P: m8 J. Y9 N) g if @.Destination /= void then! u' s# A6 Z( }% g; ?
@.Destination.NumReservation :=4 T7 g: R" M" F* p- m2 I
@.Destination.NumReservation + 1;: B- X3 \. H# _
end;+ ]3 O* G8 X& \6 r. ^0 N
@.CurrIcon := "drivingHome";6 X2 g5 e, k, a& f+ H: [: O
@.DrivingHome := true;
* q/ y( Q# y' P: Q N end;
5 h* H- `! P2 A' i m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) l# ~! |! M% z7 o% j% }1 b! u part := @.transpOrder;# J( y& n3 K l& p9 x
part.move(@);-- load part" m1 C6 h, E% ]& t# d4 S+ W
@.CurrIcon := "load";4 ~9 j% a- r$ _1 I% J/ X5 m
GlobalDistObj := part.globDestination;" L/ o0 N. z1 v4 l# ?; R6 U
assignLObj := rgmanager.rgAssignL;
$ S, A: c/ B; k; d9 ~# T& U# L row := assignLObj.getRowNo(GlobalDistObj);5 T; E2 _) o9 l4 @ O# C3 s: |6 Y
if Row = -1 then -- since 70
7 B, C: L# x$ {5 m if lan=1 then. n& \# G5 d& G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' i( H6 G1 U8 X) x/ E
to_str("in der Andockstation: \"",?.~.name,"\""));' V; L7 I/ r$ J) e' Y& C+ E* Y
else( l7 L7 i1 l9 ?, z, |; m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# L% I& K7 X: [% n* g
to_str("in docking station: \"",?.~.name,"\"")); # _9 E& Q2 l8 ]# z8 J
end;
B0 r+ f5 A h+ Z" O* S else
& ~% V1 B" V: t! {3 E* J @.Destination := assignLObj[1,row];" A4 l1 g6 J6 F! x
end;
3 E" s$ [, i+ p) f newDirection(@);
8 a1 R6 K- B3 S, v( r6 L& a @.HasOrder := true;# f. R G) J1 l5 ^9 g6 i* C
end;
9 V# @: X1 L4 K. ]! g7 U end;
& N0 _; `- h0 h6 G! bend; -- of the method @ y7 r) P$ R Z; ?
|