/* called by: entrance ctrl of the object 'track'
1 \' h; ]- `6 h8 l6 V e* Y* M*/8 T x4 L) O; J
is
$ D8 L1 ^: U5 P+ n6 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 E) h- L+ Z/ jdo3 r* C' U; c$ a* ^- O' U! W R
Lan := rootfolder.Internal.Tools.AOLlanguage;$ g$ W- p" j$ L
if current = @.Destination -- else return- ~. w- C Y5 K+ [7 [, `9 P
then
" L8 z2 H5 v5 L& o3 D @.Destination := void;
5 s" C/ A4 Z' x: k- b6 v' J if @.occupied then' }1 Z/ A8 C3 h1 }# @8 B% e
part := @.cont;7 X3 H2 t6 K3 F- b2 K7 D* A
@.transpOrder := void;
! h7 S7 @$ A2 V% a' C% c+ [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, ]/ D& c6 Q+ n# |( C } y @,root.eventcontroller.simTime);* t, _5 e, j9 j4 I$ U" D
@.HasOrder := false;' d$ T3 F; C7 J l1 [) E
@.DrivingHome := true;
h. [/ v. n* o# K' X rgManager.tryToStartTransOrder;
5 r/ S0 J4 C3 E3 L* h2 l if @.Destination = void
& s0 D+ p( [. @1 \ then -- no transport order for vehicle @0 M9 [1 B5 T9 K) U$ n/ a5 C4 @
@.Destination :=
b. u% @6 {! j) T+ C) ?3 v rgManager.nearestFreeStation(@,track.~);
! w8 H3 o# i$ S8 R* X6 S newDirection(@);
5 D0 h. |/ M& A- h; |6 d if @.Destination /= void then4 B& Q+ k5 N' @/ q# O9 R* ?
@.Destination.NumReservation :=9 y/ \( P* I2 I- P( l
@.Destination.NumReservation + 1;- g1 _3 a* q2 b3 H1 b* _# @
end;
" D5 ]7 M/ J6 U% o4 r @.CurrIcon := "drivingHome";4 t. C) m- P+ n& Z# F8 Y+ ~
@.DrivingHome := true;" a8 D8 p0 S: R5 C4 t
end;
/ ]% d" n7 c- A8 H7 k0 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& N/ ]0 M# b3 O part := @.transpOrder;, _1 |5 |% y: J. U$ y9 q
part.move(@);-- load part' |/ ?5 R6 c3 x, T: T+ Q/ f4 V4 q7 ~
@.CurrIcon := "load";3 B# l* I/ ~/ ?0 b+ W4 j% P
GlobalDistObj := part.globDestination;
! \% q& Q; h# G% c v7 \+ Y$ K2 S assignLObj := rgmanager.rgAssignL;9 z& r$ A J1 ~3 J( F
row := assignLObj.getRowNo(GlobalDistObj);6 s- D7 u8 }- P% z% S# {
if Row = -1 then -- since 70+ ^- |) b( T8 W- n, Q
if lan=1 then+ p! A _, ]+ j& C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! {) s$ e# K/ m4 n; q$ L. p$ u to_str("in der Andockstation: \"",?.~.name,"\""));* m7 o% K( J. `1 j0 p
else
Y$ a/ X$ s7 X& K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 m' p9 Y) O% h: Z$ w" Y4 t
to_str("in docking station: \"",?.~.name,"\"")); Q @# c n+ F4 e E
end;7 V! ^9 h: }9 V$ v* P
else
. F6 I( I0 l) d8 ?" k) H F @.Destination := assignLObj[1,row];
8 M7 t7 T% f/ l end;
# F; |9 t* ^9 i F; M6 z newDirection(@);
2 o# N+ x1 s( A @.HasOrder := true;
% J+ p- a2 r+ Z4 L/ P# I end;5 k: a& z+ n/ l8 ?
end;
% t: Q- {) W4 V2 Y# E/ Z7 ]6 l4 L6 Gend; -- of the method
7 E% h2 _9 r* Y6 t. R& E |