Skip to content

Releases: northwood-studios/NwPluginAPI

NwPluginAPI 13.1.2

06 Dec 21:14
2749a86
Compare
Choose a tag to compare

This release is currently shipped with the dedicated server build.

Added OfflinePlayer.cs.
Added ReservedSlots.cs.
Added Whitelist.cs.
Added DamageType.cs.
Events are now defined using EventArg classes.

Round.cs by #161

  • Added IsRoundEnded. Please add RoundSummary.singleton.RoundEnded => RoundSummary.singleton._roundEnded.

FacilityDoor.

  • Added Name variable.

Resolves #169

Commands by #161

  • Fixed the NWAPI commands that were not registered.

  • Now you can reload the plugins configuration.

  • Now you can reload the gameplay configuration.

fix #167 and resolves #166

Player.cs by #161

  • Fixed a bug that ArtificialHealth gave when trying to obtain or change the AHP of a player who is SCP.

  • Fixed a bug when trying to use ArtificialHealth since it was being incorrectly invoked.

Map.cs by #161

  • Added Map.Cameras, Map.PocketDimensionTeleports, Map.Lockers, Map.Elevators, Map.TeslaGates, Map.Generators.

  • Added Map.Broadcast(ushort duration, string message, Broadcast.Flag flag, bool clearPrevius = false).

  • Added Map.ClearBroadcast().

  • Added Map.ForceDecontamination().

  • Added enum Map.DecontaminationStatus.

  • Added Map.GetRandomRoom(FacilityZone zone) return RoomIdentifier or null.

  • Added Map.FlickerLights(float duration, FacilityZone zone).

  • Added Map.FlickerLights(float duration, IEnumerable<FacilityZone> zones).

  • Added Map.FlickerAllLights(float duration).

  • Added Map.TurnOnAllLights().

  • Added Map.TurnOnLights(FacilityZone zone).

  • Added Map.TurnOnLights(IEnumerable<FacilityZone> zones).

  • Added Map.ChangeColorOfAllLights(Color color, float intensity = 0).

  • Added Map.ChangeColorOfLights(Color color, FacilityZone zone, float intensity = 0).

  • Added Map.ChangeColorOfLights(Color color, IEnumerable<FacilityZone> zones, float intensity = 0).

  • Added Map.ResetColorOfAllLights.

  • Added Map.ResetColorOfLights(FacilityZone zone).

FacilityDoor.cs by #168

  • Added FacilityDoor.Get(RoomIdentifier)
  • Added FacilityDoor.Get(FacilityZone)

AssemblyLoader.cs by #170

  • Fixed plugin Load order being inverted.

Player.cs by #173

  • Added Player.RemoveItem(ItemBase)
  • Added Player.RemoveItem(ItemType. amount)

NwPluginAPI 12.0.0

15 Jan 21:23
8922563
Compare
Choose a tag to compare
  • buildinfo command now provides NwPluginAPI version.
  • Fixed overwatch (#140).
  • Fixed ClearInventory (#141).
  • Fixed incorrect issuer type in PlayerKicked event (#132).
  • Fixed Facility.Rooms (#136).
  • Added DropItem and RemoveItem, modified AddItem (#138).
  • Added Scp096AddingTarget event (#135).
  • Added Scp096Enraging event (#135).
  • Added Scp096ChangeState event (#135).
  • Added Scp096PryingGate event (#135).
  • Added Scp096TryNotCry event (#135).
  • Added Scp096StartCrying event (#135).
  • Added PlayerUsingRadio event (#147).
  • Added CassieAnnouncesScpTermination event (#137, #147).
  • Added PlayerGetGroup event (#147).
  • Added PlayerUsingIntercom event (#147, #149).
  • Renamed event PlayerDeathto PlayerDying (#108, #147).
  • Added PlayerDeath event (#108, #147).
  • Fixed cancellation of some events (#143).
  • Fixed a bug that caused SendBroadcast to occasionally throw NRE errors (#145, #151).
  • Fixed a bug where FacilityRooms.Light was always null (#145, #152).
  • Fixed Server.Instance.ReferenceHub being null after a round restart (#153, #158).
  • Added Player.Team (#159).
  • Improved ConfigSharing - replaced a bunch of private const ints with a public enum (#155).

Changes made to Server.cs by #145.

  • Added int PlayerCount => Player.Count;
  • Added PermissionsHandler PermissionsHandler => ServerStatic.GetPermissionsHandler();
  • Added double TPS => Math.Round(1f / Time.smoothDeltaTime);
  • Added get or set float SpawnProtectDuration
  • Added get or set bool IsHeavilyModded
  • Added Broadcast Broadcast => Broadcast.Singleton

Changes made to Player.cs by #145.

  • Added PlayerRoleBase RoleBase => ReferenceHub.roleManager.CurrentRole;
  • Added Dictionary<ItemType, ushort> AmmoBag => ReferenceHub.inventory.UserInventory.ReserveAmmo;
  • Added get or set string RoleColor (serverRoles)
  • Added get or set string RoleName
  • Added string UnitName => ReferenceHub.roleManager.CurrentRole is HumanRole humanRole ? humanRole.UnitName : null;
  • Added bool HasReservedSlot => ReservedSlot.HasReservedSlot(UserId, out _);
  • Added Vector3 Velocity => ReferenceHub.GetVelocity();
  • Added VoiceModuleBase VoiceModule => ReferenceHub.roleManager.CurrentRole is IVoiceRole voiceRole ? voiceRole.VoiceModule : null;
  • Added VoiceChatChannel VoiceChannel => VoiceModule?.CurrentChannel ?? VoiceChatChannel.None;
  • Changed bool IsScp => Role.GetTeam() is Team.SCPs;
  • Added bool IsNTF => Role.GetTeam() is Team.FoundationForces;
  • Added bool IsCHI => Role.GetTeam() is Team.ChaosInsurgency;
  • Added bool IsTutorial => Role is RoleTypeId.Tutorial;
  • Added SetGroup(UserGroup group) ReferenceHub.serverRoles.SetGroup(group, false);

Thanks to @SrLicht, @Takail, @MrAfitol, @SebasCapo, @Xname7, @moddedmcplayer.

NwPluginAPI 12.0.0-rc.6

30 Dec 22:53
9345065
Compare
Choose a tag to compare
Pre-release
  • Added PlayerInteractGenerator event (#98, #122).
  • Added RoundEndConditionsCheck event (#108, #122),
  • Added Scp914PickupUpgraded and Scp914InventoryItemUpgraded events (#108, #123 by @SrLicht).
  • Added thrower and position to GrenadeExploded event (#108, #120 by @SrLicht).
  • Added position to ItemSpawned event (#108, #120 by @SrLicht).
  • Added player and position to PlaceBulletHole` event (#108, #120 by @SrLicht).
  • Added position to PlaceBlood event (#108, #120 by @SrLicht).
  • Added elevator to PlayerInteractElevator event (#108, #120 by @SrLicht).
  • Added chamber to PlayerInteractLocker event (#108, #120 by @SrLicht).
  • Added shootingTarget to PlayerInteractShootingTarget event (#108, #120 by @SrLicht).
  • Added intensity and duration to PlayerReceiveEffect event (#108, #120 by @SrLicht).
  • Added rigidbody to PlayerThrowItem event (#108, #120 by @SrLicht).
  • Added isResumed to WarheadStop event (#101, #122).
  • Added projectileSettings and fullForce to PlayerThrowProjectile event (#108, #120 by @SrLicht).
  • Removed forceAmount, upwardsFactor, torque and velocity from PlayerThrowProjectile event (#108, #120 by @SrLicht).
  • Added knobSetting to Scp914Activate and Scp914KnobChange events (#108, #120 by @SrLicht).
  • Added previousKnobSetting to Scp914KnobChange event (#108, #120 by @SrLicht).
  • Added outputPosition to Scp914UpgradePickup event (#108, #120 by @SrLicht).
  • Added result to PlayerGameConsoleCommandExecuted event (#103, #122).
  • Improved RoundEnd event cancelling - it now uses custom cancellation data instead of a bool (#116, #122).
  • Added Statistics.CurrentRound.WarheadDetonated (#119, #122).
  • Fixed swapped arguments in PlayerDamage event (#110 by @Michal78900).
  • Fixed UnregisterEvents<T> (#113, #117).
  • Added new methods and fields for Player, Facility, Map, Round (#92, #112 by @SrLicht).
  • Added Player.StaminaRemaining (#115 by @Bonjemus).
  • Events documentation now includes information about events cancellation (#122).

NwPluginAPI 12.0.0-rc.5

20 Dec 18:23
12829f1
Compare
Choose a tag to compare
Pre-release
  • Fixed Server.FriendlyFire setter (#95).
  • Changed IPlayer to ICommandSender in PlayerRemoteAdminCommand and PlayerRemoteAdminCommandExecuted events (#100).
  • Added ICommandSender to ConsoleCommand and ConsoleCommandExecuted events (#100).
  • Introduced PlayerPreCoinFlip and PlayerCoinFlip events (#100).
  • Added Idle Mode methods to PluginAPI.Core.Server (#100).

NwPluginAPI 12.0.0-rc.4

17 Dec 20:17
a1ea4f8
Compare
Choose a tag to compare
Pre-release
  • Added Leading Team to RoundEnd event (#87).
  • Added BanUpdated ban storage event (#87).
  • Added PlayerRemoteAdminCommandExecuted, PlayerGameConsoleCommandExecuted and ConsoleCommandExecuted events (#87).
  • Added Server.ReservedSlots (#87).
  • Fixed changing Server.FriendlyFire (#87).
  • Fixed a server silent crashes when IsValidEntrypoint() throws an exception (#87).
  • Fixed -disableAnsiColors argument being ignored by first two log entries (#87).
  • Minor QoL tweaks by @joker-119 (#86).

NwPluginAPI 12.0.0-rc.3

16 Dec 18:22
f51fb5a
Compare
Choose a tag to compare
Pre-release
  • Added support of parent commands registration by @sirmeepington (#68).
  • Added ban storage events: BanIssued and BanRevoked (#81).
  • Added BypassCheck() to PlayerCheckReservedSlotCancellationData (#81).
  • Fixed Paths (#81, #83).
  • Added Warhead.IsLocked (#81).
  • Fixed GetPlayers (#82).
  • Server is no longer included in the entity list (#82).

NwPluginAPI 12.0.0-rc.2

13 Dec 20:10
3896a94
Compare
Choose a tag to compare
Pre-release
  • Fixes related to SCP:SL code changes (#70).

NwPluginAPI 12.0.0-rc.1

13 Dec 18:41
7532659
Compare
Choose a tag to compare
Pre-release

It's just version 12.0.0-beta10, but reuploaded with an updated version name, because of NuGet.

NwPluginAPI 12.0.0-beta10

13 Dec 17:51
144097e
Compare
Choose a tag to compare
Pre-release
  • Added and improved events (#26, #57, #58).
  • Fixed server instance being null (#61).
  • Added event priorities (#54).
  • Fixed Player::Get (#42).
  • Fixed EventHandler casting (#55).
  • Fixed plugin config loading (#66).

NwPluginAPI 12.0.0-beta9

02 Dec 16:21
6e8097e
Compare
Choose a tag to compare
Pre-release
  • Improved dependencies loading (#52).