/* called by: entrance ctrl of the object 'track'- V, i: e. e5 h, \ p; Y* g+ C& Z
*/
" e$ L; ]& g4 C+ `( ois0 o3 I8 {& L% |9 o ~) b' s) t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 W" I- G, @! a; c
do
: t: \/ C' w" T. F* b& a3 f Lan := rootfolder.Internal.Tools.AOLlanguage;3 Z! ]) H! t) Y8 M
if current = @.Destination -- else return! n* k5 f3 x% |- j" \* z9 U
then
/ S* ^+ i6 G: e @.Destination := void;1 a7 d: Y. w) i! }2 ]9 x. V! T1 `/ s
if @.occupied then
/ J; Y9 D1 ^+ u$ K part := @.cont;
6 L4 s7 {8 T9 f! `8 B @.transpOrder := void;
, U! C2 F3 E6 k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ t% N! J8 e" M
@,root.eventcontroller.simTime);) V/ [& s. E0 O* ~
@.HasOrder := false;
/ l1 f$ R( Z: f4 b6 w @.DrivingHome := true;; S2 P3 T, [+ }% d6 ^3 F
rgManager.tryToStartTransOrder;; ?) ]5 s+ @2 V
if @.Destination = void
( P! b; a* ]. |6 I/ R6 E& r then -- no transport order for vehicle @
& z+ y) E7 A. v7 M @.Destination :=
0 S( i m% S. M$ x% E rgManager.nearestFreeStation(@,track.~);9 x6 P" y. R3 v" r) T# r
newDirection(@);
, U6 |9 G [$ z# n! P- u if @.Destination /= void then) k* P6 R( E( j* [2 w! m
@.Destination.NumReservation :=) P, o) i9 O2 P! e: ~ f) [) J
@.Destination.NumReservation + 1;( R9 Q8 m x7 a5 K0 z) L p: f
end;
' ?- ^9 }2 G/ b7 O# h% v5 {: } @.CurrIcon := "drivingHome";7 i! S4 D2 I5 I# T# X x3 w* Z
@.DrivingHome := true;
! d; O2 v6 k" t! [; d) k end;2 e$ G; J: p( r e9 @$ z' l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# I" g; H: f/ O; m2 j part := @.transpOrder;
, Z7 G* G0 _# M part.move(@);-- load part6 w! P" w$ t8 y" R
@.CurrIcon := "load";
; F# K6 p! g0 o ^0 C GlobalDistObj := part.globDestination;
: h: K3 C( C, W# H/ j0 m: B& e3 w/ } assignLObj := rgmanager.rgAssignL;
1 s2 L H* Q: `$ o5 p row := assignLObj.getRowNo(GlobalDistObj);
' ]5 E4 O, s* t; _ if Row = -1 then -- since 70
( G [/ m e' [6 O" O! `: E3 A if lan=1 then3 b0 d/ Z" l/ l4 G8 o2 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), T: F- d# f. q! ]( P% n3 x
to_str("in der Andockstation: \"",?.~.name,"\""));6 \. Y/ `) y" J! V+ F( _+ Y1 @% |* h
else
6 ^/ l7 [! M9 a' q6 S& Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& r; V+ Y, a/ h3 U! n" i% R+ [3 w5 a
to_str("in docking station: \"",?.~.name,"\"")); $ f! L0 Q- C8 R4 I( P; h
end;4 ~$ t" M; ^$ p' s5 N. b0 n
else/ n/ G$ q, [6 m9 E
@.Destination := assignLObj[1,row];) d: b2 w$ j1 k6 l: o1 `
end; " n- z: F# u. ^) `7 U( F( g
newDirection(@);
3 N' I- ]3 {5 ]" ^2 O' b# ^ @.HasOrder := true;* f& O/ p5 H$ m
end;
% i- S, E3 ~6 x2 a end;
2 X+ \7 P+ p( Iend; -- of the method: `/ p2 C; T5 E' ~ Z8 B/ F
|