/* called by: entrance ctrl of the object 'track'$ g; P8 D2 i3 ^- {' h& H# k5 E2 }" r
*/
9 `5 E ~, y' P" @( Dis
9 ^# @: l0 W) M3 ^- T- `8 f+ p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# c, d5 e; i$ S7 [* }do0 W6 h. N/ B( \7 e1 o
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 Y% _6 z2 h, A" ]' u& o- R2 A if current = @.Destination -- else return
+ g7 I. c4 v' J then0 o: ~0 l; d4 b, x6 }3 F+ n
@.Destination := void;/ z& `+ u3 ]2 r* i
if @.occupied then1 K" N l2 q% Z% n2 a
part := @.cont;# r$ X' w8 K3 V, @- j* U" q# H
@.transpOrder := void;( J0 ?2 F$ b2 |# x, }* I# {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ C3 U' K r+ B2 A3 ]1 M @,root.eventcontroller.simTime);: g: n6 [; T) U" _: W$ b
@.HasOrder := false;% W+ `1 A: K7 S4 k; `& b
@.DrivingHome := true;% _# @! x7 _5 F- z, w- V
rgManager.tryToStartTransOrder;8 j9 w+ h( G! z D
if @.Destination = void$ M" F8 C g o. H/ y+ m
then -- no transport order for vehicle @
" e8 I1 ?; ~3 j; y @.Destination :=% c' w2 F. T+ I, R- K. t8 t. t
rgManager.nearestFreeStation(@,track.~);7 x' t0 M6 j2 V+ \! [
newDirection(@); 1 A6 Q1 r3 p5 R. R. U3 M
if @.Destination /= void then
) P- G) E f- D; h! ~1 J @.Destination.NumReservation :=
" V: Y+ R* x0 L q @.Destination.NumReservation + 1;
# a0 R! Z" t" G# g end;, ~$ I, Q' N; G! X, G( N: {
@.CurrIcon := "drivingHome";
' S4 P2 H' W) ^ @.DrivingHome := true;
: R9 l- m* b7 }- ~4 f end;
6 ^# I% ~7 H- c" v+ y: ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) C/ P" w) h9 Y9 } part := @.transpOrder;
8 s" G" O2 ]( S Z3 O; d. U! i5 l part.move(@);-- load part
6 a* Z' h/ I# M. C4 i: ?" [/ n0 f @.CurrIcon := "load";: V+ r+ ~& \! C( z; u( z0 U% i& D7 q
GlobalDistObj := part.globDestination;1 T$ d' W- a. q0 A% s! M
assignLObj := rgmanager.rgAssignL;
$ n8 |2 q/ C' v row := assignLObj.getRowNo(GlobalDistObj);/ Z( l% w$ E- S
if Row = -1 then -- since 70
1 |' `+ p. @) E+ P7 m+ ?/ W, A if lan=1 then1 c0 a) ^; x9 e& _4 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 c, X$ _( }! o3 Y; B+ u
to_str("in der Andockstation: \"",?.~.name,"\""));
- ]6 e0 N9 l4 d8 U$ E else& c9 G3 D" r8 k' B/ P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% G. t8 Z& {) s0 R2 t/ I0 k% Y. c to_str("in docking station: \"",?.~.name,"\"")); * N8 ^# R# |9 ]9 l
end;
+ A) Q. m5 k" t8 g8 c else$ O$ t$ `/ Y% e( ~
@.Destination := assignLObj[1,row];8 S5 U7 ` [3 Z7 C
end;
; ~& @, A' R( J* B" `0 C% G newDirection(@);+ q* `/ f+ ?2 o6 p
@.HasOrder := true;2 m1 G. _1 S3 ^# |' @% J0 `
end;+ p2 q0 B" ~3 e
end;
' j) B. f# A! W6 W: a% M: w/ Dend; -- of the method- C3 w2 g' U! ]4 N
|