/* called by: entrance ctrl of the object 'track'& u: V0 t9 ]4 L6 e
*/9 y. {, J" H# H7 v+ o
is
% o& y' H W$ V3 ^+ Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Q6 ?! [, T7 m7 S R$ c1 Ldo( @$ {: d2 G8 F# A
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 F6 L$ U0 v, T if current = @.Destination -- else return
+ |$ P& _* H1 v. C- }& e! u then
6 P) [* Q( s6 t8 ]- z @.Destination := void;6 Z. r+ b0 r3 l) W9 f8 i
if @.occupied then* Y; K8 V" e: n% B& P
part := @.cont;
7 U' ~$ }! \) `+ f1 r+ g' T( p @.transpOrder := void;& l! E" y1 U+ t' k3 X2 |6 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 O! X+ l! g' }( z- ?" q* j9 F' P
@,root.eventcontroller.simTime);4 _7 \" L% s; c8 a" G$ \, g8 |8 b
@.HasOrder := false;
: ^: T, D3 }$ z! i. H7 J. v$ _ @.DrivingHome := true;2 @" V/ q6 ]2 v( E3 ^2 F
rgManager.tryToStartTransOrder;. T' U8 E# U+ C. d/ F
if @.Destination = void
0 F) C, D' E: a0 Z) K) I then -- no transport order for vehicle @
% B% {% d% |$ O- C9 g9 i. L( N @.Destination :=
2 B0 \, P3 I, j" s- z rgManager.nearestFreeStation(@,track.~);
' z, i& Q: |) V c, U+ ^3 ~& I newDirection(@); * v. D9 n0 s& h+ ~+ q6 ~) N6 c! e" d
if @.Destination /= void then
* `6 C% v8 H' Z( B" ^' [$ B @.Destination.NumReservation :=
/ e& w; y5 l& n# C! S' C @.Destination.NumReservation + 1;
% E; ~( ~. T7 g6 o5 @3 s1 ? end;. A9 @- N. Z% K5 W4 r2 F! D: B
@.CurrIcon := "drivingHome";
1 g; {' [$ q8 w. h @.DrivingHome := true;
+ x# e2 t) h9 n. {$ {$ }; ] end;4 Q( ]1 j2 g+ g; p2 m- Z: o! I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 ~! A' T: \8 v, Q4 f part := @.transpOrder;
7 y7 ]# _5 J: Z9 I part.move(@);-- load part9 n/ I# ]% V4 q* d* q2 v
@.CurrIcon := "load";
3 Y0 z( X& J9 h' F: w- h0 x GlobalDistObj := part.globDestination;
! ~2 n3 H# a5 [2 R. @7 J assignLObj := rgmanager.rgAssignL;8 y4 B2 \- D' g8 h! P0 h2 ^; c
row := assignLObj.getRowNo(GlobalDistObj);# g4 l5 F! f/ H9 r3 \) I# k
if Row = -1 then -- since 70
" g, }) p [: J/ }. ?5 D8 g/ ^0 e' G if lan=1 then6 a( K" I/ Z* q2 w. K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( `/ T6 u G4 }# G
to_str("in der Andockstation: \"",?.~.name,"\""));
4 l# c" K# l& V" D0 G6 ?# J else
# A7 c% X8 ~3 }$ c( E8 y) W1 }0 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 ` O+ v; j" L! h" l" l
to_str("in docking station: \"",?.~.name,"\"")); & D! a8 p3 p$ w, E! u
end;; B/ K; `: B# k; L+ b7 |
else6 F/ u; e3 u0 A* R7 s
@.Destination := assignLObj[1,row];" }0 h. L9 N: ~
end;
7 [" N6 [( p, W" G newDirection(@);- y" g' u! Q: e6 k- {% l3 B' i
@.HasOrder := true;/ l2 w1 w: M6 s. m
end;- j5 u) X0 ?* y B( P; n
end;
% r9 Q5 n# G8 i2 N1 } d, cend; -- of the method; g% w* _# ?0 c. F5 S7 _
|