/* called by: entrance ctrl of the object 'track'4 j7 O, [, j- M) \6 _. p$ ]; L
*/
. ^1 z3 a( t. \$ A) K8 N) Ais
$ i* p; i' w4 w9 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ g. K3 ~8 {7 e' [0 Ddo
" ~% |+ n# O$ ~% A5 L9 p% W Lan := rootfolder.Internal.Tools.AOLlanguage;8 |1 a: Q- Z. f5 J& ?, d
if current = @.Destination -- else return
% H. ^ D3 D* P+ p- p6 { then
) _- t% k# |9 _ @.Destination := void;
4 D2 }3 a# O* e) c4 H, ^. ` if @.occupied then* E) m8 N2 U+ H# }9 z% U
part := @.cont;3 K" j! F& Y5 J6 c, V% W% f! `
@.transpOrder := void;
" Q) `8 A* h# @; V# o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! i2 {" @. d7 x @,root.eventcontroller.simTime);
" {$ w% U6 ^4 w9 j @.HasOrder := false;
2 ~2 m4 P4 E- u( v: | @.DrivingHome := true;
3 V( w( s/ H N. e/ q4 W rgManager.tryToStartTransOrder;
' I+ @7 ^7 I5 O if @.Destination = void
4 U. j! O3 G" K( R. a+ ^2 t" m then -- no transport order for vehicle @
5 a" C2 O! v' ]) \: n9 w @.Destination :=, R6 k* R. M: x. e2 L1 s+ m8 T* {# K
rgManager.nearestFreeStation(@,track.~);
& Z8 {4 w2 |* y' Y ]9 ? newDirection(@); % _. j- b/ H) F6 u, x
if @.Destination /= void then: P. p# j' L$ A+ ]- E
@.Destination.NumReservation :=
" D* S5 X- U* j2 K4 V! [ @.Destination.NumReservation + 1;$ w. f5 O6 o ~" k1 K, d6 O
end;
D- d+ X& e4 S @.CurrIcon := "drivingHome";0 l* Q8 ~7 p4 P5 U
@.DrivingHome := true;
8 |( L. {9 \4 R8 {" J2 E end;
7 Q' D3 u \. y) y1 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station F- g) c7 J Z, j: D: M: t- Y
part := @.transpOrder;# ?* d G, ?" n) n1 |
part.move(@);-- load part
( @) t: [" v0 j- D @.CurrIcon := "load";. }, u9 C( N$ L" G
GlobalDistObj := part.globDestination;8 L$ j) o) F. `; H5 V6 u+ p. U$ X- ?
assignLObj := rgmanager.rgAssignL;
- i. J' d2 _; J+ N: k, a row := assignLObj.getRowNo(GlobalDistObj);7 I# ^6 {/ `! E/ w' h" I, ~$ r" d
if Row = -1 then -- since 70; p' R1 {5 F" y# Y
if lan=1 then( [. ]9 j! i6 u1 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 l- z* {$ L/ m0 _$ c6 S# a
to_str("in der Andockstation: \"",?.~.name,"\""));2 j$ r) q8 ^: j' s
else* g0 B: D# K0 }4 K n: Z) P. f1 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ `0 `1 Z) u! Q! w( ~1 X
to_str("in docking station: \"",?.~.name,"\"")); $ C6 |# K9 U' T/ J% O# S1 y
end;( c6 h# x/ w; J' d0 }& s0 `+ p
else
! r% e' B0 C6 M* |# H& u7 n5 j @.Destination := assignLObj[1,row];# R' |9 A' Q' G* t1 g
end; * ]3 P! {" q ]* n
newDirection(@);
& Y i2 ]7 F$ T% X' c6 K @.HasOrder := true;
0 E- m6 m1 v' p' ` end;( ^8 N0 X# J) K* N4 ?
end;
7 B+ L2 a+ _- a% G+ oend; -- of the method2 P4 x/ w6 y$ l' V! ^ i
|