/* called by: entrance ctrl of the object 'track'
) g* |- m6 l6 G/ ]' }; s4 O5 H*/" o9 g E$ r2 @9 j* v3 e
is
1 Q, A& L- ~( w( U) X+ S3 c5 A3 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 }( [- B7 N* r; d: D- ]! E
do F9 Y) e- l5 H n# v$ H
Lan := rootfolder.Internal.Tools.AOLlanguage;
' P7 |8 L! B1 a1 a, o1 [ if current = @.Destination -- else return
, ]& G6 i# B( n' x: m4 D7 Z. r then3 c7 T; d5 C0 f% n
@.Destination := void;
- G( S$ ]$ a) H( S# ^ if @.occupied then9 y, @; m- {; I
part := @.cont;' G7 h5 E: C+ l( s7 Y3 G
@.transpOrder := void;
! t' [: f% m0 q* v8 _. u1 y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* g: n; y) c, s4 E- I
@,root.eventcontroller.simTime);& L8 [ A g1 p' [; F
@.HasOrder := false;1 F" f5 n7 e+ D6 a. D. k6 B* O
@.DrivingHome := true;% }9 `; G0 d$ @2 E! j/ w0 [
rgManager.tryToStartTransOrder;# ]1 \- M7 f8 h
if @.Destination = void
* o/ `5 |/ v) T. d, [ then -- no transport order for vehicle @
# n, B, c, C+ E. p+ @9 w' e* e& p/ k @.Destination :=% }1 Q- B8 B0 P$ z, }
rgManager.nearestFreeStation(@,track.~);
9 {$ U6 @# O/ m a* g newDirection(@); 8 h* A6 C( o* [" S
if @.Destination /= void then* p( X# s2 p2 V2 m5 l" g
@.Destination.NumReservation :=
$ W0 W. W& k" |( y @.Destination.NumReservation + 1;
! N+ p) i* b7 u& | end;7 r$ \2 a: b4 b7 I
@.CurrIcon := "drivingHome";/ R, g7 C, a0 W, y
@.DrivingHome := true;; [: R; C) T9 C2 l" l; V8 i/ T) T( d
end;
/ D1 d8 [4 _" X9 f F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: n& w6 d' @$ \ part := @.transpOrder;
: W! ?/ B# C& {4 l3 e# ` part.move(@);-- load part. B8 [+ T4 p6 G- Z4 t& L
@.CurrIcon := "load";
3 x- L4 X k8 K GlobalDistObj := part.globDestination;
4 _( A- C! J4 ?# x8 u- [7 c assignLObj := rgmanager.rgAssignL;/ Y7 F/ v' b* X+ o) G s: k
row := assignLObj.getRowNo(GlobalDistObj);4 s- E' y k) {3 N/ o6 j# G% w
if Row = -1 then -- since 70
2 V* E9 D/ B) U L if lan=1 then
8 g) p0 A. P1 d0 d$ M5 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# [& q8 }, |- \% K$ g: G2 Q9 j8 S
to_str("in der Andockstation: \"",?.~.name,"\""));
2 @0 e+ ?0 T* ~0 Z/ f7 S else
% ~1 T0 _" ]% s% q) b+ s7 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ {! h% y b/ _ to_str("in docking station: \"",?.~.name,"\"")); " R. I9 E- |8 E( J) c! Q9 U$ J
end;
* z2 q% O8 W% d else
1 S* d- y9 |* J! e( X @.Destination := assignLObj[1,row];' W! f9 H0 h" B2 ^6 D$ F6 M- Z o
end;
: k' z5 m2 }; C8 L5 z newDirection(@);
# U2 z+ Y4 [+ Z5 w7 u) a8 Z& V& B, C @.HasOrder := true;
' C% P, z$ y5 Z9 E) \% j; c end;# `" a3 u9 g) n A5 d2 [; c
end;
1 Y( [! b- w- e+ Kend; -- of the method u% J* V) T+ ]1 u& O
|