/* called by: entrance ctrl of the object 'track'
# ]6 b! k* ?+ F9 S8 n2 }6 v*/( Y) f6 O0 k P8 A6 t
is' ]9 u: o2 C& n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 ?5 H8 G r5 }+ [+ n
do X! N( _" {" Q9 B# e
Lan := rootfolder.Internal.Tools.AOLlanguage;( o# N# y ?' F0 U; F/ e5 v. P
if current = @.Destination -- else return
: P) B. n/ y9 f then$ N i7 U7 D3 o! I; H' Q+ L3 V
@.Destination := void;5 k9 f9 M1 P( s* |
if @.occupied then* z/ n) E, {2 h& J- R. K
part := @.cont;
6 }/ V* o: T# v @.transpOrder := void;& a9 e4 i; O! j m U% X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 y( y9 u- G- Z" o
@,root.eventcontroller.simTime);" _/ k- s' U+ s( G, t6 h. }
@.HasOrder := false;
$ b+ T, d- _) R; c @.DrivingHome := true;
6 k" X! U: ]" f u' E rgManager.tryToStartTransOrder;1 ], j) [ x7 _7 o* c% `
if @.Destination = void
+ z/ q5 c% l0 I1 S$ U then -- no transport order for vehicle @( m9 m* o6 d$ w
@.Destination :=. L4 u" Z; \$ ?, p) i$ [
rgManager.nearestFreeStation(@,track.~);# E0 @) h) i, }+ N, W$ G2 t
newDirection(@); ' `/ s6 B* \2 H# F! |
if @.Destination /= void then
}( {9 w- ^" u" D- }% j! } @.Destination.NumReservation :=
6 B6 i6 r9 S7 }% l( N @.Destination.NumReservation + 1;' G- Z% A0 O1 n6 x. L
end;* e% H$ o' E4 k1 Q; ~3 @
@.CurrIcon := "drivingHome";
) f' k9 r2 V( s: y% ~( S$ p @.DrivingHome := true;
P% y6 Y7 b- k8 u0 B end;
$ x' n( \; `0 V3 a) M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" h- q5 _" ^8 F2 k part := @.transpOrder;5 m0 U5 ?& C! v
part.move(@);-- load part$ X+ y( b! T/ g9 Z, \
@.CurrIcon := "load";3 }5 }( e( {5 E! f
GlobalDistObj := part.globDestination;
* D0 o9 Q4 K7 J9 X, o l assignLObj := rgmanager.rgAssignL;6 ~( _! {) C- \
row := assignLObj.getRowNo(GlobalDistObj);# J; O8 U7 ^. g5 L9 W* i! s4 |
if Row = -1 then -- since 704 g$ `' E5 l' S+ V! O
if lan=1 then
' h7 J; ^! Z; j6 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 @( K% x5 D% B; N, O/ B4 c+ ? to_str("in der Andockstation: \"",?.~.name,"\""));$ x/ ?1 y. H. W" M* U; I
else! D9 [( k3 z4 a+ \; w2 J: P5 O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% q: ]% N3 E0 |/ T' X3 B
to_str("in docking station: \"",?.~.name,"\""));
& e* j! n: F6 G1 _- \3 O end;
- u! U& u; H* a- S, W else
1 ^) X5 x; Q0 E% g& w% Q: ~. ] @.Destination := assignLObj[1,row];5 V6 G6 j* {: m
end;
, }8 j4 ^8 [$ R5 X5 E- q, j newDirection(@);/ g I: ^+ U9 T! S* `+ R
@.HasOrder := true;, u0 F) U+ ?( \+ }1 D* q- j
end;
) c" }$ w& p4 w3 J( M end;
5 ?5 v/ I6 Z+ e) L; zend; -- of the method
: ~1 E2 m9 I0 M b! |( a3 q |