/* called by: entrance ctrl of the object 'track' w- b4 Q% }% p' B8 d9 E
*/% r/ l: v3 E# }# T7 `5 D. p
is6 E4 z. [) H; x+ j; ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 B# [# B% N! d4 C% b& ^0 I
do
' @* {6 T! O" T( _4 q Lan := rootfolder.Internal.Tools.AOLlanguage;
t& p; q) q; `" V5 k5 P8 \, o if current = @.Destination -- else return% t y8 `2 r, M7 J/ m& D5 P) H/ N
then
' S# j/ O5 V* P' m0 b @.Destination := void;
2 s# v, J3 O) e8 o5 b( J if @.occupied then+ o* _* G8 t% _7 }4 E: w
part := @.cont;
4 F$ u5 m; { a: z* d3 c- i' m! y @.transpOrder := void;, _4 e! _! x$ B% N9 {8 h8 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, `* A+ ~& J" n3 m2 w @,root.eventcontroller.simTime);
1 z, s1 }1 q; r @.HasOrder := false;
/ J" f+ F. B' W0 k0 j @.DrivingHome := true;
' w. v8 {- d. l5 ~; M' g& M% J7 m+ u rgManager.tryToStartTransOrder;) E# B0 P f6 j
if @.Destination = void; }7 K% [/ C8 }4 p
then -- no transport order for vehicle @. {) J: F- d9 B. e8 v; r$ y
@.Destination :=2 \% B+ @2 a2 A2 C
rgManager.nearestFreeStation(@,track.~);5 ~( v1 e: p; i
newDirection(@); $ [# y3 ?) t7 C9 m- i0 X: H
if @.Destination /= void then
5 D) R/ O: k0 \( p* I# `8 l @.Destination.NumReservation :=( `% @2 ?% X9 R% G
@.Destination.NumReservation + 1;
Q& e$ G% x* } end;) ^* y) X4 t: U, L
@.CurrIcon := "drivingHome";
( D, R0 b) l' C* i+ ~ @.DrivingHome := true;4 r8 s: J1 i* j! o" Q
end;3 I8 @: s7 X- O) M$ m: e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. g# F2 R: }( d; Z, A: v, { part := @.transpOrder;
4 t7 @. Q0 {: y' \8 ^+ ` part.move(@);-- load part1 r7 U R0 @# D+ `7 Q0 \
@.CurrIcon := "load"; x; |7 a9 d7 U9 g9 z* L" S( a! v4 S, @
GlobalDistObj := part.globDestination;
4 E: U9 ~2 R6 U0 i5 W+ p! Z assignLObj := rgmanager.rgAssignL;$ u$ ]9 }5 M. ^" }, o6 Z
row := assignLObj.getRowNo(GlobalDistObj);0 U/ t+ F( _9 v& \& J* `
if Row = -1 then -- since 70& w7 O$ e) N, q0 B+ ~& C
if lan=1 then
, q. R3 N; q! F) X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! S6 u6 Q0 c5 J, v' b( D+ p" p$ ?
to_str("in der Andockstation: \"",?.~.name,"\""));2 c9 L# X+ b/ E# ]$ C
else
# f2 A- D$ N4 z9 Y6 S- r( W. a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ l, r' [: V- j; i1 m- @( w
to_str("in docking station: \"",?.~.name,"\""));
* n) z' C* _7 G9 @) X2 C2 k end;8 h/ `" U" j B$ N( B
else
3 A7 r# [( S* R( M) S. V- J$ J$ s D @.Destination := assignLObj[1,row];3 [7 g7 U6 e# ^
end; & p g5 L9 Z, S! r$ w2 p$ A5 Q1 f
newDirection(@);: F* p. H) G3 A8 ~' U |
@.HasOrder := true;0 }" y" i9 v" ^. p% D
end;
4 p' R9 y3 D/ v( `" f' y end;
% A# t+ c! {, wend; -- of the method
3 u9 [1 Z9 L- N0 ]( G) f |