/* called by: entrance ctrl of the object 'track'% D+ X" i9 K! K5 T
*/* ~$ d n8 k( z1 N9 {$ T
is
" p. X! V% }# U6 S4 M$ b2 B part, GlobalDistObj, assignLObj:object;row,Lan:integer;. u, x' g$ L/ w+ F
do
9 f+ Z) S4 L9 d% C, Z% W6 A Lan := rootfolder.Internal.Tools.AOLlanguage;
5 g" z) V9 P( ^! Y if current = @.Destination -- else return
) l* r) ]4 N" G; ` then
8 s% ^9 a6 Z0 S$ I' ? @.Destination := void;/ Q* K% g% U( u6 b
if @.occupied then0 m/ _5 V# q- M/ F* ?' R$ y
part := @.cont;5 }4 Y0 a% k! r! S! A, o/ F+ I
@.transpOrder := void;
7 f I- X$ Z. Y5 A% x+ O3 B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 l/ n. ` p" N8 f @,root.eventcontroller.simTime);# W. |: j* ?8 V) T: m' W- c
@.HasOrder := false;7 i# w( E Q4 L6 j* W
@.DrivingHome := true;+ _! J) F/ n$ ~% p% K1 F) K6 ?3 R2 e
rgManager.tryToStartTransOrder;9 c5 o0 C* B+ L9 f2 t0 B% H+ N1 r
if @.Destination = void
3 z8 c& t4 \- ^% O( F# y2 o* G then -- no transport order for vehicle @
6 N {9 n4 B; l1 o2 S @.Destination :=8 g! }5 W1 d1 C, _% z) h
rgManager.nearestFreeStation(@,track.~);
6 [. b) x" x$ ~$ l6 I5 M: x5 c newDirection(@);
0 g- z9 P7 K b' [8 K if @.Destination /= void then- C" g" w' D3 u, f& `0 ^0 A1 r
@.Destination.NumReservation :=4 {5 p, H0 P6 H3 I6 b2 h
@.Destination.NumReservation + 1;
9 a/ s- H/ Q5 r8 z, V, `# \! J end;+ j: G# Z! {: J) H* m
@.CurrIcon := "drivingHome";
, ]) O+ Y, y' @5 h @.DrivingHome := true;5 N9 O1 e1 j% l# b/ J* F6 Z1 h2 W5 n
end;2 s5 }/ s0 K; L9 ~+ ~; d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 } x2 q* v& C# k6 d9 n0 H5 b( P part := @.transpOrder;. s* Z- d: c5 K* T# q; Q
part.move(@);-- load part7 x. ~- C* d- Z& m$ d* j; m
@.CurrIcon := "load";
" a" O" |& u, ~9 y6 } GlobalDistObj := part.globDestination;
! }. P2 B: X/ Y' @( W! [ assignLObj := rgmanager.rgAssignL;0 ~& p \* s/ E6 T9 [
row := assignLObj.getRowNo(GlobalDistObj);
( Z. \ o4 }( U2 j. T if Row = -1 then -- since 70
C! o6 |* r6 q* A A9 G* l4 U if lan=1 then" m- _+ I5 `1 w8 i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! t3 ]; Z3 ?5 H" {- n) C! y
to_str("in der Andockstation: \"",?.~.name,"\""));, t/ Y; J8 Q! [/ s7 }
else: B. j. D; o2 M/ d* f U) ]* q% D. ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 x7 {4 M0 i, Q. o# t2 w0 u0 |
to_str("in docking station: \"",?.~.name,"\"")); , y- n7 _. h) w& {3 h* {& n* h
end;* p2 e' }3 j6 p& x) h N% K
else
8 p) ?7 A& X6 I4 x0 e1 u, H @.Destination := assignLObj[1,row];$ f% b9 ~% ^1 n9 W1 {
end;
1 p- `0 V& i; x# ? newDirection(@);5 ?- i \" v4 J' `9 y
@.HasOrder := true;5 ~+ U: v: [$ V! B( ?; T
end;
; G* U0 H* R: K! J* B( d. `, ` end;
$ ^7 Q+ `9 g+ ^+ ^end; -- of the method" e+ z9 e* J5 i7 d$ N8 Y
|