/* called by: entrance ctrl of the object 'track'' e2 `9 G8 B) c! D) ~/ ]; I5 X3 q$ Z
*/0 M% R1 m1 H/ U6 p, P
is' `. h Y, C5 N7 f6 E7 J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( w# o' K/ O% j8 _- }' M" O! Wdo* d: ]0 Q+ z6 v9 P' x( {
Lan := rootfolder.Internal.Tools.AOLlanguage;3 \ F$ L0 r+ K: ]! e: d
if current = @.Destination -- else return3 I; O+ {8 U7 ]4 Y" e8 \5 T
then' \; M! x: K# v; W
@.Destination := void;# W( V# w& O' V# S
if @.occupied then
M" ^& i$ ?' n* g) f part := @.cont;
2 M% K9 e9 q ]2 X, Y. W @.transpOrder := void;
) H$ E$ d) ]. B6 b Z# j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 m! i; T$ E8 ~- s* b @,root.eventcontroller.simTime);3 z- I6 R" k- O8 U# K5 |7 F
@.HasOrder := false;
3 g% @) h, [; L; b @.DrivingHome := true;4 ?3 k' i1 e N' E/ u
rgManager.tryToStartTransOrder;' w n' Z3 p5 T' _/ H, y, E5 l+ F! r
if @.Destination = void
, K( b8 u: u. l then -- no transport order for vehicle @
! c- G8 _6 H J3 ^ J: `. J6 b( v @.Destination :=0 p2 `! w- F" C6 N! l; C5 i4 d2 r" O
rgManager.nearestFreeStation(@,track.~);: A/ ^3 g7 ~' [' T/ q$ S* F
newDirection(@); * T% Z' S' t' q. u2 h' h' l, ^. t
if @.Destination /= void then
8 M) m* p$ E& P& L: J @.Destination.NumReservation :=5 ]6 X0 C; F4 w% R& a
@.Destination.NumReservation + 1;
) c" c% |- Z3 h* K8 I- n end;
) s& l& R) w+ } c5 ?1 j @.CurrIcon := "drivingHome";
0 U* q6 S0 O; q _, O! J @.DrivingHome := true;! |, Z% F! B' b4 a! S1 r/ f8 P
end;6 D& d: H0 d: E5 Z5 q9 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 e" R; e# K. U4 r( | part := @.transpOrder;
1 p# f- I' L- X E4 L2 g" ~" o part.move(@);-- load part9 L; z; D1 ~% t* n! n- D
@.CurrIcon := "load";
8 s! I, G* U; J( y' Y6 Y# G- K GlobalDistObj := part.globDestination;
3 L4 }' x5 E" L9 [8 _* r assignLObj := rgmanager.rgAssignL;" j# M9 A: F _" M! K/ J
row := assignLObj.getRowNo(GlobalDistObj);8 ^% Y6 l6 |. O, o( [* G
if Row = -1 then -- since 706 o$ i; _6 s9 w" U% n' M- z
if lan=1 then1 R0 O) ]$ [$ j Z. h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' ?( G" }) S/ |' v to_str("in der Andockstation: \"",?.~.name,"\""));
6 \+ K6 \5 u0 g) p- z else4 h$ c# R& u8 ~0 b! e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# J) z- H8 N" u
to_str("in docking station: \"",?.~.name,"\"")); 2 n% X! L: `) w: A
end;
- M* p5 L) O( O; V" }) O9 S else
% _: T# N, Y7 ] t6 I9 D @.Destination := assignLObj[1,row];! O% u+ ?. _' l. T; \
end; , l3 I& N, G8 h" T6 l
newDirection(@);
2 i% W) a4 W& w& X @.HasOrder := true;
& f/ _) U+ X6 m& [ end;
8 f b8 A/ r1 h8 J end;6 M7 W i, a4 |) T {0 y" g5 A" e
end; -- of the method
. P5 s! H( A1 }) o F" d* s3 @ |