/* called by: entrance ctrl of the object 'track'+ X; K' N) S( n& Q( x
*/, k% Z+ P) {! f' y0 y6 h, K6 u
is7 R6 X( c1 f- Y& w1 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- {% B" @0 H# b- P1 A! |$ x" ]
do
" v& d" o9 U2 ^: ~1 Z& m# m Lan := rootfolder.Internal.Tools.AOLlanguage;
4 E& \7 t0 P/ N7 B2 P" T* t( w if current = @.Destination -- else return
* f( J9 X; Z$ q( i% h- A then) V+ j! @* i2 m4 |8 w5 e5 ?
@.Destination := void;7 _ a! C5 Q: l
if @.occupied then+ U" Y3 U9 R& k0 X
part := @.cont;
1 R0 d: }- L0 m a @.transpOrder := void;
8 _" e6 p9 M8 o# |; T6 h4 u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, z' T; p( z) y; |9 s6 O* Y0 q
@,root.eventcontroller.simTime);/ W9 Q9 ` d# O$ i& k B: @
@.HasOrder := false;( @ w0 A8 O7 z8 C/ `, M9 T, B1 X6 t
@.DrivingHome := true;
0 y$ u& B0 M o, u2 D rgManager.tryToStartTransOrder; z+ y; W0 [& \1 z* d
if @.Destination = void
% E% Y6 Z. M3 V3 v2 c then -- no transport order for vehicle @
& V: v' U7 W6 W6 O M0 p/ b; w @.Destination :=
( {6 g- M* r) F" F! ~) K rgManager.nearestFreeStation(@,track.~);5 x7 A& M' e* H: e
newDirection(@);
2 z7 j6 X6 L5 H J& @* m if @.Destination /= void then
. a |% G$ w6 B" {# C- m5 V @.Destination.NumReservation :=
; Z7 ^; a- t+ n6 Z9 C6 R @.Destination.NumReservation + 1;% [" w4 n9 o0 } Z9 X* L: i
end;% \( [# E1 t9 F$ g! x _8 A
@.CurrIcon := "drivingHome";
% h8 W" E( T8 c) e0 M. X3 e* L @.DrivingHome := true;
3 C- r' f! h$ @0 f end;
7 R+ C$ _' c7 b2 a! h else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# W% Q' h; U9 [6 Z0 Q9 V+ A0 B part := @.transpOrder;
5 r/ [: W+ s8 h% p part.move(@);-- load part* U8 j" W V- A+ |6 [: h' ]: k O9 `
@.CurrIcon := "load";
2 w6 w2 }( W7 ?- a! s/ u% X0 M9 { GlobalDistObj := part.globDestination;
8 d) `6 x3 ^; n7 o8 Y: `0 i assignLObj := rgmanager.rgAssignL;
# G" Z# B4 O7 L+ ] row := assignLObj.getRowNo(GlobalDistObj);- f' P. [; n1 Y! k
if Row = -1 then -- since 70
! e6 y5 S6 B5 ~1 `7 q if lan=1 then
5 L2 h7 r$ \- X, D1 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 x2 E% V @5 j, E4 N
to_str("in der Andockstation: \"",?.~.name,"\""));
6 p2 j( s9 J$ o6 F else
9 v- q0 M6 v" R/ H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) z% A, h% j5 p to_str("in docking station: \"",?.~.name,"\"")); + V+ e! `$ P, ~6 Y% L$ p
end;- @0 P9 B( z' Y! z, _$ @2 m9 N
else
( {2 K% O2 k7 j @.Destination := assignLObj[1,row];8 }3 v* g3 K7 N1 t' W
end; - S* Z! t1 w3 l6 k$ o
newDirection(@);
) A. h! d1 G- C; X7 G @.HasOrder := true;
9 z5 V, m# q9 ]* B9 Y4 m: r end;6 s! T% r* ?/ X4 ^( m
end;
9 E# o! S$ q B$ h- O nend; -- of the method7 A, B# E+ c/ q' c2 ]% Z% U
|