/* called by: entrance ctrl of the object 'track'' n4 A9 s" B0 e- f
*/
% s8 {3 X; }2 r8 G4 `! tis
4 k% d& [) Z3 w% T+ o. r part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 M7 p9 t, V% p; a0 X3 e( |
do6 _' Q0 ]7 s- P+ j' n' u
Lan := rootfolder.Internal.Tools.AOLlanguage;6 [7 u+ Y6 V( b, s9 ^
if current = @.Destination -- else return
! M/ Z% |& j$ c' b. o1 E then
! U3 Z0 ?: d7 F1 e2 h6 D @.Destination := void;
1 S* L" K; y2 }2 X k8 C9 J if @.occupied then
9 m6 E8 E P s6 ?3 h part := @.cont;+ O: h- O$ z/ o- H
@.transpOrder := void;
, P5 M+ f, p) ?% w% P+ G3 v$ ~6 i# r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# [3 @- E, J2 C @,root.eventcontroller.simTime);1 S3 k% Q: Y4 F- B( O
@.HasOrder := false;
0 V. Q- @. m) b* f3 ~$ t @.DrivingHome := true;3 E+ v7 N j" h `4 _
rgManager.tryToStartTransOrder;
6 I; Y' F0 K3 k1 H `! v* f if @.Destination = void
% K0 e; C p5 n then -- no transport order for vehicle @
6 l2 ~ I1 A( G+ Y6 u$ A0 ]' ^/ r5 h @.Destination :=( p, N% x& E9 }4 J5 Z* J1 t3 P# N
rgManager.nearestFreeStation(@,track.~);2 P9 I3 r. s' U% ]' @5 X4 o! S
newDirection(@); % _5 ^, ~, \' K: \3 i0 @
if @.Destination /= void then
8 o! J. h& O' p$ g) J* K. P @.Destination.NumReservation :=9 h+ ]0 b/ h- L9 F* a1 @, m
@.Destination.NumReservation + 1;
; D6 i4 Z* D- I. ^5 E4 L+ i end;
( h, E, O1 t* d8 N" s @.CurrIcon := "drivingHome";
9 U- |) E$ n8 \9 K/ h+ Y, w @.DrivingHome := true;
' ~; c9 g. o! G9 T" Z, }! g" {' B end;
9 y& V* v: _! { else -- the vehicle @ is empty, both vehicle and part are in the same dock station, t1 }* h: D. h! B
part := @.transpOrder; c6 F5 X# f5 T! Q
part.move(@);-- load part+ z' }8 C- q5 D+ N: r
@.CurrIcon := "load";9 S$ `. z6 v8 {& \7 G* a J A
GlobalDistObj := part.globDestination;7 k% I0 w- K1 m0 E1 w! h
assignLObj := rgmanager.rgAssignL;- [& y, F% i O" N( y# l
row := assignLObj.getRowNo(GlobalDistObj);3 L' j' @2 m9 R# V* l7 H& I! f% L
if Row = -1 then -- since 70
M7 v. |( h1 f, s/ S( g I: ~ if lan=1 then2 O3 c# y/ Z1 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ R2 O R y; e# ]/ I @9 @. _
to_str("in der Andockstation: \"",?.~.name,"\""));
# `: {: |: t T* w' Y5 H else; I0 C) W/ k0 ]! C' v$ W) t. H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% F3 I# f `; I' s
to_str("in docking station: \"",?.~.name,"\"")); % r8 L8 F" m' ~5 M
end;0 g. N% ^8 Z0 J+ f7 P0 i9 M
else; Q7 Y9 u) q2 Z, P
@.Destination := assignLObj[1,row];
/ Q+ I$ C6 }+ d/ L. a+ {$ k" y! [ end;
$ O9 Q2 ^7 |( K/ X' {7 O newDirection(@);+ S" x% m' I# H4 G u i& ?
@.HasOrder := true;0 }, R: ^1 s/ h1 I) \; l# T
end;
/ A$ x/ @6 p/ V! U' z) N, N! z/ v end;
2 p; I9 D" y3 A$ |) Rend; -- of the method
# o) ]! B8 n( y4 r2 C |