/* called by: entrance ctrl of the object 'track'3 Z6 G/ ^, K" s% y* Z
*/
' |1 m6 r& z5 z i4 h* H; ~+ Pis
' D d% J1 q2 o( [% x part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ b) e/ K& g, B2 \4 q
do* `2 C* m1 o3 V0 H( {* b
Lan := rootfolder.Internal.Tools.AOLlanguage;, q% a5 O' V" ]) K7 I
if current = @.Destination -- else return8 Y1 |$ x& U- R9 c$ `
then9 }7 U( [4 k" I' H2 ^0 H+ A
@.Destination := void;
5 }! T V0 F; U# C if @.occupied then4 Q6 O& l2 {- B8 M; b$ u" S# S
part := @.cont;& w4 g8 ?5 c# y$ @1 R; I* m( i! d
@.transpOrder := void;
4 J: v" a6 S# A% q; W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ~2 @3 z8 E6 y# I# X$ `4 I l
@,root.eventcontroller.simTime);
; b! w: ~( ]& ` @.HasOrder := false;) P/ }: r$ y1 p* ]" N
@.DrivingHome := true;4 g# w% l; q& s, g' h4 `, H
rgManager.tryToStartTransOrder;
4 a4 P# @% q' P& y; \* D1 s if @.Destination = void
+ W p1 J- C& s$ u then -- no transport order for vehicle @) ^7 p6 q5 j9 m
@.Destination :=
1 I2 x, P' A/ h7 o" r2 V6 H rgManager.nearestFreeStation(@,track.~);% \( ^5 J m3 Z; b$ j
newDirection(@);
/ u7 |, O7 ^$ h if @.Destination /= void then
. d4 t' w- w" k9 e% Z @.Destination.NumReservation :=
" V2 s. {4 p! R9 t @.Destination.NumReservation + 1;: x( ?, g$ b* M
end;
1 |9 B9 S: o* G# M2 e+ U @.CurrIcon := "drivingHome";
7 W3 A1 d- Y8 E, ?9 f: E# r6 U @.DrivingHome := true;$ e8 K+ U& X m
end;
& {& [$ P. U- {& N9 X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 o+ V2 H6 w9 Z$ U$ [- I- |1 X3 c: ^ part := @.transpOrder;0 O$ f! Z( a. c o; v4 a
part.move(@);-- load part2 u4 b* z' v7 g; N
@.CurrIcon := "load";
" h: k0 q9 H2 C GlobalDistObj := part.globDestination;
, m( u* |- O# t( l! Q, E) M2 S assignLObj := rgmanager.rgAssignL;
1 `0 U! d( j8 F' \9 L row := assignLObj.getRowNo(GlobalDistObj);
) R% |. H# r( Z4 Z0 o, L; ? if Row = -1 then -- since 70. o; c$ b6 G8 P, Y1 t
if lan=1 then
& }$ j- n, J- V, J" a* G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 X n) v0 x' q+ S5 H, T1 I3 X
to_str("in der Andockstation: \"",?.~.name,"\""));
5 L+ n4 ?6 S- H( r else
( b) L8 K& h- w# Z6 J0 U6 h3 G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 O7 p" D7 b; g0 Y
to_str("in docking station: \"",?.~.name,"\"")); - k4 i- W D) [9 s, h% |; w
end;
, {8 ^; @$ p: z4 S( u else
9 B6 D0 `! |1 @: j @.Destination := assignLObj[1,row];
6 O& B, d; X0 j7 c end;
. p& b# t0 x! k9 u9 A9 ^: Y newDirection(@);* D+ s2 N4 b3 E) ~9 H! r8 o
@.HasOrder := true;
( F8 N$ w& \/ Z- }* c' \ end;
' X+ c3 I# l# o7 ]7 S/ R end;8 Q% c0 Q. ]! p2 K; p6 S
end; -- of the method4 L. B1 ?- O* U$ f3 n, ]+ x2 d
|