/* called by: entrance ctrl of the object 'track'
# Q' n E v; B( s+ d3 I*/
% i% ]% D- R* J; |( K# |is
$ y7 j! ?5 r' [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;% I: P! f4 c% e7 {
do
L$ Y. T% L3 V, y" Z# q Lan := rootfolder.Internal.Tools.AOLlanguage;
5 O# o* _* |1 ~3 T' h if current = @.Destination -- else return
4 T! p+ m% U y' }$ X0 Z$ j then, s# I0 j( O# y X" R* r
@.Destination := void;
# T1 a0 B3 Z) F# ?* ~ if @.occupied then
+ S2 w; B+ s0 x: ~ part := @.cont;
3 ]+ W! w& L. G5 P( b @.transpOrder := void;
* L' W- C7 z& s- E5 Q Y3 f$ J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 v* ]' K2 w) F* F; A @,root.eventcontroller.simTime);6 J9 a7 z8 T! @2 ~' t) T
@.HasOrder := false;; v( [: {8 A9 q0 F6 J9 }
@.DrivingHome := true;5 g, |$ {4 Z0 L" O/ _# X2 I- T) Y3 n
rgManager.tryToStartTransOrder;
5 I1 g5 b3 s& X/ c7 p6 | if @.Destination = void: C. w1 m# C: ^7 K, w1 N
then -- no transport order for vehicle @( x$ @6 V: Z% A1 N' `8 S( I2 |
@.Destination :=( f0 C' g8 M ]8 h
rgManager.nearestFreeStation(@,track.~);
+ C {; Y \1 P8 K) E# n f newDirection(@); . O! i, _* I$ N$ i# u0 `
if @.Destination /= void then
A/ g7 Z. } l1 G: m @.Destination.NumReservation :=
P* y. r) b( l% } @.Destination.NumReservation + 1;
& P% G s% e; |4 X# f: I& S end;
( ~4 s4 H( S- ?' ~/ F8 h/ ?+ r @.CurrIcon := "drivingHome";. S( Z* j) x0 }% H
@.DrivingHome := true;( s5 V* ~9 z# t0 h: B8 }- o
end;
& V+ O7 R& |& r: {8 c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 l4 K7 V; q- i( v/ l/ l( x O0 l part := @.transpOrder;+ L8 L$ o$ f9 f; R
part.move(@);-- load part
0 N1 x8 r( l/ ]2 {; ?; N ` @.CurrIcon := "load";4 Y! s' C+ r* P% t" w
GlobalDistObj := part.globDestination;
* U+ o: I+ u6 K1 z/ N1 e assignLObj := rgmanager.rgAssignL;
& _: z+ i6 V+ N7 h row := assignLObj.getRowNo(GlobalDistObj);
0 ?3 ]& T- K6 N$ r" P- _ if Row = -1 then -- since 70
7 K {4 v5 \+ r3 \. j if lan=1 then L+ K7 l1 `1 }8 U$ }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' _0 t; |" J+ O( c% U3 E8 Y) `9 l
to_str("in der Andockstation: \"",?.~.name,"\""));2 z# ` z8 O" t% R
else
# v9 |7 A( E- [# a4 T4 e C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# m: u/ v- u) J! `; j+ ]
to_str("in docking station: \"",?.~.name,"\"")); ! K) p4 y% Q9 Z4 x3 U
end;
1 y4 F1 h5 N# ]& N6 M9 c# d& x else
& u7 c) Q( b& Z0 Z! D# |, { @.Destination := assignLObj[1,row];0 y* s2 B8 E% | f
end;
) U8 F3 w$ |2 J" V3 M newDirection(@);5 x/ _& O9 J4 y5 W; X+ {
@.HasOrder := true;9 h1 \0 ^2 u5 D3 Z3 Z
end;
& Q( D, ?9 _$ Z7 W7 P+ n" k end;
- w6 ?) M) B2 R) C6 nend; -- of the method2 N) S, O6 K' E3 G4 t
|