/* called by: entrance ctrl of the object 'track'
- L+ e7 ?; s) S" I% `*/$ c4 k1 M# P3 z6 U" G
is0 u) O n W% D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 s! k. Y/ S# N4 Ado- j; R+ [2 |* _% f- i. @4 X
Lan := rootfolder.Internal.Tools.AOLlanguage;
% t, L p& W9 L if current = @.Destination -- else return- l% ]* g, Y6 s0 v- o
then9 Q9 V2 `9 `& e* D* F
@.Destination := void;
$ [$ a4 B7 U+ ~( |- G8 E/ p2 P if @.occupied then
# {! \4 ~ J$ q" l" z) u part := @.cont;
/ K/ T6 E L* A5 [9 C: l @.transpOrder := void;3 i8 ~* f7 v( ~- |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! C* X$ F0 q. [9 I" B
@,root.eventcontroller.simTime);- h! K C$ m+ J& t
@.HasOrder := false;* P( m K3 w9 Q! W
@.DrivingHome := true;: g9 h, F! f. e0 @1 c
rgManager.tryToStartTransOrder;
1 O! z# n3 G5 @. K9 }/ I if @.Destination = void: i+ R% S4 i# h! A3 K" {4 l/ v: m
then -- no transport order for vehicle @* _* @+ y5 t. X, w# t* |
@.Destination :=% A7 ]1 J ~, I. C
rgManager.nearestFreeStation(@,track.~);
4 l. O7 U$ m7 N# H( Y4 ?6 Q% q( m" { newDirection(@);
) ^9 ]9 E: @+ S5 K if @.Destination /= void then
1 C5 z( q# p+ |8 @ @.Destination.NumReservation :=0 h$ d# e* a- i' }7 `% v
@.Destination.NumReservation + 1;" p% Y' o+ O1 L( f
end;
4 T' I+ M% y- x, b @.CurrIcon := "drivingHome";8 A( H7 N; m, a' o* ~( X- v& F
@.DrivingHome := true;3 M, _4 z! e7 J1 ^( y& E3 {* q3 h
end;9 Y1 Z5 [( [1 L& Z& I+ Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ K \5 H$ E* H! S; Z l4 S part := @.transpOrder;! L, {" b' c" O) e# U1 q/ {- Y( C
part.move(@);-- load part% |& Y' C: P6 J: x1 a8 Z; G
@.CurrIcon := "load";# @+ X6 O' s. t# n
GlobalDistObj := part.globDestination;. S# e7 t, B" B3 }1 M- \
assignLObj := rgmanager.rgAssignL;$ H% _; Z' S% E1 J- N" z
row := assignLObj.getRowNo(GlobalDistObj);% X& D. t5 W4 T4 M$ W! x
if Row = -1 then -- since 70% `) j' \+ h+ T. ~
if lan=1 then
* I- h: D- c& r. \* |/ v5 m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* p, ^3 ~9 F; t, n+ |9 F3 v/ a
to_str("in der Andockstation: \"",?.~.name,"\""));, E% e* L9 v9 F7 V: |$ h9 C \+ q
else
8 h3 a* n4 s- s* |8 Z: ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. r* v5 f2 q* \8 |" Z/ T to_str("in docking station: \"",?.~.name,"\""));
4 I0 {6 |- L' ] b; w w end;
8 ^1 ?/ m1 E( T! d6 [& r! L else( g2 i( r z, p0 H9 }, U( Y4 T3 q1 e
@.Destination := assignLObj[1,row];2 x- I: J6 [. i$ b" h7 e
end;
! e' f& M5 x8 y, B) x$ r- E newDirection(@);
' ^9 t6 r: f/ ] @.HasOrder := true;+ U' Z3 Q9 l5 N
end;
$ o- i) n6 j3 ^$ Y. q! h end;
3 S+ V0 q1 y. o/ N" b2 P3 n/ Bend; -- of the method5 }7 s! w8 F8 v4 K8 \+ H$ s! `
|