This repository was archived by the owner on Mar 29, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptTag.cs
More file actions
40 lines (38 loc) · 1.35 KB
/
ScriptTag.cs
File metadata and controls
40 lines (38 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using Overlayer.Tags;
using Overlayer.Tags.Attributes;
using System;
using System.IO;
using System.Reflection;
namespace Overlayer.Scripting;
public class ScriptTag : OverlayerTag {
public string Script { get; }
public string Path { get; }
public ScriptTag(string pathOrScript, MethodInfo method, TagAttribute attr, object target = null) : base(method, attr, target) {
if(File.Exists(pathOrScript)) {
Path = pathOrScript;
} else {
Script = pathOrScript;
}
}
public ScriptTag(string pathOrScript, FieldInfo field, TagAttribute attr, object target = null) : base(field, attr, target) {
if(File.Exists(pathOrScript)) {
Path = pathOrScript;
} else {
Script = pathOrScript;
}
}
public ScriptTag(string pathOrScript, PropertyInfo prop, TagAttribute attr, object target = null) : base(prop, attr, target) {
if(File.Exists(pathOrScript)) {
Path = pathOrScript;
} else {
Script = pathOrScript;
}
}
public ScriptTag(string pathOrScript, string name, Delegate del, bool notPlaying, ValueProcessing flags = ValueProcessing.None) : base(name, del, notPlaying, flags) {
if(File.Exists(pathOrScript)) {
Path = pathOrScript;
} else {
Script = pathOrScript;
}
}
}