Skip to content

Releases: obvEve/SecretAPI

3.1

19 Apr 17:19

Choose a tag to compare

Custom Settings

  • Added CustomSetting::IsCurrentlyAccessible
  • Added CustomSetting.TryGetPlayerSetting<TSetting>(Player, bool, out TSetting?)

3.0

10 Apr 18:07
57ebfd7

Choose a tag to compare

3.0

🛠️ 3.0 Full Release 🛠️

❔Removals and Changes

Attribute has been changed to Attributes
RoleExtensions has been removed to avoid conflict and as it is no longer needed due to LabAPI additions

🔧 Settings

Added CustomSetting::LastUpdateType to allow checking the update that was received (None, Initial, Update)
Added CustomSetting::HasValueChanged to allow easier checking on whether a value was changed between the current and last update from client
→ This also includes a Last(X) property on most settings to allow viewing the last value received
Most get only properties have received a setter that automatically sends the update to client

💫 Effects

CustomPlayerEffect::Owner is now loaded on first use to prevent issues with it returning null
Fixed not unsubscribing from SceneManager.sceneLoaded after registering effects
Renamed:
SprintDisablerEffectDepleted
StaminaUsageDisablerEffectEnergized
Removed TemporaryDamageImmunity as god-mode exists in base-game and this is not necessary

🚫Round Ignore

Introduced PlayerRoundIgnore, allowing players to be excluded from round logic.
→ Includes PlayerToStatus, a dictionary mapping each player to their RoundIgnoreStatus.
→ Accessible via Player::RoundIgnoreStatus extension.
RoundIgnoreStatus enum will be used to determine what a player should be ignored from

🏢Room Extensions

Exposed KnownUnsafeRooms (private → public)
Added RoomSafetyFailReason parameter for IsSafeToTeleport to allow determining what reasons the safety check should fail
Added bool TryGetTeleportLocation(Player/IFpcRole, out Vector3? position, FacilityZone, float) - This uses base-game checks from 106 exits

🔍 Reflection Extensions

Added IEnumerable<MethodInfo> GetMethods(Assembly, BindingFlags)
Added MethodInfo? GetNestedMethod(Type, string, string)
Renamed CopyProperties to CopyPropertiesTo and added an exception in the case that source & destination types are mismatched

🧱 Prefabs

Added properties for getting the Scp079CameraToy prefabs easier
Added PrefabDebugger (Internal util) to allow easier checking of current game prefabs and whether a SecretAPI prefab accessor is outdated

⚡ Performance

FastEnums has been added for SecretAPI enums to allow faster flag checking than Enum.HasFlag

Full Changelog: 2.0.3...3.0.0

3.0.0-beta4 (Hotfix)

10 Apr 12:25

Choose a tag to compare

3.0.0-beta4 (Hotfix) Pre-release
Pre-release

Beta Notice

Last beta was supposed to be last but major issues needed to be fixed.
This changelog will only describe changes between this and the last beta!

Full release will occur later today if this patch is successful.

Reflection Extensions

Added IEnumerable<MethodInfo> GetMethods(Assembly, BindingFlags)
Added MethodInfo? GetNestedMethod(Type, string, string)
Renamed CopyProperties to CopyPropertiesTo and added an exception in the case that source & destination types are mismatched

Round Ignore

Fixed the features not working at all
Fixed server crash issue

Full Changelog: 3.0.0-beta3...3.0.0-beta4

3.0-beta3

08 Apr 19:12

Choose a tag to compare

3.0-beta3 Pre-release
Pre-release

🗒️ 3.0-beta3 Notice

This is the third and final beta for 3.0. This changelog will only indicate changes between the previous beta to this.

🚫 Round Ignore

Added PlayerRoundIgnore feature that allows plugins to ignore a player from being considered in scp targets or in the round ending checks.
This can be accessed either through PlayerRoundIgnore.PlayerToStatus or by using the provided extension Player::RoundIgnoreStatus directly on a player.

💫 Effects

Removed TemporaryDamageImmunity as I do not believe it is needed with basegame godmode existing - Please use your own effects if you need a replacement
Renamed SprintDisablerEffect to Depleted to match base-game naming system and to be a much nicer name
Renamed StaminaUsageDisablerEffect to Energized for the same reasons

🔷Performance

Minor performance improvement via the form of FastEnums for SecretAPI enums that uses a bitwise check rather than Enum.HasFlag

🗒️Changelogs

Beta2 -> Beta3: 3.0.0-beta2...3.0.0-beta3
2.0.3 -> Beta3: 2.0.3...3.0.0-beta3

3.0.0-beta2

02 Apr 12:55

Choose a tag to compare

3.0.0-beta2 Pre-release
Pre-release

⚠️3.0 - Notice

This is a beta and not all changes have been properly tested. This release should not be used in a production environment and should be for development purposes until it's considered stable.

Additions

  • A lot of previously readonly properties for settings have received a setter
  • CustomHeader has received getters for Label & ReducedPadding
  • Most settings have received a SendServerUpdate to allow easier updating
  • Most settings have received a property that allows easier checking for previous value to allow comparing the old and new value received
  • CustomSetting has received HasValueChanged & LastUpdateType to allow easier checking for value changes
  • RoomExtensions.KnownUnsafeRooms has been made public to support changing RoomSafetyFailReason.KnownBad values
  • RoomExtensions now has new methods ``bool TryGetTeleportLocation(Player/IFpcRole, out Vector3, FacilityZone, float)
    • This uses the logic found within Scp106PocketExitFinder / SafeLocationFinder from base-game

Changes

  • Cleaned up the code for certain parts for improved readability
  • CustomPlayerEffect::Owner will now attempt to get the Owner on access rather than on Start

Breaking Changes

  • Renamed SecretAPI.Attribute namespace to SecretAPI.Attributes
  • Renamed CustomButtonSetting::HoldTime to RequiredHoldTime
  • All setting constructors that have the functionality will now have collectionId & isServerSetting params
  • RoomExtensions.IsSafeToTeleport has received a new RoomSafetyFailReason overload to allow more control over the failures

Full Changelog: 3.0.0-beta1...3.0.0-beta2

3.0.0-beta1

30 Mar 11:33

Choose a tag to compare

3.0.0-beta1 Pre-release
Pre-release

⚠️3.0 - Notice

This is a beta and not all changes have been properly tested. This release should not be used in a production environment and should be for development purposes until it's considered stable.

Additions

  • A lot of previously readonly properties for settings have received a setter
  • Most settings have received a SendServerUpdate to allow easier updating
  • Most settings have received a property that allows easier checking for previous value to allow comparing the old and new value received
  • CustomSetting has received HasValueChanged & LastUpdateType to allow easier checking for value changes

Changes

  • Cleaned up the code for certain parts for improved readability
  • CustomPlayerEffect::Owner will now attempt to get the Owner on access rather than on Start

Breaking Changes

  • Renamed SecretAPI.Attribute namespace to SecretAPI.Attributes
  • Renamed CustomButtonSetting::HoldTime to RequiredHoldTime
  • All setting constructors that have the functionality will now have collectionId & isServerSetting params

Full Changelog: 2.0.3...3.0.0-beta1

2.0.3

18 Dec 11:56
0726fc8

Choose a tag to compare

What's Changed

  • MirrorExtensions.SendFakeCassieMessage has been obsoleted
  • Fixed a wrong number being shown within ExampleDropdownSetting
  • ExampleKeybindSetting now implements CanView - requiring RA access to use

Full Changelog: 2.0.2...2.0.3

2.0.2

25 Oct 19:58
2c07d6c

Choose a tag to compare

Obsoletes

  • All of RoleExtensions has been obsoleted, in favor of their basegame/labapi counterparts

Additions

  • IPriority interface - Used by CallOnLoadAttribute/CallOnUnloadAttribute

Changes

  • SecretAPI will now be considered Transparent (On its own should no longer add modded tag to a server)
  • RoomExtensions now considers HczWaysideIncinerator & Hcz096 as invalid rooms

2.0.1

26 Sep 15:57
719f00a

Choose a tag to compare

Additions

  • bool CollectionExtensions.TryGetRandomValue<T>(IEnumerable<T>, out T) - Will return false on empty collections or if value returned is null

Bug Fixes

  • CollectionExtensions.GetRandomValue - Fixed ArgumentOutOfRangeException - This will now return default (possibly null) when handling size 0 collections
  • CustomSetting - Fixed sending settings to npcs

Full Changelog: 2.0.0...2.0.1

2.0.0

21 Sep 14:10
e886b66

Choose a tag to compare

Whats Changed

License

MIT License has been applied to the project

Additions

  • Added CallOnLoadAttribute & CallOnUnloadAttribute which you can use to enable/disable features
  • Added HarmonyExtensions.SafePatch(Harmony, Type)
  • Added PlayerExtensions.GetEffect(Player, string
  • Added CustomTickingPlayerEffect - Will tick every X seconds via OnTick(), rather than a constant Update
  • Added IsServerOnly, Label(Setter), DescriptionHint, Id(Init), CollectionId, IsShared properties to CustomSetting

Fixes

  • Fixed CustomSetting being overwritten by external plugins

Breaking Changes

  • Removed all previously obsoleted methods, classes, etc.
  • Removed PlayerExtensions.HasGamePermission
  • Removed IAttackDamageModifierEffect - You should make your own variant if its needed
  • DoorPermissionCheck.InventoryExludingCurrent renamed to InventoryExcludingCurrent
  • Reworked CustomSetting to allow per player setting values
    • Will now use Player? KnownOwner rather than Player method params - This is only null on the original setting created
    • CustomSetting.TryGet renamed to GetPlayerSetting
    • CustomSetting.PersonalizeSetting will be called before the setting is sent - should be used to set exclusive options
    • CustomSetting.HandleSettingUpdate no longer had Player overload

Full Changelog: 1.1.3...2.0.0