/* called by: entrance ctrl of the object 'track'9 t" i3 N% y- y# X
*/. i( d( O4 y/ \7 B- ^: W
is
4 V! r8 q" Y& g* W9 } part, GlobalDistObj, assignLObj:object;row,Lan:integer;, W& U, [' w/ v# o8 R" j
do
5 B2 H2 U, l8 N! }# m' a3 m Lan := rootfolder.Internal.Tools.AOLlanguage;
2 V* k5 F# `8 r2 j5 T5 d if current = @.Destination -- else return: Y& x' A- t# z, ^; C5 O$ F
then
. e6 Z# \3 a/ @ @.Destination := void;
1 {: C3 F# s3 L8 Y# I* o if @.occupied then; s0 z7 T e' y- d7 s+ e! Z& K/ S
part := @.cont;8 J. ], b/ o+ h
@.transpOrder := void;. g$ ]+ |& R, ] D. Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 Z7 s; E/ k X, p' ^ @,root.eventcontroller.simTime);
, i# E4 B4 A" ?9 B3 s% Z3 b @.HasOrder := false;
' P) L: y2 S) t3 d @.DrivingHome := true;: N! }* e2 F& J
rgManager.tryToStartTransOrder;
1 _& [1 w/ [6 z" o+ [( P) _* _ if @.Destination = void
& }$ S+ F- i* S; O: Q then -- no transport order for vehicle @& x& X R/ U1 ^$ E7 T, m
@.Destination :=
8 `$ g/ m4 p* V8 {; D0 ~. _ rgManager.nearestFreeStation(@,track.~);# s' ?: I: L2 g' ]; z
newDirection(@);
# J. O5 p1 U+ O, m! u: e if @.Destination /= void then" W+ U" l. C. u% J# N2 a% R1 d* D
@.Destination.NumReservation :=
! Y! I5 W& g+ e2 W) A @.Destination.NumReservation + 1;
" c0 p4 b( A; z0 Q6 B2 ^% O- G- q end;+ P, {1 t4 Y: ~
@.CurrIcon := "drivingHome"; ^, \, e& d$ p$ {1 p
@.DrivingHome := true;
! f; G4 U4 {3 _( z: f4 Y8 A9 _ end;
|0 X/ m7 n; F, d. g0 C5 y# z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* d2 k4 z+ d8 }. Y8 V: s+ T part := @.transpOrder;
+ }/ K T+ G* F& W- Z! o* ~ part.move(@);-- load part
' l5 c' }. d7 M% F7 D) a# W @.CurrIcon := "load";
# `& W. m9 F3 [9 W7 [3 G- {5 N GlobalDistObj := part.globDestination;# y! H7 ?8 u1 B" }3 U7 _
assignLObj := rgmanager.rgAssignL;
" ]. f6 P" ^/ Y* Z; D) f row := assignLObj.getRowNo(GlobalDistObj);+ H9 S% @' d' ]: P$ J! I$ ?/ h" x
if Row = -1 then -- since 70
" f. ^& k! A. ]* f if lan=1 then" E" l2 g" Z1 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% b/ \6 f- Z/ P. n5 Z/ H u' H
to_str("in der Andockstation: \"",?.~.name,"\"")); m1 @0 |5 n: I4 q
else
: g9 R$ D' x! Y, I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ N* z- }. W7 Z" ?% j4 D B
to_str("in docking station: \"",?.~.name,"\""));
) n! e5 c! n) B5 d" r( a3 S end;0 e# @( c5 G, t8 \8 I+ j
else; n' P$ R) x) X- _0 i8 A6 X
@.Destination := assignLObj[1,row];
$ p; Q/ @) N* I9 h end; 0 {4 s6 h) [+ c
newDirection(@);
2 R/ e8 e) h7 K [* p @.HasOrder := true;
# y* ^3 }" R2 z* l5 ` end;6 v6 o* d! ?$ Q% m0 J
end;. [ U# U6 }+ _4 y' a* d
end; -- of the method0 Z1 t% b2 P1 ^2 ?( R
|