File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ namespace Oxide.CSharp.Patching
1616 [ HasName ( "netstandard" , InverseCheck = true ) ]
1717 [ HasName ( "Oxide" , InverseCheck = true ) ]
1818 [ HasName ( "MySql.Data" , InverseCheck = true ) ]
19+ [ HasConfigNames ( InverseCheck = true ) ]
1920 [ HasEnvironmentalVariable ( "AllowPublicize" ) ]
2021 public class Publicizer : TraversePatch
2122 {
Original file line number Diff line number Diff line change 1+ extern alias References ;
2+
3+ using System ;
4+ using Oxide . Core ;
5+
6+ namespace Oxide . CSharp . Patching . Validation
7+ {
8+ public class HasConfigNamesAttribute : HasNameAttribute
9+ {
10+ public HasConfigNamesAttribute ( ) : base ( string . Empty )
11+ {
12+ }
13+
14+ protected override bool IsValid ( object item )
15+ {
16+ foreach ( string reference in Interface . Oxide . Config . Compiler . IgnoredPublicizerReferences )
17+ {
18+ ValidationRule = reference ;
19+
20+ if ( base . IsValid ( item ) )
21+ {
22+ return true ;
23+ }
24+ }
25+
26+ return false ;
27+ }
28+ }
29+ }
Original file line number Diff line number Diff line change 1- extern alias References ;
1+ extern alias References ;
22
33using References ::Mono . Cecil ;
44using System ;
@@ -8,7 +8,7 @@ namespace Oxide.CSharp.Patching.Validation
88{
99 public class HasNameAttribute : PatchValidationAttribute
1010 {
11- public string ValidationRule { get ; }
11+ public string ValidationRule { get ; internal set ; }
1212
1313 public StringValidationType ValidationType { get ; }
1414
You can’t perform that action at this time.
0 commit comments