/* called by: entrance ctrl of the object 'track'
2 o3 r- O M. T0 j; G0 Y$ H- _*/" N* c# y7 h& b- ?: P" r
is
( S. E$ w& N7 A/ W part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ ~/ D4 M' j; S$ d, [0 j- A
do5 {1 m1 X! w, ?
Lan := rootfolder.Internal.Tools.AOLlanguage;$ w6 D+ O8 i9 `& e/ A/ n
if current = @.Destination -- else return
/ Z. b" Y0 r. ]( ]; G! N, O3 P8 K then1 ^8 h: Y! e, B( o( t
@.Destination := void;( z+ r* ^& y$ ]" r$ K1 h- d5 v: e
if @.occupied then+ W( Z; Z1 ~: C6 i
part := @.cont;# Q9 ]3 {0 J* o6 `9 g# `/ l9 I6 E: t
@.transpOrder := void;! l3 Q0 a1 d' @, m% R* R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 i) Y& z# Y5 \% v/ A% ?; j @,root.eventcontroller.simTime);( ]( J. B" k. e! B+ F* ?2 m
@.HasOrder := false;
( U" z7 Z& c Y8 O! Z2 m G @.DrivingHome := true;
9 m! r7 Z# e2 p. C' v3 @( I rgManager.tryToStartTransOrder; }4 |! x( G! n. l- v5 Z1 j
if @.Destination = void `/ J- S8 |- T8 Y6 X5 G. m
then -- no transport order for vehicle @9 V) z: o: ~' j! [
@.Destination :=5 M& A( H" A2 Q8 p/ t( x- y4 w* W( }
rgManager.nearestFreeStation(@,track.~);8 }# V2 N: T/ Z/ B4 c: a, w- n
newDirection(@);
: e: Q" }8 ?7 _: j5 ~ if @.Destination /= void then9 V' y: p& w( M* c
@.Destination.NumReservation :=
1 D8 ?& v/ X3 Q1 ] @.Destination.NumReservation + 1;8 J& }! Z+ n' F3 `' }% c
end;
& S) U- ]5 @. b @.CurrIcon := "drivingHome";
* L# Y8 K9 m4 Z& ?; L8 V: W; g2 x @.DrivingHome := true;
% K7 W: X6 b/ n6 o! l+ G5 O end;# W( l& }6 K, D, ^2 m0 L& V1 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- A2 f7 X8 i3 |6 Z8 {, R3 O part := @.transpOrder;3 S5 {8 B7 ]3 h4 G
part.move(@);-- load part
! O! @0 i, P+ S% D @.CurrIcon := "load";4 ^; O& R; r: e
GlobalDistObj := part.globDestination;
) `, d+ |. i( F: q7 W" w assignLObj := rgmanager.rgAssignL;6 o% u6 H0 A8 f
row := assignLObj.getRowNo(GlobalDistObj);- p9 `5 H8 e8 T. Z% H7 M" G
if Row = -1 then -- since 70# Y! A1 s A; |4 `
if lan=1 then5 ^( c5 _8 j; d( g0 _/ V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ {7 V2 A0 _" {7 a/ ? to_str("in der Andockstation: \"",?.~.name,"\""));3 b1 [4 R; q/ i7 m( S
else
7 F2 }- o( g _) C: w8 A1 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ h' J' S/ o7 N
to_str("in docking station: \"",?.~.name,"\"")); # A3 J+ Q8 L( p# U
end;
6 f* B4 p) R% b, @* g else( J8 p7 q) A: ]! s- e5 f1 V
@.Destination := assignLObj[1,row];
& E) B: W6 T, Z( P9 a6 _/ O+ P- {3 O end; ) e5 y2 {( L0 B2 P! ]3 h7 |
newDirection(@);; ^7 `% T$ w, q2 C3 \
@.HasOrder := true;
3 n% q+ A. a, V$ w& P% P end;
' y( V0 Y6 _. [! b4 i! l end;
: `" T# Y; k8 N( d( w1 G& ^! _, Kend; -- of the method
8 p/ m0 M4 E a0 H9 W |