// Function from file: disposal-structures.dm public Obj_Structure_Disposalpipe transfer_to_dir(Obj_Structure_Disposalholder H = null, double?nextdir = null) { Tile T = null; Obj_Structure_Disposalpipe P = null; dynamic H2 = null; H.dir = ((int)(nextdir ?? 0)); T = H.nextloc(); P = H.findpipe(T); if (P != null) { H2 = Lang13.FindIn(typeof(Obj_Structure_Disposalholder), P); if (Lang13.Bool(H2) && !Lang13.Bool(H2.active)) { H.merge(H2); } H.loc = P; return(P); } else { H.loc = GlobalFuncs.get_turf(this); return(null); } }
// Function from file: disposal-structures.dm public Obj_Structure_Disposalpipe findpipe(Tile T = null) { int fdir = 0; Obj_Structure_Disposalpipe P = null; if (!(T != null)) { return(null); } fdir = Num13.Rotate(this.dir, 180); foreach (dynamic _a in Lang13.Enumerate(T, typeof(Obj_Structure_Disposalpipe))) { P = _a; if ((fdir & P.dpdir) != 0) { return(P); } } return(null); }