From 09f8b4b4f8c08564c8fafefea304f7dc0fe12176 Mon Sep 17 00:00:00 2001 From: Madpeter Date: Mon, 27 Apr 2020 04:21:49 +0100 Subject: [PATCH] moves the Flag set to static --- Core/Commands/Parcel/SetParcelFlag.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Core/Commands/Parcel/SetParcelFlag.cs b/Core/Commands/Parcel/SetParcelFlag.cs index 59bddf7..ed5c6a0 100644 --- a/Core/Commands/Parcel/SetParcelFlag.cs +++ b/Core/Commands/Parcel/SetParcelFlag.cs @@ -17,18 +17,7 @@ namespace BSB.Commands.CMD_Parcel public override string Helpfile { get { return "Sets the parcel flags of the parcel the bot is currently standing on
" + "Example:AllowFly=False~#~AllowDamage=True
" + helpers.create_dirty_table(parcel_static.get_flag_names()) +"
"; } } - private void Dosetflag(ParcelFlags F, Parcel p, bool set) - { - ConsoleLog.Warn("Setting flag: " + F.ToString() + " To " + set.ToString() + " at " + p.Name + ""); - if (p.Flags.HasFlag(F)) - { - p.Flags -= F; - } - if (set == true) - { - p.Flags |= F; - } - } + public override bool CallFunction(string[] args) { if (base.CallFunction(args) == true) @@ -74,7 +63,7 @@ namespace BSB.Commands.CMD_Parcel { if (flags.ContainsKey(cfg.Key) == true) { - Dosetflag(flags[cfg.Key], p, cfg.Value); + parcel_static.ParcelSetFlag(flags[cfg.Key], p, cfg.Value); } } p.Update(bot.GetClient.Network.CurrentSim, false);