/* called by: entrance ctrl of the object 'track'
$ Q8 N: c+ Z0 `$ k+ t- N% ]*/
, P1 M4 ^2 x/ a( I# h: t9 Ois: L+ \8 [8 L% L2 L) u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' `& W6 K. d0 k" P/ a. t
do' R, }2 p3 {* K# p! H
Lan := rootfolder.Internal.Tools.AOLlanguage;& ?4 ~3 P% f8 D9 ^& y
if current = @.Destination -- else return
/ n3 a' E/ E: ^4 i1 @ then# h% P2 X5 v7 r# I5 |
@.Destination := void;1 A9 J- R& Q" y- q
if @.occupied then# y' J+ U% F" i% \. y3 ?$ C8 s
part := @.cont;
/ C8 s% X' M4 [, P& S# e, e' w7 I @.transpOrder := void;
, }% V9 H- E9 H' d* X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 c# T( T; p; V, d @,root.eventcontroller.simTime);% a. Q# R! g2 i6 G
@.HasOrder := false;
8 k- ~* c3 S! |- S @.DrivingHome := true;) _% |0 b( i" @: Y
rgManager.tryToStartTransOrder;
; Y$ S, c, j& S& t* Y4 Y0 R/ F7 N if @.Destination = void( Q% z# K( y. {$ p
then -- no transport order for vehicle @
- @0 V; b9 }) _3 Y, t4 d/ W# V @.Destination :=! Q5 W' C" K: {( \7 A/ P
rgManager.nearestFreeStation(@,track.~);
. V) b3 L$ i7 z8 t newDirection(@);
$ q* @5 E( b6 I8 L( D, l/ h7 k if @.Destination /= void then+ g; t+ I$ u, D
@.Destination.NumReservation :=4 H( I; x# w. g% Y
@.Destination.NumReservation + 1;" I% {& h( R$ c: b5 m. a4 i7 a
end;
7 g' P$ D9 |- i% ~ @.CurrIcon := "drivingHome";
( K8 i8 h2 t0 R# @; V8 n' U @.DrivingHome := true;9 U7 q9 v7 g G8 K; O: h) |/ M
end;
5 h: T% I. j' X% g3 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
i. e" S& k9 A' I6 M# P% ]2 H part := @.transpOrder;
. J! {% k5 X e* [ part.move(@);-- load part
7 j6 i/ e6 V& |+ h @.CurrIcon := "load";
# r; S+ U: @# d) E GlobalDistObj := part.globDestination;
3 c0 S/ E2 {' l' N0 m# t H; y assignLObj := rgmanager.rgAssignL;& p9 U+ K. d2 q: i& T& T
row := assignLObj.getRowNo(GlobalDistObj);/ `+ `" ] f0 Z7 Z6 t
if Row = -1 then -- since 70
8 @1 n5 ^: k2 u, C( i if lan=1 then
3 g0 I' A5 ]" |5 N$ w4 L' W: X; S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; `, w; d3 J% B; D to_str("in der Andockstation: \"",?.~.name,"\""));
# e1 ?; q( r! \1 s# O Y0 N0 Q$ B8 | else! Y! {$ y# b& k6 ]' `: p6 ~9 Q$ B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
F0 k5 l$ R& ^$ o! c! x+ b& n" ] to_str("in docking station: \"",?.~.name,"\"")); / T) T7 q5 p, Q. a5 p
end;+ A; L' A k. ?; U( ~
else
) b9 y# m. Y8 y @.Destination := assignLObj[1,row];
5 r, a4 \5 }1 o! K end; 0 v/ ?! E- _/ k4 ^3 \! C+ _
newDirection(@);% Z+ N7 A" X+ n0 V+ ~1 @
@.HasOrder := true;
' A" y* x! ^0 i- q# {6 m- Y9 P6 g end;8 B2 _8 i+ w& `: S3 H
end;
* i C* |, \4 x, f+ y Cend; -- of the method
2 ?' ^* I* D0 l& t7 c. u6 g |