diff options
Diffstat (limited to 'ShiftOS_TheReturn')
| -rw-r--r-- | ShiftOS_TheReturn/Hacking.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/Hacking.cs b/ShiftOS_TheReturn/Hacking.cs index 5c473df..e670756 100644 --- a/ShiftOS_TheReturn/Hacking.cs +++ b/ShiftOS_TheReturn/Hacking.cs @@ -81,6 +81,18 @@ namespace ShiftOS.Engine } } + public static byte[] GetLootBytes(string lootid) + { + foreach (var type in ReflectMan.Types.Where(x => x.GetInterfaces().Contains(typeof(IHackableProvider)))) + { + var @interface = (IHackableProvider)Activator.CreateInstance(type, null); + var bytes = @interface.FindLootBytes(lootid); + if (bytes != null) + return bytes; + } + throw new NaughtyDeveloperException("Seems like the loot system's trying to work without any loot. This isn't normal."); + } + public static void InitHack(Objects.Hackable data) { var hsys = new HackableSystem(); @@ -212,6 +224,7 @@ namespace ShiftOS.Engine Objects.Payload[] GetPayloads(); Objects.Port[] GetPorts(); Objects.Loot[] GetLoot(); + byte[] FindLootBytes(string lootid); } public class HackableSystem |
