/* called by: entrance ctrl of the object 'track', h4 |$ c) g3 F# O( C$ Q
*/" J+ ~+ K! w/ \2 y: i4 m# o
is8 V1 a# B+ y, s/ j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 d+ o( F o$ _
do: t5 h* ~* | @1 y7 k
Lan := rootfolder.Internal.Tools.AOLlanguage;8 E* {3 E8 } s9 }6 |! R. y! G
if current = @.Destination -- else return9 j1 N3 ]- c" H
then0 @% R! }: x, C. _2 N+ x
@.Destination := void;
7 N; D$ Y: M% h% O if @.occupied then: }" a# L& I# k# Q
part := @.cont;9 c) |( K& p J/ J2 w$ z& ?
@.transpOrder := void;
( H( |/ E& {% X7 w' O2 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. k% X% M# r9 s! h0 y: N8 }
@,root.eventcontroller.simTime);: p! r" A8 o3 q: u
@.HasOrder := false;4 O+ Q( }: S, H; J) o
@.DrivingHome := true;
& Y' Y5 [- d0 M$ Z$ }8 a& Y* h rgManager.tryToStartTransOrder;: |; R" X5 P3 u: d7 Y7 P7 s! f1 `
if @.Destination = void- \& p9 E# l* v4 @; m- U, o. C- d
then -- no transport order for vehicle @) ~ m& K5 E& c2 y/ S# k/ e3 V
@.Destination :=+ g, G( h/ v% v6 W3 s
rgManager.nearestFreeStation(@,track.~);3 I# b1 Z' l6 i' }; n, E4 ]$ n
newDirection(@);
4 w4 ?- D/ l7 e2 \% z if @.Destination /= void then
6 y, V! G9 B; z7 N+ X @.Destination.NumReservation :=
, [- O1 i" _ W5 W2 U @.Destination.NumReservation + 1;0 g y- V+ z6 q$ \; B
end;
+ X1 F5 k7 _6 ~, ~6 k" U- A$ w @.CurrIcon := "drivingHome";
U9 u: F5 z+ N0 Y( g @.DrivingHome := true;! U5 q5 [) o# t3 o+ K
end;" D7 Y' {7 _# o( R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 j. `5 i9 ?. D; B part := @.transpOrder;8 |! B2 r) Z0 M7 s
part.move(@);-- load part
% T' \* o+ r9 c8 t$ _ p* i @.CurrIcon := "load";6 ?1 k) b* \; V
GlobalDistObj := part.globDestination;
2 R, U Q7 c s8 d assignLObj := rgmanager.rgAssignL;% U) d; J( ~) Y v) [! [
row := assignLObj.getRowNo(GlobalDistObj);
. V2 U/ M3 J2 A: U* U" P( h if Row = -1 then -- since 70
% R% ?$ i+ P3 f x7 o9 r if lan=1 then6 D8 ~3 ~9 f7 _! C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ x9 F# _/ ~' @1 e
to_str("in der Andockstation: \"",?.~.name,"\""));
7 L' T4 t& w( v o else C/ W% `8 H# m# H% G! ~4 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), g) U1 H4 B6 E4 U$ x
to_str("in docking station: \"",?.~.name,"\"")); & Z- |1 N! A2 Z3 }
end;
8 G4 B6 W: |3 K0 ~; s+ u0 b- [ else! N3 V9 Y2 M6 W( ~9 B" u" }
@.Destination := assignLObj[1,row];% g6 d7 _* v3 V$ r9 X1 J
end;
7 L: J3 V- ^2 N( F newDirection(@);; W$ b. P V2 Q# K
@.HasOrder := true;- q( Y6 j2 Q* w
end;' }. J; {/ u% H4 F6 y. r
end;
& [7 z; s4 l& r* hend; -- of the method& A/ _! I3 d, `1 w0 e$ s; ]
|