/* called by: entrance ctrl of the object 'track'. y' L2 ?1 s, a
*/
* {/ z& u1 o5 D4 |/ Sis' N* s( y% e- f% N' s0 O" ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 l& { T2 K2 u' X, G
do3 E% U, t7 G" P
Lan := rootfolder.Internal.Tools.AOLlanguage;2 L3 v8 X1 _3 f9 W' x9 H
if current = @.Destination -- else return
* |( l4 a, G: b: m, I: @2 _ then: _& p; g' [7 [
@.Destination := void;. j( P6 x* M! Z! ]6 L# r3 R1 V( d
if @.occupied then$ T1 B9 j, o2 t' e! ~/ U
part := @.cont;
& L4 `1 y% |% B# E @.transpOrder := void;. f( ~9 G t/ k( ^2 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) i4 p( {5 J5 I4 ]3 e0 M* A @,root.eventcontroller.simTime);
9 d, B \) b, J+ ? @.HasOrder := false;/ J3 ^0 i, h3 F. U+ g
@.DrivingHome := true;1 N( {. x# g4 _
rgManager.tryToStartTransOrder;
o- F2 _' M/ d& I if @.Destination = void
6 [' x$ m. U5 Z3 b4 q then -- no transport order for vehicle @
* @3 ^" P# K5 q% v" A' w1 D: t$ D @.Destination := ]! Q6 W0 I3 k! i+ I- G
rgManager.nearestFreeStation(@,track.~);
S( D0 i# f* A newDirection(@); 7 {/ H* z' d @4 y3 Z8 ]( J' |
if @.Destination /= void then
! K0 M7 f9 ]; X @.Destination.NumReservation :=
8 {5 D2 P$ t6 S- E @.Destination.NumReservation + 1;6 X: M' N1 K$ D
end;
& w" x( u9 h; R6 P @.CurrIcon := "drivingHome";; X) Q/ F7 n' R* U) ^, S. U
@.DrivingHome := true;
+ g. B, E: D6 [. E: d! ^, T end;
+ m+ [$ h! d( l$ H5 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! K/ ]! A8 h! F) d& P5 A part := @.transpOrder;
$ r" o- S. s0 [6 H$ e, g part.move(@);-- load part* n% F+ R4 |; O8 p2 T. t" U% a
@.CurrIcon := "load";0 I6 p* P$ {! L- }
GlobalDistObj := part.globDestination;* |! x( |2 e6 B
assignLObj := rgmanager.rgAssignL;
! I/ H! ?; |; V$ `2 h* A4 t row := assignLObj.getRowNo(GlobalDistObj);
2 j& V5 J( d- u& T4 g if Row = -1 then -- since 70
' \, k6 g% S% S2 ~& a if lan=1 then
4 f. w, C! {! I' K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 Z' U. L9 {8 ?. ~2 ]+ I( _- ^; F! q
to_str("in der Andockstation: \"",?.~.name,"\""));$ M6 D) R5 n3 ?1 ?: f# Z/ ~
else" t: ~6 n1 Z5 j# a" Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. }; c* z, l9 Q' M5 O
to_str("in docking station: \"",?.~.name,"\""));
6 S% @! w. h, Y6 A! l end;7 R( M! W3 p* V/ Y" c3 }# F
else/ w* k2 g" j V; R8 U
@.Destination := assignLObj[1,row];+ ?4 A8 G% ?5 j' I9 ]2 ]$ m7 ]
end;
$ k! k# Z0 R% C newDirection(@);( K6 x$ A. c2 h# k. ]% q
@.HasOrder := true;( d6 V: _! l3 R/ b% M2 B3 R& u
end;3 x" a, j, [6 l* ~: D `
end;' ?/ G4 `8 P! ]1 T0 ]
end; -- of the method
' O2 T# E4 G% Q L' g$ e/ \2 R: t |