/* called by: entrance ctrl of the object 'track'
5 r# R! [+ B/ H3 d*/# B8 Q/ u7 B6 @! I! }1 D
is
7 }8 C% s' x; j) \/ R6 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 a6 D2 R" m: ^$ C$ V$ p- ^do4 i; X& x# C7 p1 o1 S
Lan := rootfolder.Internal.Tools.AOLlanguage;/ D6 @' `; i' b! n* V; e, m
if current = @.Destination -- else return* p4 R ?) e; A I& s: [
then! l1 f1 e O7 G( I
@.Destination := void;
5 l8 Z4 L# h, I( B& F+ r if @.occupied then
9 E2 }- Y6 t. Y# c part := @.cont;
) H+ x. e3 N2 q) M, I @.transpOrder := void;' ~0 Y* b+ t6 g5 @! W8 }( P& L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, c+ s# T+ y y* D0 Q/ r s4 y* g3 c @,root.eventcontroller.simTime);6 a& N- t" Y m0 A
@.HasOrder := false;
+ w0 B# C e3 c! w @.DrivingHome := true;
0 I0 d W9 G0 Y& J! ] rgManager.tryToStartTransOrder;. k" ]5 y9 N4 _$ _) e, x9 j* ^
if @.Destination = void
+ A6 ^4 |7 I- w4 V. }& V; p then -- no transport order for vehicle @
0 G: K* G7 |: R; ]6 b# Y @.Destination :=0 T) z1 k9 a; g1 _1 g5 B
rgManager.nearestFreeStation(@,track.~);
/ Q* z; L5 Y& ~% D7 m$ W M newDirection(@); 2 \. l3 |! R- P% I- O* j8 M
if @.Destination /= void then# y8 p- G+ y8 S5 P' l
@.Destination.NumReservation :=. x2 C5 Q8 p0 L
@.Destination.NumReservation + 1;
/ i4 w2 c8 ~. y) w end;. C! G- @ g; H
@.CurrIcon := "drivingHome";/ e& \- {' _) W, @, U$ F7 p4 t T
@.DrivingHome := true;, Y4 q$ i- A7 z! W! b0 G
end;
" C) b b; E' E$ J' @( i) |# O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 Q7 x; `- L! r# C& T part := @.transpOrder;
( J5 j! I& y6 E v2 ^ ?" Q2 g part.move(@);-- load part: }0 ?* H$ H- R, l2 ?& f7 z( N
@.CurrIcon := "load";! }. N ?2 u+ }4 i; \9 M
GlobalDistObj := part.globDestination;
/ a$ n, O7 _2 K" o0 r assignLObj := rgmanager.rgAssignL;
4 _) q2 [; A# H# n% R7 o+ j row := assignLObj.getRowNo(GlobalDistObj);3 Z5 x1 {; R' B2 `* J1 a* |3 F, Q
if Row = -1 then -- since 70$ L6 ~5 [4 U0 C( p! d" @. v' N4 ~
if lan=1 then
6 D$ x0 a, p9 e" u+ @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" l) L! Q. ~7 }( X# y8 [ to_str("in der Andockstation: \"",?.~.name,"\""));8 {, K& b9 D& M
else
8 _# g. l! \2 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% Y1 d# A/ Q$ J: J" }6 M
to_str("in docking station: \"",?.~.name,"\""));
3 `, a; v5 G6 d; P! b; v5 n4 Z% y8 b end;
8 @# u7 W7 ]* d0 e( s; {/ a else
. _. F' u7 R& l' q; ?4 \; @" T @.Destination := assignLObj[1,row];, U/ M' O( E+ n ^9 H x
end; ) N# `# Y+ ?. t
newDirection(@);* V$ Q" ?, i9 i) r, j0 v7 }
@.HasOrder := true;
( I/ s" K' j# [ end;' n, d. f: M1 U( G9 u6 t
end;
0 W: y' Y5 M( C5 h+ d/ mend; -- of the method) u+ r! `3 J' T" m, z" N6 @ o4 e
|