/* called by: entrance ctrl of the object 'track'0 Z+ l, s* P7 p4 K
*/. c$ ^2 L3 J* i
is) j1 V0 L$ E/ n8 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! n+ @+ @( T. m! q0 C8 qdo' p9 v2 v$ [, r; z) `5 W3 }- Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
- N2 x; L% u t if current = @.Destination -- else return0 v3 W% S1 z$ q" R
then
# l" W; b- U8 w8 {5 R( S @.Destination := void;+ y2 m% Y1 }7 V$ v& x
if @.occupied then% ]1 |& n8 d; K6 a% J
part := @.cont;8 |5 `* G, A- Q/ t
@.transpOrder := void;4 C# {/ a0 q; d( y& c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 P: b1 ]/ l; | @,root.eventcontroller.simTime);5 ~* f! o/ c" R/ }4 X8 s4 O
@.HasOrder := false;# ~* x. Z8 g% D, C5 `, Z+ X3 c4 s
@.DrivingHome := true;& n' [2 B) }) M0 \
rgManager.tryToStartTransOrder;
# A% d; o' E7 z: b4 l2 ?1 Y if @.Destination = void
9 K* F Z) r( P5 z8 M# D$ D then -- no transport order for vehicle @
* c2 \+ b8 \3 t @.Destination :=
$ j q! j) u. l- p+ ` rgManager.nearestFreeStation(@,track.~);+ }0 J; h) P9 m1 g4 P) e
newDirection(@); " k) z4 d& H: U5 R* f% `
if @.Destination /= void then8 A' Y, m8 h2 z
@.Destination.NumReservation :=$ u3 x# o$ a* o
@.Destination.NumReservation + 1;
3 d8 E8 j' T |: e O0 [# F1 d: U! r) s end;
2 G, C4 ?* b h, ^ @.CurrIcon := "drivingHome";+ i3 L+ G2 a$ E- g: L5 }3 _
@.DrivingHome := true;
& q: q) X' _' {3 b- s1 o, H end;+ p* B1 v3 b/ h% o$ @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, C$ r/ K- } j' E part := @.transpOrder;/ i8 K7 p; v w5 l& E: x
part.move(@);-- load part" k& [: j# y) \
@.CurrIcon := "load";
4 W7 \% R% Q; a' ~1 v& [ GlobalDistObj := part.globDestination;
% t0 r0 i& \: S# J# Q# l assignLObj := rgmanager.rgAssignL;
# @6 S% M! t; L# ` row := assignLObj.getRowNo(GlobalDistObj);- p: X$ z. X- Z9 b! S# p1 _; x
if Row = -1 then -- since 704 q' H, r' P! D0 S# H0 a
if lan=1 then, L& O; C( ]0 `4 I/ N+ _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* A5 F% K3 y9 _ \
to_str("in der Andockstation: \"",?.~.name,"\""));
0 m( t2 q$ ]2 o1 V* x- y! N: ]2 c else
4 I0 n0 z( j+ _9 d, a/ c- y4 ~# Q, X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 b$ x3 o* ^) P, C/ n, e to_str("in docking station: \"",?.~.name,"\""));
& a- U0 f' d0 x- ^' y0 Z! ? end;: ^0 P" v @! ^ g, ^
else3 I$ \3 x( I) f+ \: x* ?
@.Destination := assignLObj[1,row];3 z6 H4 l0 W r4 R Y4 y3 U2 T% H
end;
# l, l1 l' A+ Y& B- ]. N newDirection(@);
6 a5 r S' w/ Y2 v0 \: b @.HasOrder := true;
$ K/ I g3 \- q1 m1 x: W+ V end;; |% ? v, x) V% ^% [2 g9 B
end;
K$ X5 s4 Q3 b* X' D$ Send; -- of the method
# O$ M1 p8 h0 t3 W" @ |