/* called by: entrance ctrl of the object 'track'; _ ]& x4 _/ u- {( E
*/' ]* n' i+ g6 N6 f5 {1 J2 ^
is5 ^" T+ e( H( J0 E1 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 B" x* c2 u1 p6 Z& s; W4 edo
3 n" g: V. h, P; j: ~ Lan := rootfolder.Internal.Tools.AOLlanguage;8 j# \$ `: K k% a
if current = @.Destination -- else return9 M1 Y& t( y' J/ V T( u
then) e* X- M( ]0 d8 [" t6 F
@.Destination := void;
) J9 b' R. G6 D( v: ?; F J' P0 r R if @.occupied then7 U6 S- J+ {: H& j
part := @.cont;
3 v7 \# E6 {$ u% H3 K' y @.transpOrder := void;2 k: V0 P7 E3 n/ }4 R/ R7 N: `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- J1 _1 l- s c. S( F+ I% W @,root.eventcontroller.simTime);
+ k$ T6 Y' `$ J% m( q" M @.HasOrder := false;
3 L v' F) I& { @.DrivingHome := true;
0 ~3 z( Z- ?! ? rgManager.tryToStartTransOrder;* H* x8 h' v1 D4 p2 @
if @.Destination = void/ C( Y# j- j7 z
then -- no transport order for vehicle @
# K' N1 n' q; o6 k P @.Destination :=- m- {+ Z _8 C4 b9 W5 F
rgManager.nearestFreeStation(@,track.~);
: F8 D/ [2 l& ?% w) q$ u newDirection(@); & E* m% z: v# D: _9 {+ M. n
if @.Destination /= void then: K4 V7 [9 J7 P
@.Destination.NumReservation :=3 B4 H, K- ~4 a" s+ L" E
@.Destination.NumReservation + 1;
, U; F8 G) L0 P end;' P. l# Q* E8 Y- }
@.CurrIcon := "drivingHome";
) R# N8 }3 l8 { F& `; u* ^ @.DrivingHome := true;5 `) X& ]1 I }/ V' O" o
end;
8 a% l, T: b* C0 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station! s. k. g& o& s
part := @.transpOrder;
7 K4 d! g n3 ^* L4 F, v/ |+ { part.move(@);-- load part% u m& @4 f' ~4 J
@.CurrIcon := "load";
; Q; ~7 }* c& d4 m1 [1 j. y GlobalDistObj := part.globDestination;* z5 Q& g* m7 x3 ]) S2 q; F
assignLObj := rgmanager.rgAssignL;' _+ ?. d E- D
row := assignLObj.getRowNo(GlobalDistObj);3 [6 U/ M3 t) I; u
if Row = -1 then -- since 701 H: e: f+ X, G. v4 y G
if lan=1 then0 G) h5 G9 C ~% G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) R5 t/ W3 {# v( ?5 a% R. V
to_str("in der Andockstation: \"",?.~.name,"\""));
2 m6 @( T* g6 R' m8 i" i else
' W$ j3 B6 W h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, Q ?1 a' ^& }: R: C* _& M
to_str("in docking station: \"",?.~.name,"\""));
8 b4 x( g7 F, e& T6 x end;8 o3 O, G' }* }4 L+ r
else
2 t% `( `% r2 F& ^0 p. D0 K7 e! ~ @.Destination := assignLObj[1,row];5 D' b" N6 {& ]. i9 S9 ?* B
end;
# e& t, R" ^4 h( a7 o) K newDirection(@);6 {# ]: B4 ~. ~
@.HasOrder := true;) e# n, n# t8 r
end;6 D" H* h$ x: m+ E3 q& C
end;, c% U. c. n2 @" [, Q5 Y
end; -- of the method0 n6 U9 o* N! y4 _# w$ X5 @
|