Skip to content

Releases: obvEve/SecretAPI

3.2.0

Choose a tag to compare

@obvEve obvEve released this 06 May 16:12
60fc597

3.2.0

SourceGenerators

  • Added a new nuget project SecretAPI.SourceGenerators
    • This will currently allow generating CallOnLoad at compile time, rather than reflection at runtime
    • Generated SecretApiGenerated class

Custom Setting

  • Fixed issue with CustomSetting:IsCurrentlyAccessible not being set on the correct instance

Decal Helper

  • Added DecalHelpers to allow easier handling of sending decals without a Firearm
    • AutosyncMessage GetDecalMessage(Vector3, Vector3, DecalPoolType)
    • void SpawnDecalFromPosition(Vector3, Vector3, DecalPoolType)
    • void SpawnDecalFromNormal(Vector3, Vector3, DecalPoolType)
    • void SpawnDecalFromDirection(Vector3, Vector3, DecalPoolType)
    • void SpawnDecalFromDirection(Vector3, Quaternion, DecalPoolType)

Builder-styled extensions

  • ItemExtensions, AdminToyExtensions and PickupExtensions have been added with some builder styled extensions
    • Eg: WithPosition

Code Matching

  • CodeMatcherExtensions has been added to help with some missing CodeMatcher methods

Reflection

  • ReflectionExtensions.Cast<T>(object) to allow for casting directly
  • ReflectionExtensions.CastTypeSafely<T1, T2>(object) to allow direct casting, with validation to ensure T2 is derived from T1
  • GetLongFuncName is now cached after being checked once

Full Changelog: 3.1.2...3.2.0

3.1.2

Choose a tag to compare

@obvEve obvEve released this 29 Apr 19:53
fa57116

Optimization

  • Optimized CustomSetting.SendSettingsToPlayer(Player, int?) to avoid unnecessary allocation
  • Removed unnecessary patch within CustomPlayerEffect.Initialize

Fixes

  • Fixed CustomSetting::IsCurrentlyAccessible being set before PersonalizeSetting is called

Full Changelog: 3.1.1...3.1.2

3.1.1

Choose a tag to compare

@obvEve obvEve released this 27 Apr 07:51
b0c95ab

Fixes

  • Client error when updating settings before they are received by @obvEve in #93

Full Changelog: 3.1.0...3.1.1

3.1

3.1

Choose a tag to compare

@obvEve obvEve released this 19 Apr 17:19

Custom Settings

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

3.0

3.0

Choose a tag to compare

@obvEve obvEve released this 10 Apr 18:07
57ebfd7

🛠️ 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)

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

Choose a tag to compare

@obvEve obvEve released this 10 Apr 12:25

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

3.0-beta3 Pre-release
Pre-release

Choose a tag to compare

@obvEve obvEve released this 08 Apr 19:12

🗒️ 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

3.0.0-beta2 Pre-release
Pre-release

Choose a tag to compare

@obvEve obvEve released this 02 Apr 12:55

⚠️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

3.0.0-beta1 Pre-release
Pre-release

Choose a tag to compare

@obvEve obvEve released this 30 Mar 11:33

⚠️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

Choose a tag to compare

@obvEve obvEve released this 18 Dec 11:56
0726fc8

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