/* called by: entrance ctrl of the object 'track'
5 ^* @- H8 q. J, f# O*/7 _; ~2 E% a# K; R
is& \4 U" ^, b% p# i3 m( t$ z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 _, q) r# S. X8 g3 V6 h% B; ldo8 V7 S {$ L6 O+ I' ~# K
Lan := rootfolder.Internal.Tools.AOLlanguage;+ {$ H( T/ |/ S% W @; I
if current = @.Destination -- else return
; {& U, l1 J1 U0 J' f5 | then( u3 U x0 {3 s
@.Destination := void;
$ e9 s; ]( ]7 a! q. G% D if @.occupied then) @* B+ _5 I# Y" F4 P1 w2 B
part := @.cont;
) d$ A7 p @7 T( p) u& ` @.transpOrder := void; Q$ F: ?' I; a9 a& @& m3 T9 \( N2 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 {- Q) {: S7 s4 F! H
@,root.eventcontroller.simTime);& x- F% ~5 k; h& V
@.HasOrder := false;
. {$ x6 \) u0 z, A- K4 k+ L @.DrivingHome := true;
7 F/ v) j4 W- b S# ~2 Y6 ] rgManager.tryToStartTransOrder;
- Y" M s' X" H" ] if @.Destination = void
0 }7 L* I) \2 v& { z then -- no transport order for vehicle @
* ^) |! c2 U$ b I# } @.Destination :=% n8 s; [$ _! _5 y3 s. S, e2 p! w
rgManager.nearestFreeStation(@,track.~);
0 D, ? e" M+ W3 _5 g: D5 @4 o newDirection(@); & E* f M' i1 ?, n# P' j- q
if @.Destination /= void then
- _0 D) [5 m+ K- ~9 p( z* \ @.Destination.NumReservation :=! s p6 |) V/ r# R
@.Destination.NumReservation + 1;
0 l' {9 i# D/ i b) ] end;# a/ l% l4 s- [
@.CurrIcon := "drivingHome";0 L/ s* T/ p a3 w
@.DrivingHome := true;( x: a. g% Y7 ~; ~
end;
& G, q6 I3 v& r$ O% x else -- the vehicle @ is empty, both vehicle and part are in the same dock station( q. ^6 Z0 T( l5 c" W4 T
part := @.transpOrder;) G8 J/ \. a6 Y
part.move(@);-- load part X* _7 K% E# f) B; q) z$ _
@.CurrIcon := "load";
+ y0 Q& _9 c/ O$ z GlobalDistObj := part.globDestination;
- V+ Z' o) U3 H R/ @ assignLObj := rgmanager.rgAssignL;, n3 G5 o+ E, i/ R' _! ?
row := assignLObj.getRowNo(GlobalDistObj);& W/ F, Y8 i6 d& v: q! N( I
if Row = -1 then -- since 70, S# b3 `& k& C* J
if lan=1 then
5 K4 e' ^; t& d# q, T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 f' P4 V5 t, |/ h1 M+ j5 q7 p5 w
to_str("in der Andockstation: \"",?.~.name,"\""));& j- i( V0 k5 n3 p6 d% H' W
else
1 N% L" D# d9 }# l( y7 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( m9 C% ? H6 o5 r
to_str("in docking station: \"",?.~.name,"\"")); ) t& ]' Q/ T# s; N, u( U8 [- h
end;& @0 T; z& K0 `5 K6 [- G
else
+ M5 }. g! j% c @.Destination := assignLObj[1,row];
: R' M* X* d( M, ]6 O- m end; 2 `. g6 S! ^. y2 e
newDirection(@);
, x' ?8 Y% F+ v, _4 j3 M% Y @.HasOrder := true;* ?; d( ^* _4 V; f: d3 N
end;
0 |7 X8 Q: @7 w4 ^ end;
7 ?/ @! z8 W. K+ M* k4 bend; -- of the method
1 R$ G, u1 O# N' w9 i$ X6 i; c |