/* called by: entrance ctrl of the object 'track'6 p, e6 H& g0 {
*/
/ X7 b! a% `6 e, ~- [, U) Zis
8 M1 v5 R) q9 F9 c/ G5 f9 q9 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ N! x* y' X6 |; d) e" @# |
do
! E+ N5 e; x: s8 b: f- |" u1 f Lan := rootfolder.Internal.Tools.AOLlanguage;( j1 w0 N5 N' M
if current = @.Destination -- else return# T5 g9 K% q1 l+ `% M
then# P# d' {; R# k, f# t- w4 A
@.Destination := void;$ | \- M. Y! M# A4 o
if @.occupied then" ~9 k! G/ A9 C5 n7 y/ q
part := @.cont;% o- _8 N; Y m P
@.transpOrder := void;
% ^) f9 P3 i3 g! a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ?" ?$ H0 U8 S! g- P V o
@,root.eventcontroller.simTime);
' g2 K# d( @1 Y0 I1 H @.HasOrder := false;5 |0 s6 o G4 p: E( `
@.DrivingHome := true;
4 ^3 J5 {& E6 O3 n' h rgManager.tryToStartTransOrder;- S. o6 U! N# {- I( M% W6 o P3 b
if @.Destination = void8 g: q) R! V3 ~ `: U
then -- no transport order for vehicle @- a" s" @2 P$ f" |- J% [
@.Destination :=
0 c0 w* m1 `/ z( u6 E3 ^ rgManager.nearestFreeStation(@,track.~);/ |: J- F; A1 i' m" J& Y# }
newDirection(@);
' {' I7 S/ v$ K if @.Destination /= void then' h3 Y8 U# O' J) C- A$ o
@.Destination.NumReservation :=0 l8 Y' E; j% s: \
@.Destination.NumReservation + 1;
+ P0 _# f1 s* q, `4 e7 E end;# {' I) x& S5 U0 o4 v9 C( o- g( M- }
@.CurrIcon := "drivingHome";
6 s# u8 |; d* j0 n& l% `* { @.DrivingHome := true;7 _$ \2 }# i9 B6 m% C
end;
/ D3 k' w; [ h/ E4 f7 R else -- the vehicle @ is empty, both vehicle and part are in the same dock station X! j* L0 d7 s$ X
part := @.transpOrder;8 h( H8 n/ B. V. ^* n
part.move(@);-- load part
8 `7 n: ]1 U9 k* c0 i @.CurrIcon := "load";% O( I# m+ v" j. c5 V
GlobalDistObj := part.globDestination;. u5 _' K5 n) M
assignLObj := rgmanager.rgAssignL;( Z' |8 c; `7 K* L W! z
row := assignLObj.getRowNo(GlobalDistObj);* J2 z7 J- m& e0 Y0 L* V1 w
if Row = -1 then -- since 70
1 ~/ V: c$ n* M% N, G0 } if lan=1 then1 c' Q. Z! N$ G* S3 H, B% v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), a" D0 D9 j+ I6 ^
to_str("in der Andockstation: \"",?.~.name,"\""));
. P- [; ~/ O; {: ~ else1 N' V8 s6 D- m% l( p+ A" g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) u9 ]1 k5 W" H& O1 L' P to_str("in docking station: \"",?.~.name,"\""));
& E1 k% W( T0 a% I% V8 e5 h& A end;3 A5 f3 y8 z; o% [, z
else% I3 d# s' ^+ q8 q% I
@.Destination := assignLObj[1,row];
0 s4 J$ t2 l$ i2 B& i5 U z7 i' N end;
+ g+ G7 c* M1 q: I; {8 Z. g newDirection(@);: A( c: H# P ^! w: w
@.HasOrder := true;
. n( ], u5 Y! c- m) d4 s end;
7 r9 K! u; y; t! c( M$ j4 x end;1 f+ d+ k' E( |4 Q6 E" O4 \
end; -- of the method0 E& q# J& Y" P8 O( ^# U% o; ?# F2 ^
|