/* called by: entrance ctrl of the object 'track'1 F# N- c( J* K' Z' U- w
*/) K; E( ]1 T# N" d7 Y
is3 d: @( ^/ r% o2 l" q$ \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 V0 k# g* C) E8 z8 C
do/ k! @) v5 r/ L/ C( p) @
Lan := rootfolder.Internal.Tools.AOLlanguage;8 N @, @' D! Y8 l5 ?( u3 r) A
if current = @.Destination -- else return
: F3 p: b+ e* P" Z" @- L- M then0 \& {( h1 D/ s. h6 x3 [
@.Destination := void;
2 N+ n* Y( l$ e J* { if @.occupied then
# w5 K+ N. Y o7 I& L: o part := @.cont;
4 P9 r0 o& W; }' j# ~ @.transpOrder := void;* R: W7 v& @4 ~: j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' V: T# z" e) s
@,root.eventcontroller.simTime);0 u4 _' M7 I3 Y) V+ P* O
@.HasOrder := false;
1 {6 d6 O3 P7 a- }! _# U2 j6 e) B4 m @.DrivingHome := true;+ b* {6 m% D! q" u# Q+ t* m- E, B
rgManager.tryToStartTransOrder;+ h: ]7 h& }5 L% @2 Q- U2 c
if @.Destination = void! e# @6 t" A3 ]" e Y0 `) I
then -- no transport order for vehicle @
$ I, S8 c$ v1 r# @$ i @.Destination :=
; s! t& B9 B7 G. ], k rgManager.nearestFreeStation(@,track.~);
0 m) u; z) y* m) [/ o x' a newDirection(@); * m9 K, l6 j$ [- ^6 L" C( \5 b
if @.Destination /= void then E2 |4 `: [( i
@.Destination.NumReservation :=% i4 R, K4 O& [. x
@.Destination.NumReservation + 1;7 ^+ M m8 s, [# a2 {
end;# T% `7 J3 O0 a# E
@.CurrIcon := "drivingHome";
) Z/ @' n- O( m! z7 W) O @.DrivingHome := true;# S1 E# K! O( i1 X- t
end;
) {: ], }, B8 {3 Y E3 Y' g+ \4 n, k else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 E" v" [; B0 p8 o1 k0 d
part := @.transpOrder;- n) R O/ ~' `! D4 a1 U# e0 I
part.move(@);-- load part
2 u/ ]% H3 S7 A4 n3 y4 F @.CurrIcon := "load";
6 {- w3 S$ C6 N& ] G GlobalDistObj := part.globDestination;
4 m6 L, F2 A# ^: o% F% t+ P$ E assignLObj := rgmanager.rgAssignL;8 K8 \7 K% u% w3 u5 L( Z
row := assignLObj.getRowNo(GlobalDistObj);5 ?7 l" A! |0 n% h8 k
if Row = -1 then -- since 70
" l- l: g/ n5 ]* |0 T$ u7 l6 @6 x if lan=1 then: ]% U. s) t- f" b3 o' h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ~/ h I% T) U2 F; c$ {' l
to_str("in der Andockstation: \"",?.~.name,"\""));& |& z% g! f& J* f4 ~" O6 {- D
else& _* d# M( d1 Y6 n2 U, P# p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 y, {5 J2 S' B: k to_str("in docking station: \"",?.~.name,"\"")); ! ~3 R" |# c" K9 S1 \7 Z
end;+ I% r9 y3 p/ N* I! k
else' B2 K9 F$ a0 D7 g1 y
@.Destination := assignLObj[1,row];$ m5 A' v! f1 }. q. C- s' V
end;
" ^+ g6 J4 y) r/ T, H newDirection(@);. ^4 Q* }. S1 Y) Z9 \
@.HasOrder := true;
. S( c7 ~- B( L% x+ }! X end;
. W2 ^8 a' j6 K, `" Y' `* F' s' \ end;
6 x4 P, d/ @* p0 U- I: [' L4 fend; -- of the method
5 w; ]$ V1 ]* C" y |