/* called by: entrance ctrl of the object 'track'6 f+ b% Q1 p0 u8 X8 o6 r w# A" m
*/
- \4 \. S, u: r& M8 ~) K$ vis0 E7 B% V* ^6 Q/ o( ]8 _& W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: t/ K7 L {1 A/ Y6 H8 U
do
1 Q; V" K& E, B" u8 ? Lan := rootfolder.Internal.Tools.AOLlanguage;7 k7 D) U" c& f: c/ Q3 D! c
if current = @.Destination -- else return
7 n8 Q7 n0 C4 x W$ ~$ S% q then1 r: G9 a6 u& e- t
@.Destination := void;
, z9 u; h1 ~2 ?9 N( v: v if @.occupied then! o) F4 p! d5 I7 F! O# G) N
part := @.cont;
6 d( C& {& i. H' x# x: r5 Q @.transpOrder := void;( A% d7 \: z8 D4 ^4 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 t$ j0 t& w L& p+ C
@,root.eventcontroller.simTime);
, v q5 ^- |+ p/ e+ a @.HasOrder := false;
4 C+ }; B; I1 v" O$ z* ] @.DrivingHome := true;
3 V/ s& O% j! X# P* x. }% I rgManager.tryToStartTransOrder;
8 E/ _- i0 w- }( G* v L if @.Destination = void( Z: a# U% P# ~2 O' t
then -- no transport order for vehicle @
2 n" o" r, g) r0 c @.Destination :=
# U8 T. Y" t! m: |9 C rgManager.nearestFreeStation(@,track.~);5 N* x. t0 S2 g/ Q' h! v, a( z
newDirection(@);
& F5 T# X3 k. `; d/ }) }0 ^. q+ ? if @.Destination /= void then
- V2 ~- a: T: O @.Destination.NumReservation :=
" t6 I& s( x' Q @.Destination.NumReservation + 1;
- m. v& _' Z/ E+ P" W! u end;, q$ w) `% T N2 b
@.CurrIcon := "drivingHome";& W' Z [0 J- p- Y$ x+ H, t& G7 e0 V
@.DrivingHome := true;- k- N0 p* L6 a( \
end;
: E6 a, ?( X' f else -- the vehicle @ is empty, both vehicle and part are in the same dock station( Z0 t- T5 V. p, y' C/ H+ D N, V# V
part := @.transpOrder;
- ?1 u8 z6 e: Y part.move(@);-- load part
2 z5 a2 |- r) i7 I4 r/ X @.CurrIcon := "load";
, }: x% x3 S5 H0 z- j GlobalDistObj := part.globDestination;; _" A+ b# g5 h1 j+ ~2 w
assignLObj := rgmanager.rgAssignL;2 Q G8 M. y2 z# L0 c& k. C
row := assignLObj.getRowNo(GlobalDistObj);! p4 K6 m3 Z! j4 [; o9 l J7 F H: N
if Row = -1 then -- since 70
# E( Z4 m6 g' I if lan=1 then
/ \' y2 G7 W1 H3 C' l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), B. q. r( V% M! L& O. Y
to_str("in der Andockstation: \"",?.~.name,"\""));
- I4 C# h( s9 G9 A/ N- b else
8 @2 ^# Z/ u+ l1 x- B1 G, U- l; s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 g0 s9 ?) _, Y
to_str("in docking station: \"",?.~.name,"\"")); 0 w, G. F v- ^) d6 D" I
end;
0 L) h( v7 c& y# y) G8 M. K else
0 U5 [# Q% O/ J) c6 M @.Destination := assignLObj[1,row];6 g& n# V3 L* l4 J7 T n* H
end; 9 T- q) ]# |7 w5 v. ]; o( ~
newDirection(@);
. b% z6 J4 ~* N/ b: I% ^3 H) e) Z @.HasOrder := true;- i; |9 S3 U# Q4 V; d6 y8 }
end;% B" L6 L2 T- g9 ]; K
end;
6 _2 I" e) {" E% h. D/ qend; -- of the method
9 E2 A/ H) X% y7 M+ v |