/* called by: entrance ctrl of the object 'track'
( v5 u# M, y2 a3 `*/- R$ I- |& s( L' Y# o
is# c7 O+ z! U: v: ?; E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 i$ M! k! s7 b* C& ido8 q/ A; `9 ~& |3 A% i2 f$ H
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 e$ T; S+ e& E! P) P7 O if current = @.Destination -- else return% n( t3 ?/ S0 R2 E
then
3 P. t( `1 O: R. b( _9 L8 w, { @.Destination := void;( `0 D* g2 d1 i" x
if @.occupied then9 O6 u9 C9 \8 x H) ^
part := @.cont;7 U* [) l: ^% n5 H
@.transpOrder := void;2 u" q/ t1 ?6 l8 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," R3 `; r6 B6 U/ S3 d
@,root.eventcontroller.simTime);
5 |: r9 W. K5 K' V2 { @.HasOrder := false;) u+ ^- K/ h; P S2 ?$ ?
@.DrivingHome := true;
# p/ Z3 y) _+ x0 Z) D rgManager.tryToStartTransOrder;' v1 ^; j# c( R* |/ `; l* S6 g
if @.Destination = void
+ t5 G( u# O0 T' J- ]0 } then -- no transport order for vehicle @
' U( k. z+ v2 b2 G @.Destination :=
2 z' e% F5 A1 r1 n) q rgManager.nearestFreeStation(@,track.~);
: f. S7 y/ v( J newDirection(@);
. d3 N7 I: `* X: p if @.Destination /= void then" M& U) Z! B% { _5 q- x0 e: R" S. r% L
@.Destination.NumReservation :=
4 w+ H1 u- g, P, A0 J @.Destination.NumReservation + 1;! s% C, k/ y2 Z, e
end;0 C' N' t6 l; O
@.CurrIcon := "drivingHome";! ]- N; o( a# Z' a+ U# c
@.DrivingHome := true;
# w# O F6 }3 K5 v/ D end;# h }: Y& G! r* _. t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ [% s: G" \+ p0 N% X" o( z7 e6 E part := @.transpOrder;
3 D2 z2 C6 K% z/ N* w; { part.move(@);-- load part! ]! M+ o- Q3 g1 j
@.CurrIcon := "load";( \. C( q: N; h+ _7 Z9 n
GlobalDistObj := part.globDestination;# }2 _! x P% X: f
assignLObj := rgmanager.rgAssignL;
/ L+ [6 O" N, o5 Q9 s row := assignLObj.getRowNo(GlobalDistObj);
# S. G1 u4 B* J' J. T* a if Row = -1 then -- since 70/ R* E! m% Z/ j+ A
if lan=1 then
/ ^8 I" w1 H/ X7 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 O% m8 t- _" E9 W* a8 ~
to_str("in der Andockstation: \"",?.~.name,"\""));
* t* B& D% [. r4 G else
5 X8 `7 Z q. a1 {& z8 [0 @( } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. E" Y) z8 X4 f ]( `- R$ k
to_str("in docking station: \"",?.~.name,"\""));
7 `/ `" l4 K' H# d# v3 m end;; s2 R% e2 K7 Y# C# S
else
% w+ C7 ?9 e/ z# v3 Z8 K h0 D9 l @.Destination := assignLObj[1,row];
4 C' J/ ?+ D; `/ F7 H% U end;
( {% Y8 l1 r) g newDirection(@); S5 s" I4 g/ W
@.HasOrder := true; w3 I9 U/ x P+ c3 G4 Y
end;
f7 R3 k0 M9 { end;
/ S d, M/ V$ ]" w$ v9 zend; -- of the method: ]# j; q6 S3 Y
|