/* called by: entrance ctrl of the object 'track'
( _4 E, y) L' k3 ~" D*/
$ L& Q, z' A; z5 m# g0 {is3 X9 L& R; N6 `4 D+ G2 f. B7 Z/ k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; N- Q2 J; k# ?5 c
do3 w# `. x+ ~. f* j
Lan := rootfolder.Internal.Tools.AOLlanguage;9 s5 X" Z1 f! H( a
if current = @.Destination -- else return8 j' Y3 ~" u; c% C w9 j
then
, Z* s" s5 Y/ c1 a, X @.Destination := void;
( b" |* Z/ l7 p5 m2 |8 s' N if @.occupied then
& F ?- G' ]9 P( K$ F2 } part := @.cont;
# h: z. p, R) H4 _0 s! J7 | @.transpOrder := void;
0 U4 V) N; \; P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, {2 b) I& \7 }' f5 T8 E
@,root.eventcontroller.simTime);3 z5 j+ z6 [' s8 q
@.HasOrder := false;
7 B' e7 t6 Y3 w% @( ?3 { @.DrivingHome := true;2 p- |0 I# W& n9 H1 B) P$ P
rgManager.tryToStartTransOrder;1 p6 t; @2 h8 R
if @.Destination = void
/ [! W2 C2 d( q2 s {4 d then -- no transport order for vehicle @
% e# G X$ l3 s7 H7 \3 `$ |/ F @.Destination :=
! @( c7 Q4 [1 e a' d" z g0 { rgManager.nearestFreeStation(@,track.~);2 }& T) [1 m! J
newDirection(@);
' j/ B( c8 P" o# a/ N/ T if @.Destination /= void then0 k+ v |" d- Y( f# E
@.Destination.NumReservation :=
, F9 x. U* n: [+ j5 Z/ R @.Destination.NumReservation + 1;
3 A! E$ s( _* ~$ T' E end;
/ f( [9 [1 {/ T$ n% w @.CurrIcon := "drivingHome";9 u6 A& D2 I9 y) K
@.DrivingHome := true;- u$ v0 K* k; S* c: [ i; Y2 q
end;
& T3 [" {1 I1 N. t; Q$ X- j+ ]1 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" y+ W4 R+ n: X part := @.transpOrder;
. S# A- @5 x4 I$ S part.move(@);-- load part
) k5 B- k5 D& J. A& N @.CurrIcon := "load";2 S; a2 M8 U0 d( c7 o+ K
GlobalDistObj := part.globDestination;$ Y3 f h; ~8 F3 K
assignLObj := rgmanager.rgAssignL;
1 h# C# ~7 C( X row := assignLObj.getRowNo(GlobalDistObj);
C) w. G y. h0 E" V& ?* i8 b if Row = -1 then -- since 70
0 X7 _" b) k! L( |# E if lan=1 then
; A2 h! Y$ I) M/ t- u' ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ m- \) e2 E( E2 Z! X' { to_str("in der Andockstation: \"",?.~.name,"\""));8 p+ W' g* T, x/ c
else
3 ]7 m: o# J2 z# W" A- @$ ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; H, k0 h* J$ [& U5 m1 k; V# c% X' q to_str("in docking station: \"",?.~.name,"\""));
0 ~6 D( k% C8 L. \5 S end;
. a4 k, M5 p% J# H) T) u, T7 A$ W else
/ F" V6 E" Z. v0 V6 W. b4 T# R @.Destination := assignLObj[1,row];1 r2 L8 S% |6 K" ?$ S7 c
end;
/ C" }6 u( I, k8 m newDirection(@);/ j6 o0 H. x1 n5 c, s% l3 G
@.HasOrder := true;( r% ^/ k# h, ~
end;" m3 q1 @, Z* ~7 o" `/ u
end;* u2 ]9 `0 z6 D( x8 @% H1 H
end; -- of the method G, |, T8 v, f. x6 K; |
|