/* called by: entrance ctrl of the object 'track'
1 d! T4 K& N0 d*/5 b H' v0 o0 |1 i
is& c5 O& h6 F& f+ _( r; R Z+ h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; L# r% a3 }; ]: Q* x' p D; B# udo/ I4 u, ]3 V' z6 U7 V y7 Q
Lan := rootfolder.Internal.Tools.AOLlanguage;% |/ }4 M7 `2 X6 T
if current = @.Destination -- else return
! w- x! P- h6 b0 c8 I" I then _( Y/ M1 W2 h
@.Destination := void;& P$ A& e# N+ [
if @.occupied then
6 }2 C1 W, s1 C5 G+ s: w; J part := @.cont;
' \! a4 M9 D6 d: [ @.transpOrder := void;
7 N( F; `5 P0 F, t9 T e8 t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( s. z; G+ J. g* Y" k6 c @,root.eventcontroller.simTime); N; ^% ^( {9 C' r
@.HasOrder := false;
- Z% r+ \" f0 @, _. j3 O @.DrivingHome := true; C" G; f7 p/ G, r
rgManager.tryToStartTransOrder;+ j) \8 `# M1 u1 ?' f1 c% h; g0 T
if @.Destination = void
( K3 |3 N5 e1 @ then -- no transport order for vehicle @
1 h3 X- H/ G( `: F) V @.Destination :=
9 I. v7 A# R7 w' U. z; r/ O/ K rgManager.nearestFreeStation(@,track.~);7 J& G* o8 U7 u) N
newDirection(@); " Q, B. q0 m+ k3 q: k s* h
if @.Destination /= void then; t! ~. w! P( x- H$ a7 m- B9 o
@.Destination.NumReservation :=/ V, l$ F" w X8 X% j! m
@.Destination.NumReservation + 1;. J/ t, T- ?9 k! T* `: ?% u9 I7 o* u' M
end;
8 m. g. ]* c. K" G" T! q @.CurrIcon := "drivingHome";* l) }/ f! [2 Y
@.DrivingHome := true;
! n8 a/ C# Z8 H7 ]" r Y end;3 @- h# D& L8 m+ A3 D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* `. ~( H" {6 t* n- n part := @.transpOrder;
# ^8 T0 J. O c part.move(@);-- load part
: x0 l5 g* v; J! H+ d) y9 S @.CurrIcon := "load";. o' I& o8 t6 R) q
GlobalDistObj := part.globDestination;
2 `% r5 ?2 `4 l# i assignLObj := rgmanager.rgAssignL;" ~- P6 S* o0 Q: c% \7 P/ s
row := assignLObj.getRowNo(GlobalDistObj);
: \" e% S/ [6 l if Row = -1 then -- since 70
: G( E ` N! G6 @% _ if lan=1 then5 L7 M7 z+ m2 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 z t3 y4 D [* e3 u
to_str("in der Andockstation: \"",?.~.name,"\""));/ s3 n- ?$ c% b. c6 R
else ]/ P! [! q: `0 A' |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' ~* c# i% N. S8 }( M- \4 i
to_str("in docking station: \"",?.~.name,"\""));
: t. j o3 c) b) s end;9 t' i# G6 d+ d8 M& F
else
6 A% _' I- R/ \ @.Destination := assignLObj[1,row];9 I* N. Q2 s; b$ @% Q
end;
& f- r: @( t+ I. K: N/ B+ h newDirection(@);- a' ^! Y0 i9 Q- H
@.HasOrder := true;
% V# o+ j! I7 f$ ` end;7 |/ z* [- [2 A# L, e
end; _7 I+ i# ?' b8 S
end; -- of the method
/ j+ s" n' `. E7 `. s# ? r8 l% B |