/* called by: entrance ctrl of the object 'track'
# d5 B- M6 u2 w- \*/6 B' |5 w: }& y! u
is
. x+ f) U/ ?2 p, G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 i' e8 `" t1 h1 kdo
1 w* |4 {3 s' l' c) S Lan := rootfolder.Internal.Tools.AOLlanguage;1 Q5 L' O$ v* l8 Y% v) V7 s
if current = @.Destination -- else return
. B. O" \3 ~- c4 M* n T then
^ U1 N5 g" B+ Q$ T' ?) M- e4 _ @.Destination := void;# i2 Q6 O8 A1 V. K z0 r
if @.occupied then. _* G% u( j: }$ ]* W9 U# s' p
part := @.cont;
7 q2 U+ |$ k/ c! e- `/ ]+ c' F5 b" G @.transpOrder := void;7 W( h( m2 s9 o+ m+ l0 t+ U8 v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( ?$ W5 Q6 a% ?5 y @,root.eventcontroller.simTime);
$ ~5 h# x7 p3 T, l @.HasOrder := false;- X/ ^7 S7 n2 J+ d; d
@.DrivingHome := true;
) u' n, S( \8 f) w# A rgManager.tryToStartTransOrder;
# O6 _5 k1 n' L& [" D& { if @.Destination = void% _6 A# j9 v3 }& C/ M4 c0 \" z
then -- no transport order for vehicle @9 x1 V1 m* J! O
@.Destination :=& [4 v$ d% y$ C- x( w8 U5 o' c
rgManager.nearestFreeStation(@,track.~);5 J( U" x2 \. O# y4 j/ B5 M
newDirection(@); : q u/ d- ^# t! n, k- U
if @.Destination /= void then
% q e6 L7 s) e. {2 m1 p* g @.Destination.NumReservation :=; k+ ~" I4 Q+ F
@.Destination.NumReservation + 1;
! N5 a( m! H& X9 k end;
* t! v% r! h% F0 \. |8 c @.CurrIcon := "drivingHome";
0 D5 l4 I* A0 p* ~+ t' ?) L @.DrivingHome := true;; H% r& U& E. X; z$ X* ?
end;
! n4 t o: N: \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station c k7 t/ o, L9 i9 M4 `+ R$ G
part := @.transpOrder;
- _) o' b2 O4 x! z' F! I7 m7 M part.move(@);-- load part
) {# h9 c3 n+ R# K$ b2 a6 S @.CurrIcon := "load";0 C4 x2 ^: Z i3 M7 p
GlobalDistObj := part.globDestination;
; d9 H/ h$ W- ?/ I) T assignLObj := rgmanager.rgAssignL;
' V# l$ D! T; y6 ^3 u& { row := assignLObj.getRowNo(GlobalDistObj);- C9 S" N, V* h2 n0 _* O
if Row = -1 then -- since 70
; f. V) l1 y i/ I, p$ w: ? if lan=1 then' _ R B# Q! T$ ^6 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 }0 f. c/ h2 e
to_str("in der Andockstation: \"",?.~.name,"\""));% ?8 R& P9 C$ z; S
else& f/ s8 {. G% @) f5 L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 R6 n/ V- n3 [7 Q0 ^, J3 \9 [6 K0 j to_str("in docking station: \"",?.~.name,"\""));
( k! d- }8 [7 U8 S; G- L( ? end;
& j8 y' z% T$ b7 i: C) a) W9 U- z4 j$ D else
' V" \" C0 q+ e9 S* y* P @.Destination := assignLObj[1,row];
3 X1 ^4 k5 F% ^ |& V4 B& y# r end;
' a0 P3 L, Z5 }- t$ w4 Q newDirection(@);
}4 J6 g9 N/ r8 m- ] @.HasOrder := true;
( ?1 a$ _+ P2 V- q! d8 J* D5 t- p end; ^; _( O1 ~" W$ i
end;) m" ?- H K. e/ X& K
end; -- of the method3 G0 m0 j& {" u9 C. E+ U- |
|