/* called by: entrance ctrl of the object 'track', h$ A3 h# {8 n {: U* z
*/
1 b' q8 ^3 e7 l, @( b) H6 }* h, xis0 c Z* [1 m0 Z, V" o& R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. H# @* ]$ L# Ddo
. ~/ S2 g* D2 j! @ Lan := rootfolder.Internal.Tools.AOLlanguage;7 T8 f7 G4 g+ _7 m5 F b- B y
if current = @.Destination -- else return% J {5 @% M. `, D
then
( h! D# T7 I; g a: Y @.Destination := void;
I' I0 D1 ^ S+ b7 w if @.occupied then# d% A1 i' N: f& g# e
part := @.cont; ^' p! W4 Y2 ?- g" A
@.transpOrder := void;! {/ M5 r7 k7 f2 e3 E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, F$ ^- s) S. _; ]' ^& }
@,root.eventcontroller.simTime);* ?: h/ ?% w) m" M' h0 J
@.HasOrder := false;
4 e5 n) K& Y! n% ^) I9 G @.DrivingHome := true;5 Y8 a1 S- g$ T: `1 |
rgManager.tryToStartTransOrder;: B/ B2 \% ~5 L$ t1 _: o
if @.Destination = void& r& a( h/ A4 ~+ w% Z/ F
then -- no transport order for vehicle @
[) _! m& ]1 z' z, w @.Destination :=$ v/ H) m) V9 t) D- H8 F
rgManager.nearestFreeStation(@,track.~);
+ w' _) a0 s/ m* V: } newDirection(@); ! T' W9 b9 D2 V+ s& s
if @.Destination /= void then n8 s5 A" U5 c% \5 M, C
@.Destination.NumReservation :=
9 W$ b- `& q6 M; O# p @.Destination.NumReservation + 1;
4 k/ ]6 G9 F1 O' _1 ]# _ end;
# Y) T8 X0 r. X( ` r' Z @.CurrIcon := "drivingHome";
; b# j, [8 t% n3 X5 `0 U5 { @.DrivingHome := true;
2 b5 h1 @+ C9 X! o+ e* ^ end;# U" V5 d7 q& y8 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, D+ E& D' S" v; |6 t7 C6 g% z b part := @.transpOrder;; }& {- g& X' D7 d( `5 O
part.move(@);-- load part
( d/ e' n, f1 {+ s; n4 k' X1 q @.CurrIcon := "load";
5 N6 q1 T( T3 F$ U9 z GlobalDistObj := part.globDestination;: i! d9 F/ t- ~
assignLObj := rgmanager.rgAssignL;2 S; ~) h3 Q8 o
row := assignLObj.getRowNo(GlobalDistObj); N/ l7 E+ T% t" |9 d
if Row = -1 then -- since 70
2 [4 e3 C) Q8 W if lan=1 then
5 M8 e7 u# n# Q& M" O! W, | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( r) @. z" a# `0 Z7 L. _7 T% S# ^# w to_str("in der Andockstation: \"",?.~.name,"\""));
4 P1 A, O" S! T- v' l else
+ x! n) j8 y" T o9 X7 @' E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 C2 a; e5 k# g7 N m2 E to_str("in docking station: \"",?.~.name,"\"")); % A! [3 K9 k6 q
end;
6 C1 U3 h1 U' k; a8 m else8 ?- P) m' `5 Y6 {; m# Z! c
@.Destination := assignLObj[1,row];
# n* |+ L: [3 z3 v' O* s2 @3 [6 F4 J& p end;
7 z$ f$ ~# c- ^ newDirection(@);
! U0 V. S) j" N6 J7 L) g) H @.HasOrder := true;
6 H) v* L- V, y! U- v" B/ b- G2 ` end;( v% G u: v: J4 f* s! n0 G* A
end;: x4 Z* i2 s( a' X
end; -- of the method- Q% S0 Y, y3 ~' f0 T; F: a
|