/* called by: entrance ctrl of the object 'track'6 K7 \! |! |0 B; {! x: s% h, {
*/
) r i% Z" q/ i( U6 Q) `$ Nis
4 ?0 O3 p9 c$ @& a Q' r part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 e7 p$ x3 ~+ {- v: y& j- B
do
6 E9 c& C8 n7 _7 y+ ~5 Y- _ Lan := rootfolder.Internal.Tools.AOLlanguage;1 l% Z2 ?* y3 Q4 B D
if current = @.Destination -- else return
8 C. j8 F* i4 v: U$ M6 Z7 g6 O then
; `0 I5 i& Y, M! M% p t0 O ` @.Destination := void;
* E. K5 n9 d. }. j7 [7 z( J+ Z if @.occupied then
( [. G$ C+ P: o# p Z part := @.cont;8 c$ r5 d! o% l. f) h i, r4 q3 }
@.transpOrder := void;* D% E/ K7 k3 o1 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! Z$ s# H5 h# ?- z
@,root.eventcontroller.simTime);
& K$ p; n# U" s$ H) z @.HasOrder := false;' U# k- M. \6 E
@.DrivingHome := true;
1 S5 u; F; \! n7 n. W1 y; R& y rgManager.tryToStartTransOrder;5 f) J4 W' `6 z. g: k: b) l
if @.Destination = void
) h5 @8 R" Z1 a then -- no transport order for vehicle @. w: A/ y, {# m, _. q ?2 |
@.Destination :=
) x* R* D' P! L: m5 z6 g8 W rgManager.nearestFreeStation(@,track.~);+ s5 `8 E# k3 r" Y a* ?: I
newDirection(@); 8 S6 v$ _4 E% A8 {4 k/ Y
if @.Destination /= void then* A5 W7 N! [% v% [; w
@.Destination.NumReservation :=
& d- R+ ~1 U' u9 V @.Destination.NumReservation + 1;
n# E$ O' P% C- K0 l end;* n5 ?4 G" [$ b0 W+ J
@.CurrIcon := "drivingHome";+ l6 W: m, |, b
@.DrivingHome := true;" e4 p% Q6 u! [$ ]! W3 Z; b
end;$ W" m3 z% Q/ X/ c' a# c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 B7 A/ n% u; {$ Q
part := @.transpOrder;
, `+ b8 \2 L' T( t* h part.move(@);-- load part8 \ W* X) v( T: O6 K' R. _2 v% X' ]
@.CurrIcon := "load";
5 W, x7 J/ M9 g4 l* | GlobalDistObj := part.globDestination;/ n( w! |" L% v, p- `
assignLObj := rgmanager.rgAssignL;4 p; {* ?8 A2 J; Y7 B* N
row := assignLObj.getRowNo(GlobalDistObj);
8 T4 K2 D% I8 f, `* q L if Row = -1 then -- since 70
. `8 z, A6 t& E; x1 z6 J7 |) Y8 D if lan=1 then
# A& O+ g: C+ z) b9 s+ o f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 Q3 T+ m' ^* G- q& {7 l to_str("in der Andockstation: \"",?.~.name,"\""));/ ?2 Q8 Y; _1 }0 t9 T! q
else
, S. U. e) m5 L9 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 ?/ }' e0 j2 \
to_str("in docking station: \"",?.~.name,"\""));
4 G7 G% T+ Y. X0 L0 q5 g! Q end;
" t& c. Z4 X; V; }0 ~% y else
( {- B8 V. R- S" _8 B* ? @.Destination := assignLObj[1,row];
9 T/ ^# d7 K) S0 C end; ' r/ q/ q& M9 j! A0 ~, L1 G
newDirection(@);
/ M, E. x0 F7 f @.HasOrder := true;. h& t+ A+ e8 u+ U* \# D! {# Z& P
end;* b6 t* R$ a+ j
end;
: @3 {8 _3 k; p* O! ~& bend; -- of the method
7 e' [; |& a0 e |