/* called by: entrance ctrl of the object 'track'. h; l! P. o% [; X. T4 F
*/0 e/ G$ F K5 N
is% B2 X- B& m5 s: o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 M% w- E4 ^6 ~do
; c2 \7 ~6 x$ z* t: N Lan := rootfolder.Internal.Tools.AOLlanguage;- B, K9 g0 w. V2 K6 F* c
if current = @.Destination -- else return
& A& h/ h& h3 W# w+ H5 h then6 @0 o; ^" n& T9 v2 T2 r1 O
@.Destination := void; f1 |! z$ i, d% e6 k
if @.occupied then
7 k6 R1 K K; c$ d" q; M* |4 s part := @.cont;) K0 y+ d, d' S2 t" W9 j
@.transpOrder := void;
- A/ l8 Z* [/ T! W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 V/ z6 L8 Y: G; Y @,root.eventcontroller.simTime);' @) m. t! S1 d h; O9 x8 D+ G
@.HasOrder := false;
: T7 B( c5 q" `( k# N* L @.DrivingHome := true;
& m. O+ K. N# A0 ]7 L8 B5 B; T0 w rgManager.tryToStartTransOrder;
8 I+ K4 o/ M! a$ F8 { if @.Destination = void
7 |- A; Y, \8 B; T- T5 c then -- no transport order for vehicle @2 T6 c0 T. b* S$ b3 ?3 n$ f! a
@.Destination :=
/ V! ^( y1 p& r2 a8 F* k rgManager.nearestFreeStation(@,track.~);
% U8 e' C4 [. l0 s X" ?! H newDirection(@); + M6 Q# A0 I+ Q
if @.Destination /= void then- U3 S. n, l! p/ v
@.Destination.NumReservation :=0 c) U& B- E) k R0 Q" m
@.Destination.NumReservation + 1;! L( J6 w/ Z+ \4 @
end;
5 w6 L `, }/ L* V: Z0 Y @.CurrIcon := "drivingHome";+ r# h9 O0 Y6 m/ [
@.DrivingHome := true;% C/ c1 L) z- l$ u' D
end;8 L$ U8 M2 I- H( K8 L F, X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% g* M5 N# I, T) D) H* Z part := @.transpOrder;( y) t$ X" e' l9 S% V: e3 s0 h
part.move(@);-- load part5 U" z2 l5 g) i6 u
@.CurrIcon := "load";1 n2 D4 {! t7 J( Q# ~/ e
GlobalDistObj := part.globDestination;
! r0 \7 E' B+ R$ j7 n9 T assignLObj := rgmanager.rgAssignL;
& t/ Y2 }8 d0 p* w row := assignLObj.getRowNo(GlobalDistObj);7 y4 h8 Y; f5 v% f7 i l
if Row = -1 then -- since 708 {$ `( R' `4 y" z2 V0 I
if lan=1 then
7 m3 j0 r6 ^; j# c- L; e* ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) |7 ~) X: |, U% d to_str("in der Andockstation: \"",?.~.name,"\""));
* r3 r/ i6 E* h) c6 z ^2 D$ l4 { else
1 r( ^( u. L% ~) ~5 _4 Q: t g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 c0 w2 a5 E2 g5 ^
to_str("in docking station: \"",?.~.name,"\"")); 1 l' ?/ q+ `8 H( h
end;4 H* ~ {( f& L4 E; f
else
+ a+ k; i3 ~- n/ ]1 h& E _ @.Destination := assignLObj[1,row];! x3 x! ]. S D6 c
end; V6 u: E; U% E
newDirection(@);0 C! F6 x# a0 Q5 \( X
@.HasOrder := true;3 o' a- z( f7 A" N+ J
end;
. ]6 U, q7 E' c end;0 Q9 W1 z' d' ~) t/ h t) O, D; Q
end; -- of the method# A7 W8 [/ x1 `! V% y! ?! n
|