/* called by: entrance ctrl of the object 'track'
- f+ X4 F! `& s e7 y*/; M, N8 T' j& z$ k
is3 I) Z1 N6 N4 w. r! Y' d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ c% I1 l* q! ?$ n/ I
do8 _2 B6 O5 M3 C& y! k
Lan := rootfolder.Internal.Tools.AOLlanguage;
' P( X8 h" ]9 |: a if current = @.Destination -- else return. f0 k- i! e/ N$ F5 q" Q1 w2 h
then5 ?! r: l- l* T2 z
@.Destination := void;
) G" b, j: d& z& U+ e% _4 _ if @.occupied then
! S9 @9 v# ?/ p8 G4 A$ Z part := @.cont;- y- ^5 c+ s* A$ G# g
@.transpOrder := void;
2 F3 t& _! Z3 x' M4 v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ p2 {2 t& o# f W S @,root.eventcontroller.simTime);# R9 |8 j3 F' u/ F" c% t2 y
@.HasOrder := false;* [0 K# I/ j# }. ]2 q7 H, M
@.DrivingHome := true;2 ?! F L5 P" }9 Q& V) P" T- t; f) x
rgManager.tryToStartTransOrder;
+ C4 N) F- Z- x5 T3 D* W if @.Destination = void) I1 Z9 v( n4 I8 a, ^/ k2 P8 j
then -- no transport order for vehicle @
- L: {* S# u$ W @.Destination :=0 t7 v$ g0 y4 z& j
rgManager.nearestFreeStation(@,track.~);
1 b" M! C+ ?3 \ newDirection(@);
6 ?; h8 `. @. i if @.Destination /= void then
2 Z' ]7 `' j9 N, ]0 x# I @.Destination.NumReservation :=
, u) z4 m$ Z+ O& ~$ d2 O9 E3 c @.Destination.NumReservation + 1;
# }) c* z3 o( y9 K ~: T% d end;
. a) E N* R1 D+ [ @.CurrIcon := "drivingHome";
" M% u8 z0 `3 k& @1 ] @.DrivingHome := true;* n+ g l' X) w
end;
: q& Z! R* F" T) j |* f& d else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 T" X1 [" j7 E: ~ D! G
part := @.transpOrder;( A% ]: x# v- w; _% p
part.move(@);-- load part
# v0 C0 f w$ z C% ` Y G+ N4 E @.CurrIcon := "load";
* _, E0 C- ~5 { S, i$ } GlobalDistObj := part.globDestination;8 H2 C6 ^; r3 W1 u! _
assignLObj := rgmanager.rgAssignL;
: N" d% W K$ O; D row := assignLObj.getRowNo(GlobalDistObj);4 ^+ h+ \* p9 n) ~2 a, Z4 K
if Row = -1 then -- since 70
8 w/ Z9 X5 {" M. P if lan=1 then% z' p3 B$ x5 x! `4 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# u( t0 Z5 G* F to_str("in der Andockstation: \"",?.~.name,"\""));) Z9 v5 c. ]# n6 _# k- {2 x: k
else' j- _3 q, Z/ p+ S' s$ f+ K9 N# m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 t4 ?8 ^3 H' ^
to_str("in docking station: \"",?.~.name,"\""));
3 a% k+ e4 \* x$ b end;
0 h, U: g4 F4 S, ]9 h else! s' Y- b4 Z Z& Q) o! q) |
@.Destination := assignLObj[1,row];, p3 U! v. Q7 j# g
end;
* Y6 @. _0 F' }$ X newDirection(@);
: d( c6 ~8 G. h1 Z2 ?3 S% `4 l @.HasOrder := true;
6 G: r: j& ?8 t3 r6 W# G3 K5 \ end;
5 h- C8 c. B3 X' h9 u end;
. f1 G* S& B V# i+ h$ P" lend; -- of the method' @+ Z3 s: c1 x5 ^0 W5 [
|