/* called by: entrance ctrl of the object 'track'
* U. [( ?/ _ q- ]*/" t- Q6 z/ n, t& @2 ^8 _
is
+ o+ [( } P. R- N1 [: Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;& @% e, d& e @8 v
do) {* k7 v; o; l
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ t7 J# Y1 N$ U6 p if current = @.Destination -- else return; A1 ?2 W) G9 }) k( k
then, W7 i& j+ o, E! ]* l/ m
@.Destination := void;& [5 z% ~( s- t3 v; ?
if @.occupied then' a u( T* ]! a, ^; x& _
part := @.cont; q# o t! C" v$ u# m
@.transpOrder := void;, \' k2 n2 D+ O5 C S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- X1 @. D2 e' _: c
@,root.eventcontroller.simTime);! T( a$ ]5 J* P% d; t
@.HasOrder := false;
0 Q* }& V3 G! F0 R+ F* U# f2 G @.DrivingHome := true;
" ]: n1 n/ h4 p$ w; T' H rgManager.tryToStartTransOrder;
/ N& u9 O4 F% _* X3 `! E if @.Destination = void; b; e4 ?) x- j
then -- no transport order for vehicle @* E" y; p: j! p$ j. t
@.Destination :=% I0 @' [9 H+ x
rgManager.nearestFreeStation(@,track.~);
1 C1 i- v6 j) N9 s& e% z" a3 L9 s newDirection(@);
% m c p- `; U3 d) H. ] if @.Destination /= void then
/ e: L" |; H% R) y. A7 Y( a @.Destination.NumReservation :=
2 r* u7 [; O* D$ G8 f4 Z @.Destination.NumReservation + 1;; M( t7 n0 C" u5 \ N: f
end;
8 H0 l1 r* f+ G6 x9 w @.CurrIcon := "drivingHome";* }4 {# g/ v5 |4 f6 h4 p
@.DrivingHome := true;
. R: n# |' ~& Y end;
# @" y5 P1 l. ^/ \4 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station: j& q: V3 N" _9 m/ o
part := @.transpOrder;9 E% V5 {8 |% S8 e& L. p" h
part.move(@);-- load part
( V' b# O! C* P7 g @.CurrIcon := "load";, S3 @6 P, T* H9 o
GlobalDistObj := part.globDestination;( ^9 v6 T6 z, q: y
assignLObj := rgmanager.rgAssignL;
2 R/ ^4 m: F% p& R$ l row := assignLObj.getRowNo(GlobalDistObj);7 }5 w% b- k. F) I! }
if Row = -1 then -- since 70
+ T* i7 x( J3 ?6 n- E if lan=1 then( {6 b, Z) G) f4 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 s$ Q1 ?, t9 c5 h to_str("in der Andockstation: \"",?.~.name,"\""));
, A; g$ a: m O) P8 B else9 o8 i5 t- y) F0 [6 V3 ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 w! T* b! n3 Q8 A8 f0 z7 v9 ]
to_str("in docking station: \"",?.~.name,"\""));
2 p- O' M9 `( e+ k ] end;* d. M* U _, u/ P. M( P
else' E! w- o/ j# Q/ ~
@.Destination := assignLObj[1,row];" G- t5 _5 h. \, U3 f" M' ^
end; ) Y# {& U2 i- f: s' T' x
newDirection(@);
9 m9 W4 Z2 V5 G0 T( j" b' I/ ] @.HasOrder := true;! s# T5 b3 i- a f# f8 A7 ?, E/ q( p
end;
F% p0 y2 q3 V, M$ E k0 q3 V end;
: L. N O% o; B! @end; -- of the method# ^2 M8 z- N9 i( ?0 E
|