/* called by: entrance ctrl of the object 'track'; D7 r/ H: B( m
*/
) Y8 }: i7 B* r% N$ i# ris. Q8 |6 n1 B4 i k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 h, D) @5 x& J, v
do2 |+ Z: k' f7 g0 Z2 u
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ e0 S7 V+ I1 X4 i+ i k2 p if current = @.Destination -- else return3 Q3 Q/ U$ f o
then# `9 l. x" n9 j5 a3 z* G4 X
@.Destination := void;
+ O3 y3 _) f: |- y; U& I if @.occupied then
" n6 y1 B9 ]- D( g part := @.cont;
3 ^3 F! E, y- { @.transpOrder := void;
) T) q9 {. ]# n! K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 j+ H: f5 D0 F% C4 J$ x
@,root.eventcontroller.simTime);- h+ z0 [6 H, y. ^/ J
@.HasOrder := false;2 a: ]3 k7 L& }5 i1 q, i
@.DrivingHome := true;
- O. O4 B# R, j: r9 \' l rgManager.tryToStartTransOrder;
! B! ?& V! t; D3 X6 A2 Z; k if @.Destination = void* o* c& l, \7 y0 O4 L0 W% v, x
then -- no transport order for vehicle @
4 l: }2 t! ]3 I2 E @.Destination :=0 _! d0 s6 ~3 d0 G
rgManager.nearestFreeStation(@,track.~);% Z' h3 O1 S' `3 f! y+ C1 ?5 O+ H
newDirection(@); $ h4 o& V5 ]$ M9 ? H+ ]9 j
if @.Destination /= void then
$ a* e# ?6 ?( |+ C @.Destination.NumReservation :=; I8 ^6 ], U" O( }" \. D- E. v7 ^; f
@.Destination.NumReservation + 1;/ M! [: ]/ Z# l% h1 s l2 q6 ]
end; P* l% A% `, _/ S8 o
@.CurrIcon := "drivingHome";3 o" T6 {& `" o- I' J
@.DrivingHome := true;
# y7 a8 }+ Y* ?- Q( s; ? end;
5 ~ d% k+ a+ S, b5 k2 ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station h- a; F. b$ K
part := @.transpOrder;
1 l' b, J' @# x( x, w, V- D part.move(@);-- load part
' |9 k" d3 A: z; _ @.CurrIcon := "load";$ ]: P+ W2 s0 T0 H3 }; P G* Q
GlobalDistObj := part.globDestination;5 C; g3 @3 R/ e, \
assignLObj := rgmanager.rgAssignL;
$ l6 h- h: m/ Q4 J8 F row := assignLObj.getRowNo(GlobalDistObj);
( X- [- ?: C& t* b8 |2 I2 z& x1 ^ if Row = -1 then -- since 70
/ v" X2 s+ a. l9 Y( \ if lan=1 then
2 z- L. U+ T/ A! D6 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 t; \% C. G' J' } O4 Z4 J
to_str("in der Andockstation: \"",?.~.name,"\""));3 N- j" o! R& h$ [
else
+ ? S3 e# u9 s5 l t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 \) r/ J- a" k$ v5 Z to_str("in docking station: \"",?.~.name,"\""));
+ _& o6 T4 s) m; r3 f end;
9 H/ S" ?) ]" v% C- z else
3 i. v8 g: u% x- d- ? x @.Destination := assignLObj[1,row];* G0 V3 z, M9 w, X) d
end; - u9 l3 h- M- K y5 D* E* q
newDirection(@);( L3 [& k# l3 B1 w" l2 Y- O; s
@.HasOrder := true;
/ q8 Y$ i) c, E end;/ P `, o% G/ [$ D" h% A" h
end;( H) V; A) E, g' t6 t) s
end; -- of the method! o5 {. m9 k3 h: j
|