/* called by: entrance ctrl of the object 'track'$ |( R& H0 u0 X
*/* W5 v9 ^0 e* C2 W1 o
is
" X5 S. ~8 J# G0 ~" g part, GlobalDistObj, assignLObj:object;row,Lan:integer;# l4 u4 w @, ^
do7 K& W9 |5 K( r7 I @* K! f
Lan := rootfolder.Internal.Tools.AOLlanguage;
, F1 u& ~1 M$ I8 s7 t. ~: X! j if current = @.Destination -- else return, D2 ? _) M2 H: _3 l) x: q
then/ S) x4 A" i' l) p0 C/ L9 _5 q
@.Destination := void;5 Z! }- P1 e0 k
if @.occupied then7 n @; T' d3 ^, D6 x
part := @.cont;
t8 f- g" |2 M% ~) U @.transpOrder := void;
+ A$ y$ K1 Q" y: s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," ^8 E' @. r; R9 d: Y, u; a
@,root.eventcontroller.simTime);" w! |4 r7 X0 h' q
@.HasOrder := false;! X0 r3 K! w- W6 Z8 H/ B; q: F- n
@.DrivingHome := true;
+ m2 k0 A5 g& R- u rgManager.tryToStartTransOrder;& d1 _9 f3 z( n# S
if @.Destination = void. q8 v( V8 i" U7 @
then -- no transport order for vehicle @/ [/ V: @1 m$ g* ^; w% }
@.Destination :=
& C- q, s! T" I: a% b: k8 o rgManager.nearestFreeStation(@,track.~);- k3 ]* @/ W4 d! Z8 H0 f$ Q N& Y* b# ^
newDirection(@); * T, Q7 o) G+ P# V
if @.Destination /= void then; _$ m! [/ [. j5 x$ A
@.Destination.NumReservation :=
6 W/ `# w v& l& I# a; C9 I* {, Q" v @.Destination.NumReservation + 1;; t- I; G U; C* l- s3 B
end;- O, W* Z# X- m3 _
@.CurrIcon := "drivingHome";
6 b4 v* C2 |4 R. X @.DrivingHome := true;3 N' K3 X1 { S; M$ g0 I
end;, }, { z. x* `# f8 r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 E' \2 x3 K+ L7 r part := @.transpOrder;
6 t1 u' S/ c( _8 U. Y% q, `+ S part.move(@);-- load part+ S5 [: o# t& t! h5 [
@.CurrIcon := "load";
& H5 B8 ^# w J- j# A& ^ GlobalDistObj := part.globDestination;, Z$ ~, W! K$ j
assignLObj := rgmanager.rgAssignL;" @3 X: Q( f% j0 K+ u/ |0 S- c8 B
row := assignLObj.getRowNo(GlobalDistObj);
6 X4 f% |7 R I9 q* _; a7 v" n if Row = -1 then -- since 702 m8 |2 c/ y1 R' Y
if lan=1 then# A% q: a- a& Q, s; N+ \6 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# ]0 w6 T" j: i( J
to_str("in der Andockstation: \"",?.~.name,"\""));
+ N8 T! I* o' D; X* S# d else
+ _8 u+ G8 L3 ~9 n% J6 b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 n5 N8 R8 z& x% \ l) [! O* F to_str("in docking station: \"",?.~.name,"\"")); ) V& r: s1 {4 V9 s( o8 @6 e0 H C2 c
end;
3 p: @' t+ J) \3 C& _$ c) R else
- E0 l, o8 L3 e @.Destination := assignLObj[1,row];
& @4 C( ~ r' b( j- Z end; : _& E4 v' N; X% `9 }8 i" a' F
newDirection(@);
. l1 V9 n. t& S C @.HasOrder := true;1 Q( ?& Z6 ~. O! n" l
end;
# T3 k& e. w' n$ z) o6 ?- F end;% e: F+ U5 E8 b, b8 b# p
end; -- of the method4 }2 {7 C# y B- o2 m
|