/* called by: entrance ctrl of the object 'track'
/ l9 R- H; ?4 Y& i' P) A*/
4 ?5 `, l& t3 A: U4 kis3 G; U& j! d+ v: {1 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 z$ h" d" n+ |7 {. [5 ?do
- |# y4 j2 I0 e/ a9 `( `. [ Lan := rootfolder.Internal.Tools.AOLlanguage;
8 d3 D7 |0 _3 J( ] if current = @.Destination -- else return
; R& u. f" H! Z1 L5 t then
! \1 {" m5 v7 w @.Destination := void;
& q6 j* k# o3 Z5 W if @.occupied then! p# P- P2 q' C
part := @.cont;3 {+ U: X; d9 ^/ {/ f
@.transpOrder := void; J+ z, ^0 F) l; j* s+ I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; m, C1 m; a; Z @,root.eventcontroller.simTime);
8 X' }! O D# I3 L- G) t% T @.HasOrder := false;
, g* `& [( f: ~2 w9 ]' G% P @.DrivingHome := true;
7 ^) y5 y" x( o& w rgManager.tryToStartTransOrder;
& P5 T1 y# C$ N+ `9 T if @.Destination = void6 x1 g8 {% h, F( e' k; l* @$ z# m
then -- no transport order for vehicle @
3 H2 S/ H" S0 |' w @.Destination :=
r* Q2 Q) B, n5 r rgManager.nearestFreeStation(@,track.~);
6 K( I6 D9 f) ?% d; F6 l+ O# @* e# G newDirection(@);
5 r! i, k- P& W+ P' f6 l if @.Destination /= void then5 ^3 \3 J+ g( R! W X; _+ [3 e
@.Destination.NumReservation :=
S+ j) R+ t9 s6 d( T/ E @.Destination.NumReservation + 1;
- W+ Y# l/ i8 g: N W4 n end;
% ]6 F6 d- E8 z6 | @.CurrIcon := "drivingHome";
c5 o/ J3 G* G @.DrivingHome := true;, T3 _# |% _( b r% M
end;1 K- _5 V5 ?7 t" h: d s0 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station Q+ z+ |, G0 U: A
part := @.transpOrder;9 ~5 j% @ y& w* x' _' J, n9 R
part.move(@);-- load part! y2 q3 \4 Q% u; O6 ?/ ?$ ?0 O
@.CurrIcon := "load";# Y" i4 s6 K7 r1 B9 [
GlobalDistObj := part.globDestination;
% p4 e1 E- T5 }8 F0 o- k assignLObj := rgmanager.rgAssignL;: C8 T8 c5 X0 c+ T
row := assignLObj.getRowNo(GlobalDistObj);
( v6 U2 Q9 q- t& w! j/ c6 K if Row = -1 then -- since 70
! H$ \) F' t# Q9 t \ if lan=1 then
# z5 G! o9 a2 R- H2 b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 c( n! T# J. `6 `2 J to_str("in der Andockstation: \"",?.~.name,"\""));
& \( G# z$ f# K else5 u, X4 A8 a) p! X3 m3 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 A2 M- @: Q6 p& v$ L to_str("in docking station: \"",?.~.name,"\"")); 0 }: X/ o( p5 r1 ~( b' v5 A
end;$ I& i7 f+ |1 R9 P/ D% {" ?* y
else
7 X: ?, X) U4 g @.Destination := assignLObj[1,row];7 U4 {+ T8 |( T
end; ! `' r `/ [7 [
newDirection(@);
$ u% t4 }2 k( j& U) B c0 \ @.HasOrder := true;0 K5 k5 E0 Z p
end;) N& _3 `2 E* ?4 G
end;
* {# M9 r0 z3 fend; -- of the method, j) p1 [0 A. l* u; Q2 u
|