/* called by: entrance ctrl of the object 'track'
3 V5 t8 @; e( {*/
! b" @; _2 z( p9 x. |" O! P& |is
$ i( z" p. C1 s1 o8 R" H% Q/ R' Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ r7 R# I. \& }4 m% b. q% u
do3 _' L2 C! l g0 M
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 u! I9 y6 c7 n2 ~" q" N. k- G if current = @.Destination -- else return
. n8 F# Q# {' l b* \; [* s then0 |& l4 X! V, i6 _+ s$ u, u# H- K
@.Destination := void;8 w4 d5 {& h$ ^3 V6 q v
if @.occupied then5 I5 x5 t2 `$ O1 o' s! O" q
part := @.cont;6 l9 C: D' h q8 \) u2 ?* @9 x
@.transpOrder := void;
2 ^3 r3 w1 U3 G8 ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 o3 [4 r( J" d3 ]5 s; `
@,root.eventcontroller.simTime);
3 f# X- Z% ?' Z5 I3 H4 U @.HasOrder := false;
. x4 G# l" B3 O. u8 N& m @.DrivingHome := true;" @, P1 @8 K$ C) ?" n' g( }
rgManager.tryToStartTransOrder;
0 r. D2 H. b E' @+ Q4 \ if @.Destination = void! t9 {: v# r+ P
then -- no transport order for vehicle @: [1 H4 o* z$ B6 ~$ y7 M" _7 d
@.Destination :=# B2 X+ n) G6 v7 C4 Z
rgManager.nearestFreeStation(@,track.~);
: X; q0 Z! v$ o/ C newDirection(@);
* b4 T' _3 W) q7 g1 Z8 o2 T# T% x if @.Destination /= void then
1 @' o. I, b- N7 t9 X @.Destination.NumReservation :=
, }9 \0 q* i2 F7 y @.Destination.NumReservation + 1;: R. a3 S& n7 S! D" o' O* F
end;
& {$ b8 U5 E5 W9 L, z, z! b2 X @.CurrIcon := "drivingHome";
! W' A* G* S2 e @.DrivingHome := true;6 d) Y- b! P) f
end;
$ M% o6 E) g( u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- N, T* b# D# k) `, ^. ~% X part := @.transpOrder;
6 y+ X A6 l$ C part.move(@);-- load part
) r+ d4 ]& Q& H" m+ i @.CurrIcon := "load";
* Z5 @( r- `+ i" m1 R9 _! n& C, M GlobalDistObj := part.globDestination;
6 B `- P4 h, O3 E assignLObj := rgmanager.rgAssignL;$ L2 T6 t4 u) f1 \( p2 u. w
row := assignLObj.getRowNo(GlobalDistObj);* R0 `9 I! E, K$ P$ U0 V/ q6 q
if Row = -1 then -- since 70
; r6 j8 Y/ H, f if lan=1 then
, [' s \5 `( d& w. Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 I% n4 j; y9 y% } L% j0 `7 W to_str("in der Andockstation: \"",?.~.name,"\""));
1 K! H4 o( h, L) q* j7 \& F$ ?) @ else
, u( n( X& c4 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ ]! ?$ y7 [( e$ A: ^. l
to_str("in docking station: \"",?.~.name,"\""));
* O6 o) ~' Z4 f$ ~ b7 c5 V end;
$ u7 h7 E( V5 j, |! ` else# y/ O* f0 c) t$ H) S. A3 g
@.Destination := assignLObj[1,row];
8 l. r. w1 i! i6 C% g8 B0 b0 q end;
* u( `' n: D0 C( @ newDirection(@); P/ `( R# z- v+ s* H
@.HasOrder := true;# ?( H' ~9 N3 }3 @. x
end;* G* C) o5 s& I4 \2 G9 U7 P
end;# [; R3 Q# ^+ a: [
end; -- of the method
3 M5 W" X. w' N. y, w |