From 85f62b8b8af1e6966052c5de4b2463721cc52fc6 Mon Sep 17 00:00:00 2001 From: Madpeter Date: Mon, 27 Apr 2020 04:20:54 +0100 Subject: [PATCH] moves Parcel set flag to static functions --- Core/Static/parcel.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Core/Static/parcel.cs b/Core/Static/parcel.cs index 4a7d57c..ac512cc 100644 --- a/Core/Static/parcel.cs +++ b/Core/Static/parcel.cs @@ -8,6 +8,17 @@ namespace BSB { public static class parcel_static { + public static void ParcelSetFlag(ParcelFlags F, Parcel p, bool set) + { + if (p.Flags.HasFlag(F)) + { + p.Flags -= F; + } + if (set == true) + { + p.Flags |= F; + } + } public static bool has_parcel_perm(Parcel P, CommandsBot bot) { bool has_perm = true;