/* called by: entrance ctrl of the object 'track'8 u9 ]: C+ x- J' ? K
*/
' L$ S- a! {" ]is, m6 u. d) O# V: _! R$ d' s- I) [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" c) u3 ]! x9 o/ C" ^0 hdo3 n4 d1 l3 M$ o/ X
Lan := rootfolder.Internal.Tools.AOLlanguage;8 S) m( `3 V+ C$ ?6 u
if current = @.Destination -- else return) Y9 d, C" V; d4 Z" h
then3 d$ F6 y1 h: S. o2 ?7 I
@.Destination := void;
1 z' _& G/ A; n# T* a7 y/ Z) H$ X if @.occupied then4 i& G$ E( P& g6 o
part := @.cont;
3 J7 r! {7 e; F& h! l/ V @.transpOrder := void;
' q* O; N2 j. i) ^7 x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( ]9 P& f5 \% h4 M3 t8 M& s" Z0 g! H z @,root.eventcontroller.simTime);$ r5 i. k% P' o2 K
@.HasOrder := false;+ d6 I" h0 s+ E2 c& }$ k( Y
@.DrivingHome := true;+ h( I! y! B+ ]/ X9 v* p6 [3 O
rgManager.tryToStartTransOrder;
+ T: F% n, y$ n if @.Destination = void9 s; O9 g/ ]! _9 r2 G
then -- no transport order for vehicle @/ T' B3 f0 d) C. v: }
@.Destination :=9 J: m; x& n4 \" N' Q9 p
rgManager.nearestFreeStation(@,track.~);
* j/ n* d: ^; Z4 A newDirection(@); ! l( y) R8 p$ U9 n- T+ a& n) J
if @.Destination /= void then
+ E: X$ w' N# i$ q @.Destination.NumReservation :=& [; V$ Z E l5 k
@.Destination.NumReservation + 1;
: ?6 H$ j! i) L end;; M' n/ e; K2 c
@.CurrIcon := "drivingHome";5 R1 {, T6 Q0 k$ I! ^+ P" Z
@.DrivingHome := true;
5 S( W2 L7 }0 J6 p& R# P- W$ O# E end;
( ? g$ @6 ?" n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 q! n) }, [/ ~5 P part := @.transpOrder;& y& d9 X+ ~/ k7 C, d" s
part.move(@);-- load part
. @! {! k( @3 \$ ?1 j' U0 O# E3 O3 p' F: P @.CurrIcon := "load";. I* E5 T: s* u& Q
GlobalDistObj := part.globDestination;8 a" u" Z- O$ n% t+ P c0 r
assignLObj := rgmanager.rgAssignL;
* U& I9 j* X: h- L7 ~ row := assignLObj.getRowNo(GlobalDistObj);
: O, t4 m a9 N5 L4 V' d if Row = -1 then -- since 70
9 s$ r. @, U: |# C if lan=1 then( O& V5 C: @: F' F; `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# b* G% }4 j/ \+ @2 I5 s' I to_str("in der Andockstation: \"",?.~.name,"\""));- ?) m" U" H5 r5 P
else7 {+ ^+ t( `: x$ K0 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! Q1 Z) y8 s& g
to_str("in docking station: \"",?.~.name,"\"")); 3 t! Y. P! M* l2 o5 k# T% i% N2 i& \
end;" E: E9 w) ]% {' K
else$ A$ X, _+ B9 ?$ g! ^) R
@.Destination := assignLObj[1,row];* V2 k ?# M: X! N
end; + C0 p h. Z4 r2 n! x! x3 u5 U
newDirection(@);
( ~& T" e1 W. {3 I% L6 K @.HasOrder := true;8 u" r4 t# X( y7 ~
end;
^( g3 f8 u; Q. q end;. `( `& w: w$ Q5 E" G- d' V
end; -- of the method
; C8 M* {6 U8 Q$ h |