/* called by: entrance ctrl of the object 'track'
- ]0 Z0 t% r$ ]- P: n*/
) O7 Z% o2 H5 q1 _6 t; y/ L0 xis
P) i) k, q, h- X7 E6 u/ L( K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. N8 b) \( s3 d$ ~do, `; _8 |! G$ A ]5 G
Lan := rootfolder.Internal.Tools.AOLlanguage; U. m( r5 Y6 K% V' n7 d' V; v
if current = @.Destination -- else return
# V: P9 k8 W( C" ~ S then, C- Y' G9 e) p. _
@.Destination := void;
% G! Y: b1 J5 p" @" y# H! p if @.occupied then
+ F7 f6 u0 q! h. C part := @.cont;
% O5 b i3 R- {. c. v1 c' P) E @.transpOrder := void;
. S. [/ k! [; l& C. m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 W5 o& r2 s: F/ L" h5 s" t/ E; w
@,root.eventcontroller.simTime);& j- f, L" F$ A: x, L: J/ X
@.HasOrder := false;
" z; ?0 J- Q2 o& z* f9 \3 i T @.DrivingHome := true;( j: n: j6 ^, f( ~5 C
rgManager.tryToStartTransOrder;. v9 o% w% ^( r! B( u0 n# B! c
if @.Destination = void
+ v/ J8 K! d* S. [ then -- no transport order for vehicle @
# I# z0 Z, {* z* }' J @.Destination :=5 v& N% Z, Y; c% S2 W
rgManager.nearestFreeStation(@,track.~);
7 j6 J4 E8 z3 q0 ~ newDirection(@); + O2 }) j2 y% W
if @.Destination /= void then
' ~* M, y% p4 i$ P @.Destination.NumReservation :=
% |: o% R7 S$ A) M2 N8 Z @.Destination.NumReservation + 1;
, [' R. J7 ^ Q end;2 p5 E/ h: C' F7 A2 _+ D
@.CurrIcon := "drivingHome";! L+ h+ Y- F( {" A# e8 T1 r7 Z0 p# I
@.DrivingHome := true;
, |: h1 Q3 {! {7 D4 w end;
) O3 V8 y6 M1 o9 F; W% y, d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ `+ }; p8 Q) t0 u+ m6 P& k part := @.transpOrder;0 R6 O: x i8 m2 O# K3 W0 T
part.move(@);-- load part
( Z9 G/ c! f4 }$ q @.CurrIcon := "load";
3 v7 L7 ]/ q) V4 H GlobalDistObj := part.globDestination;
# c9 Q( I3 r1 O7 W assignLObj := rgmanager.rgAssignL;
- h* ^$ F# z3 O# Z row := assignLObj.getRowNo(GlobalDistObj);
* o: Z; P& O2 \! j/ ^. P ^ if Row = -1 then -- since 70
' @: \& `# n$ y8 |( D1 s* r" U7 k; N if lan=1 then
G3 ~/ k$ S, a: y7 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, e$ {/ h: ~/ Y' x9 b/ s
to_str("in der Andockstation: \"",?.~.name,"\""));& s: k1 a& @! u
else) @+ u2 B4 T) X, {' N5 J( v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) m7 Q I" B: i% W/ [/ f) J e0 c
to_str("in docking station: \"",?.~.name,"\"")); & ?% e7 v& c1 Y: E7 s5 |( J& ^% I
end;& ^0 w3 R/ x- _; h0 C7 h
else- K& y! w3 p: p* I& F* W I$ ?
@.Destination := assignLObj[1,row];2 L. f9 ]2 G% L8 n+ m
end; . a( d2 u5 c) w4 Z
newDirection(@);3 f, `3 s/ `9 K
@.HasOrder := true;1 p% K4 F( e9 Z3 q
end;7 F9 X' A: ^/ Q
end;9 V8 h7 s6 A4 l U
end; -- of the method# R% |2 {! I! g& p4 h: e
|