/* called by: entrance ctrl of the object 'track'
4 Z: V! G5 L# E*/
# r7 v3 J; s5 Lis7 W* f0 z* k/ a# t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) A9 }7 I' k: v% cdo/ M2 f4 ?7 g! n0 C- s" _/ P" k7 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;& }6 g- }7 P! J# y* i. Y: H
if current = @.Destination -- else return3 g9 C7 I" n( A. W; J' N
then
1 Y4 R( v# h9 a. C. T% s; l @.Destination := void;8 d2 }2 t6 i: Q9 D" M# L7 C
if @.occupied then+ _1 y7 O* L9 Y# j6 u
part := @.cont;2 P9 b& n; a% l9 w# R% M
@.transpOrder := void;
$ s- x9 {0 j9 z: N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' Z0 B- n% h, e. M) b @,root.eventcontroller.simTime);
( x) o3 f4 u+ E8 i- ~) a" V @.HasOrder := false;
# I' G8 g( k9 i9 L! B+ W @.DrivingHome := true;
8 l' q; B9 P* l4 a rgManager.tryToStartTransOrder;! A9 c% ~0 i: h
if @.Destination = void0 U% O# e4 I. w# c1 c1 q9 d/ z
then -- no transport order for vehicle @
4 y6 t$ O. j$ J+ |% S; x# y1 o @.Destination :=
4 [ u2 T5 q8 q6 i% e! U rgManager.nearestFreeStation(@,track.~);1 w" Y& {5 v* A$ F' k' _
newDirection(@); & l* k' |' \: @' W* |
if @.Destination /= void then3 ]; \: {! {6 @' w) B
@.Destination.NumReservation :=, U# Q1 ^/ d) }+ x
@.Destination.NumReservation + 1;; o, N" {* {" r* [; q6 s
end;
0 L9 G4 M" ?" r. Z9 J2 v @.CurrIcon := "drivingHome";
$ L% V8 r; M7 t7 s; @2 |8 d @.DrivingHome := true; A* x/ }3 T; Q6 w: w' {, E4 `" |
end;
7 P2 v2 }/ |! |7 u; W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; @% N9 p- F# ~7 y5 b1 c part := @.transpOrder;6 U, g% A" f; i7 x) Y3 a, b0 U' {
part.move(@);-- load part
$ s( }. E6 Q% N2 f- Z2 J+ z @.CurrIcon := "load";; N- o5 _( t! D3 m/ ^
GlobalDistObj := part.globDestination;
3 j, F) n) n5 M9 W# O- ~2 @ assignLObj := rgmanager.rgAssignL;1 ?4 z8 f) S6 T7 N' E( ?
row := assignLObj.getRowNo(GlobalDistObj);
- o$ _9 U- y+ w9 ~- s7 d, O if Row = -1 then -- since 70: k3 v. e( O" W
if lan=1 then
+ u+ [, a3 d7 ^+ y2 T+ W- V% p" B- b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* m2 b' N& K2 y% U to_str("in der Andockstation: \"",?.~.name,"\""));
3 S& s5 O8 s/ Q! v9 ~; V else9 G: }9 a* v) K( `) a" F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. b- D5 Y' }& X( p: X7 e* m
to_str("in docking station: \"",?.~.name,"\""));
; d! H" h3 G: d* ]% ] Z end;
' @7 S5 C1 w' m; y+ p" }! A else
( g1 P, c& S W: l9 y" x, Z @.Destination := assignLObj[1,row];
; u8 h4 n" X( X2 p$ W& c" J+ W end;
" P8 ?5 g& P& r* P# k; |( E5 s+ ] newDirection(@);& q) r: B/ q. [" e. i3 a1 V
@.HasOrder := true;% c! v& n2 ^% h. ^: \
end;
6 g, W. H: R F; U6 ?2 a end;
+ X, G2 ?2 ^$ W E0 Nend; -- of the method# J. p5 {4 v) R& a4 G* e
|