/* called by: entrance ctrl of the object 'track' y; O% I; Z8 c' l* p$ N2 H
*/
, g2 q- V. T% U' x8 V2 e1 Nis1 ]1 W# j4 g1 Q" U0 k" l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, \! U# p4 S, Q* _# Mdo- @$ U( ?5 K- p$ \: X
Lan := rootfolder.Internal.Tools.AOLlanguage;
! y% \0 L# p' O+ d* ]3 M; F0 f5 D$ g ` if current = @.Destination -- else return+ A" _/ M& D& Q( O1 ~( o
then
/ _; t) x& j9 q, y; A7 ?$ } @.Destination := void;3 v+ W( c! J3 m" m8 O F8 M
if @.occupied then
- t7 A7 s( t3 T* R6 d6 |0 {6 P( B9 ~ part := @.cont;
. X8 k: H$ u1 j7 g- @ @.transpOrder := void;
+ T3 i: x3 U b- X. p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' A2 R8 a$ P( s @,root.eventcontroller.simTime);
5 a) K6 J1 y1 q, f9 H' D/ e @.HasOrder := false;
; t. c: ]6 A6 g# p$ U! u D @.DrivingHome := true;
0 f# f" l$ b; g# ^. Q( O rgManager.tryToStartTransOrder;" L2 h1 h0 N3 T# W( S
if @.Destination = void; n8 g; I8 b8 ?7 k* _
then -- no transport order for vehicle @4 p5 v3 B. E* T
@.Destination :=
$ S% z9 J- d, U' p- x' B& l% D rgManager.nearestFreeStation(@,track.~);8 T! S# J# e! ~% R1 x
newDirection(@); & V: ?- h$ l" z
if @.Destination /= void then
& m& g4 ?+ B- A2 r8 H6 A @.Destination.NumReservation :=. ^- h7 n2 a5 j2 O
@.Destination.NumReservation + 1;$ K# A* S- U1 q# Y. L& ], T
end;
' c7 N3 A8 n# G$ F4 X5 N! G @.CurrIcon := "drivingHome"; O) y- x* O& F7 K
@.DrivingHome := true;
7 a* h4 \. t1 S end;
. r7 z- y5 b4 z$ g( y. Z/ K( j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. @7 s: V$ |1 i9 {# L part := @.transpOrder;) P, H1 S7 z+ X, A& m q1 ?
part.move(@);-- load part- A& h# c2 G$ a0 ?
@.CurrIcon := "load";! R- _0 R. i' v( B
GlobalDistObj := part.globDestination;
3 O; ?. J1 L- ~2 h) H Q7 t assignLObj := rgmanager.rgAssignL;7 Q3 D2 O) Z- G; J
row := assignLObj.getRowNo(GlobalDistObj);
, ?; T; G: G; W+ h |* D if Row = -1 then -- since 70
7 d+ x8 e, t8 V u- I if lan=1 then: K$ s9 D) z! H% }! C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ L8 E; l8 R: N' z8 [/ |, A
to_str("in der Andockstation: \"",?.~.name,"\""));& M# y# m3 b0 ?0 P( @! w5 V; G% @
else
3 Q. j4 T9 z* p2 C O/ I! { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) o. U2 V' ?3 k% i4 e+ g to_str("in docking station: \"",?.~.name,"\"")); 5 Z* f0 u6 y. G/ c$ `
end;4 c# Z4 R, I) |0 ?. x; ]! q2 k
else2 {. t8 _' O- y! ~) g
@.Destination := assignLObj[1,row];
) j, k4 i* A+ S& T+ p' T end;
& t0 T4 U8 i* ?! \7 X( n3 s newDirection(@);/ A3 n) p' S' _' `# |
@.HasOrder := true;4 i, [1 D! N$ E& o9 ]/ o! T& ]3 F
end;
( o6 |5 M* N6 c# D- F1 ]( N( _7 V end;
, K5 h0 F, A+ g% o7 wend; -- of the method" R: t% s# z" f! n5 x. S2 d; h3 L- l/ b
|