/* called by: entrance ctrl of the object 'track'
9 h" n6 |: k9 Z+ I$ m*/
9 I( H: _, n: t- @+ F R2 }is
% f3 V, ?/ b) ^9 ^! j part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 T5 ]$ D& X9 V# ]
do9 k& l9 R8 d, D+ {/ o
Lan := rootfolder.Internal.Tools.AOLlanguage;6 A s, P* V. a; b
if current = @.Destination -- else return0 M7 L0 [7 j5 x
then
. j: R) i$ R/ P) ~- Z. e @.Destination := void;
/ i) p5 } J K/ @5 O2 g7 c6 i; S if @.occupied then2 J2 G# X% E1 d5 P* F, t3 J/ P
part := @.cont;9 L' C1 F7 w+ o4 i* }
@.transpOrder := void;
: s8 s$ h5 U |; r6 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 z9 f4 c+ o, Q; h8 c6 y2 B @,root.eventcontroller.simTime);% F5 x1 H+ E. U- L' h- R
@.HasOrder := false;
+ z4 k( a. m% o" M @.DrivingHome := true;
) t! W1 C2 \% g5 m! y2 e* G rgManager.tryToStartTransOrder;
& R9 L3 D& F0 A6 ^ if @.Destination = void
* R: ] ?/ U: A) v then -- no transport order for vehicle @: k4 Y, }& | [- t D
@.Destination :=
$ |3 ]3 t1 u) e9 U: F' W( ? rgManager.nearestFreeStation(@,track.~);
- T2 W2 P ~' z8 `6 ]4 ^ newDirection(@);
- y/ K# n _4 f7 R1 D3 _. I if @.Destination /= void then: ]- f# L X& K6 g
@.Destination.NumReservation :=
5 G) \4 I3 P9 i O @.Destination.NumReservation + 1;
, z, v" q/ w4 l8 Q2 ~7 @& W. r7 ^ end;9 D" w h5 U+ J3 f/ d7 f
@.CurrIcon := "drivingHome";+ g' r1 W! y# m! f" m3 `/ a
@.DrivingHome := true;% c$ P: m% `8 D0 w- U* G8 |- H
end;
3 H# | }4 ^2 n D2 q( n4 m8 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ J6 h1 ~1 J9 E% ?$ H- A- K
part := @.transpOrder;
8 w2 @- v7 k( S% g* }# O part.move(@);-- load part
! }- n+ E0 g: C5 i @.CurrIcon := "load";
" i) J! K& e5 e8 H7 e GlobalDistObj := part.globDestination;' y& u' ^0 c& w! O5 S" a% u
assignLObj := rgmanager.rgAssignL; L, a) b- N* y5 g$ r0 F
row := assignLObj.getRowNo(GlobalDistObj);* }" j& ]+ d% S4 n3 s
if Row = -1 then -- since 709 I4 Y w! Q% w3 j U
if lan=1 then% @' ?& i' s- r3 e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- ~, z- O3 Q; r3 U, z to_str("in der Andockstation: \"",?.~.name,"\""));1 }: o$ j. M* w
else9 b P& ]# Q, ? ^" R% m$ d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% {1 z2 [5 @( J" M/ i% b
to_str("in docking station: \"",?.~.name,"\"")); ) l9 \4 P" H& J4 {& u
end;1 ^' q" p2 \6 |0 C1 b% m4 }3 P* h
else/ e2 b1 `1 b& Y" x; k/ `4 E+ V! {, U
@.Destination := assignLObj[1,row];5 o2 ~+ |4 G" f. r6 t! i3 K
end;
1 d3 l# z' B) [7 b) G newDirection(@);! w! o- V1 c9 i# E6 V) \) d1 H
@.HasOrder := true;; K& S* M9 E) t
end;, d u _: u6 Z6 W
end;7 ~- A* ?7 n5 @* E1 b. ~+ b
end; -- of the method1 r! j, @! i9 Z# \+ i- O$ C
|