/* called by: entrance ctrl of the object 'track'; c( o: ? @3 ?
*/
- }, C- ]! n: X W; q. kis( a4 O4 d4 S! o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. ^ \; c; I- K" M6 a
do1 y- V/ M, x. X, w6 b: ]
Lan := rootfolder.Internal.Tools.AOLlanguage;/ Z! Y% C$ w( u
if current = @.Destination -- else return) }3 I. u. G8 c0 N7 O6 @
then. {* o6 z- J) f
@.Destination := void; V, ~2 Q9 H( b% z' k
if @.occupied then
3 ^, F4 t. ~2 D0 E part := @.cont;
8 ?& j* s8 x. v/ V6 F# Y8 W @.transpOrder := void;
) {' M! U# J! x% Q& a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 W* q6 S7 {7 M$ g @,root.eventcontroller.simTime);
9 @4 b5 A. U- ~6 B @.HasOrder := false;
. o0 H; Q5 p5 u5 c- ^ @.DrivingHome := true;& S# I* h$ j# z" H! q6 }
rgManager.tryToStartTransOrder;
8 L) p, O8 ?& D0 M8 T- X if @.Destination = void
4 J1 k: U4 K4 s: y7 z5 B0 m+ h then -- no transport order for vehicle @
- j# a" q. L' T) A7 {7 `$ g @.Destination :=
# Z- C% \" r0 K0 X. Q" c) P9 T! c rgManager.nearestFreeStation(@,track.~);7 s/ N: M- h- ?
newDirection(@); + X2 ]3 e+ ^6 r: G0 r3 r
if @.Destination /= void then. |5 u3 z' V$ V1 F$ }' ~2 O( S+ X
@.Destination.NumReservation :=$ z9 i& z$ L6 \7 ^! B4 g2 V
@.Destination.NumReservation + 1;
3 \- z7 q; I1 n! f2 O) B' j) i end;
+ c ~* O! X9 R9 ^: f ^ @.CurrIcon := "drivingHome";% a4 P% \3 e, p5 @& G& C/ }/ z
@.DrivingHome := true;, y6 I1 N3 g+ t2 [# |
end;
! j. X! H/ d) k5 M; L( N! T) g6 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 K8 c- M8 ~$ S( d; h4 Z+ D
part := @.transpOrder;
* {) V% a; C" H/ o5 p6 X part.move(@);-- load part
5 V0 s7 v4 w1 O% [ @.CurrIcon := "load";) v& o% ^+ y4 _9 _0 N
GlobalDistObj := part.globDestination;6 x% T" ~6 D, Z& f/ F
assignLObj := rgmanager.rgAssignL;: ]7 |6 s! H* U4 U" {9 s. q
row := assignLObj.getRowNo(GlobalDistObj);' j0 H# p- C; a) \7 h
if Row = -1 then -- since 70; P. Z: u# E% i0 j& G2 W
if lan=1 then
1 ^1 i( O' u3 S! U; ?# u' G7 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 J: s3 X: ~% Y1 B+ l8 r# y
to_str("in der Andockstation: \"",?.~.name,"\""));" I# h2 a2 e7 O3 A* A- @8 J
else, w! R# Z+ v D! n8 O# F) p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* G; H" i8 X( I, ?5 }
to_str("in docking station: \"",?.~.name,"\"")); 8 R' B G! Y' j/ Z6 d2 e1 `
end;# q+ I! z" s% U. i% E- q
else! `% }5 q& M1 W+ A
@.Destination := assignLObj[1,row];
8 ^" Q1 l e6 e4 T6 j) k6 M, L end;
, q! v' d4 }( p0 Q; e1 u7 Z+ | newDirection(@);
1 R6 ]2 T* T' O) t6 S& Y @.HasOrder := true;
; x2 Q% |( L# I9 `" L end;
6 u3 f8 [& W" I# q end;4 @/ B: _5 n2 S- C" ?+ z
end; -- of the method& S# k# z4 s2 a) s: F" y, k! @
|