Permalink
Browse files

Add feature to allow "all" containers to have the locked flag added t…

…o them. the skip elements list should be used to skip containers that you don't want modified with this.
  • Loading branch information...
cartman-2000 committed Feb 13, 2018
1 parent af9a54b commit 9281051b40fdba4ad1b66535a2467108fb10e63c
Showing with 4 additions and 3 deletions.
  1. +1 −1 AntiGrief.cs
  2. +1 −0 AntiGriefConfig.cs
  3. +2 −2 Properties/AssemblyInfo.cs
@@ -248,7 +248,7 @@ private void OnPrePreLevelLoaded(int level)
if (asset is ItemStorageAsset)
{
ItemStorageAsset stasset = asset as ItemStorageAsset;
if (stasset.isDisplay && !stasset.isLocked && Configuration.Instance.MakeDisplaysLocked)
if ((stasset.isDisplay && !stasset.isLocked && Configuration.Instance.MakeDisplaysLocked) || (!stasset.isLocked && Configuration.Instance.MakeContainersLocked))
{
stasset.GetType().GetField("_isLocked", bindingFlags).SetValue(stasset, true);
shouldUpdateCount = true;
@@ -25,6 +25,7 @@ public class AntiGriefConfig : IRocketPluginConfiguration
public bool MakeElementsExplosionProof = false;
public bool MakeElementsInvulnerable = false;
public bool MakeContainersLocked = false;
public bool MakeDisplaysLocked = false;
[XmlArray("SkipItemIDs"), XmlArrayItem(ElementName = "ID")]
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.2.0")]
[assembly: AssemblyFileVersion("1.3.2.0")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]

0 comments on commit 9281051

Please sign in to comment.