/* called by: entrance ctrl of the object 'track'4 Z# I! O7 }5 X3 D# A
*/
. @# X+ {7 V( j8 I" tis
' \! `8 \: M5 o5 e+ V part, GlobalDistObj, assignLObj:object;row,Lan:integer;) z/ Y' v' ~) D
do' o2 \, ]; j2 j! @+ x0 p% W
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ E; Z# r, I# D if current = @.Destination -- else return6 I+ t2 T7 d: ?$ }
then; x9 z' ?- U% F' T3 r
@.Destination := void;+ C2 C k0 R5 J$ P; \2 {
if @.occupied then) g3 A, B3 Q* Z, [: S( ?* o
part := @.cont;
2 o. }8 h+ n7 |! B+ ^# _. n# q @.transpOrder := void;5 F) X! w% o0 q& O2 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 e& N4 b4 {/ t* m7 y$ n7 W
@,root.eventcontroller.simTime);
6 m" n) K( L2 g' s( ^9 I: ^) x @.HasOrder := false; d% R+ Y) _" N+ [5 ? ?
@.DrivingHome := true;
7 [! e. h- v' i& X9 l rgManager.tryToStartTransOrder;0 }4 P: a" f+ U G' `
if @.Destination = void2 Z6 `* g: \. S' ]
then -- no transport order for vehicle @8 O% ]7 \0 x3 E
@.Destination :=9 U$ G) W7 f9 [/ [- O9 G$ N9 C: Y
rgManager.nearestFreeStation(@,track.~);8 l3 \9 R$ w4 |. n7 d+ O
newDirection(@); 6 G# E4 w+ {( F' R/ n
if @.Destination /= void then
- I6 M8 |$ } j x `, C" \2 i" v @.Destination.NumReservation :=
' ] u4 l/ \% I @.Destination.NumReservation + 1;% l6 _. ]( V/ W. B
end;7 S) ?0 i8 ^7 c" ]) h% }
@.CurrIcon := "drivingHome";
* Y2 J2 N3 {/ m0 b9 T# l( X @.DrivingHome := true;) @+ A3 G6 B5 ?' h9 h
end;
5 E( ]+ c* E8 A% h* a9 @* M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! l2 K0 t; p! e7 q* ?" X part := @.transpOrder;1 x2 N+ B/ J0 v& q
part.move(@);-- load part0 K$ I+ s9 M# z) {8 m
@.CurrIcon := "load";+ _9 C9 _5 y5 A& T8 `
GlobalDistObj := part.globDestination;9 d6 ^% N! w' t' `( }+ H
assignLObj := rgmanager.rgAssignL;
+ I1 A V+ Y; ?+ u row := assignLObj.getRowNo(GlobalDistObj);
* ^9 Y; p1 D+ a- y+ K$ o4 K if Row = -1 then -- since 708 l" K, V) h4 b* z$ p! ~- P' l
if lan=1 then5 E) V! [) k: W" ^- J/ Z, |) H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( Y6 [- l2 F0 B. x# X" k
to_str("in der Andockstation: \"",?.~.name,"\""));' C% O+ u1 c! H& g5 h3 l
else5 v/ c, t+ F' t1 e+ k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 u* b- J& i5 K" s( o to_str("in docking station: \"",?.~.name,"\""));
5 X% z3 f s; ^" t2 [- i# D end;
# g+ s0 h6 A5 Q" Y4 H# x* ? else
! ~- K4 V1 g$ M @.Destination := assignLObj[1,row];$ I5 x2 g! B$ H
end;
% _. j1 H8 j/ H( z1 `$ @ newDirection(@);( }! c+ i" ~8 v) W+ Z0 z
@.HasOrder := true;4 i# _* c. @: K* e
end;
4 v4 l/ p- h7 X( K& \/ h3 O8 k end;
1 m9 X1 a3 C/ E+ J! \: C6 v% V: Dend; -- of the method
x. o, o$ n; v. b |