/* called by: entrance ctrl of the object 'track'
, R% _2 D8 W9 O, V) F# x*/
# T" E& I+ R: w" U. jis
; G5 L( w( x1 W0 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 F5 P* G& l+ g+ w- I0 ydo8 c) ~- K$ i3 [3 p0 v% ^
Lan := rootfolder.Internal.Tools.AOLlanguage;
, x! P; s0 c) S2 o: r if current = @.Destination -- else return
! K2 y) J5 D4 f$ D7 X% n4 M$ z then
* z0 Y" i8 E8 U0 Y0 g& k @.Destination := void;
( {8 R8 h0 P# {% F( Y if @.occupied then! N: c" l$ n) A, x H
part := @.cont;
% z; F5 M1 l" A+ J% j: w4 C @.transpOrder := void;
9 V$ \0 g" m* S+ I2 H9 U2 [2 C( h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 N1 \3 o" F# E; R6 S7 t @,root.eventcontroller.simTime);4 d3 B1 P+ l1 `1 a/ k3 Q7 w( T. c
@.HasOrder := false;5 ]0 j. e6 Y' Z0 r# ]$ _! M
@.DrivingHome := true;
( c+ Z2 O3 x8 h8 ]: q rgManager.tryToStartTransOrder;
. M1 l6 n' E5 b; V0 b if @.Destination = void+ [* k' R1 U6 w! s
then -- no transport order for vehicle @
x9 f! S: F D" Q. t! A3 s' | @.Destination :=) H* ]8 `2 O4 {3 s
rgManager.nearestFreeStation(@,track.~);
0 e& M# @2 J+ m0 H' r newDirection(@);
/ |+ g I% a# L: O' d$ S) {2 h if @.Destination /= void then9 s& M8 ^! T5 M
@.Destination.NumReservation :=
! |1 A( J5 J) v8 u7 V+ C& Z' _ @.Destination.NumReservation + 1;
* ?2 [: O. B0 q6 C% h end;
; O' k" _8 |: S @.CurrIcon := "drivingHome";
7 E% r2 ]. H- C. t @.DrivingHome := true;, R/ V5 _1 z' m7 \* n9 m7 B
end;
9 s3 s7 ?3 T' ?' t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! `' J) @5 A. k" g part := @.transpOrder;7 X6 H8 w( e4 X! D) Z
part.move(@);-- load part$ Q* X! D* \' ~' ~- J7 S+ Z5 E* i
@.CurrIcon := "load";2 `* e# v- `5 }& z; G5 A; }( @
GlobalDistObj := part.globDestination;
' s* j2 D D3 E1 z2 v* `2 R assignLObj := rgmanager.rgAssignL;
) D4 f7 a" n3 @$ K# J row := assignLObj.getRowNo(GlobalDistObj);$ _5 W z, |& X3 N, s) }: }3 P
if Row = -1 then -- since 70
3 L1 g6 m. K# [# [+ ` if lan=1 then
4 Y* p' t0 K, o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- G- ?5 e+ W! i1 [ to_str("in der Andockstation: \"",?.~.name,"\""));! U) W. O* ?) y
else; a: ^3 r! p4 `: M: f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( p# r8 }! Q' o to_str("in docking station: \"",?.~.name,"\""));
( g" z' d- I' r5 I end;! a5 G3 h3 `& e. [4 z+ |
else" [9 Q6 M& C! n
@.Destination := assignLObj[1,row];
6 d" ~& ~$ G" h4 v+ P0 y end;
" q. k ~: z5 X newDirection(@);- e, U0 p4 }6 J5 U+ `7 O. |
@.HasOrder := true;
2 N3 h& P- {$ E end;
+ h! `/ ` O+ t9 J2 [" _ m; \ end;7 y2 c: ~: j; n
end; -- of the method3 q1 r* t; o/ K4 }. b. v1 M
|