Releases: northwood-studios/NwPluginAPI
NwPluginAPI 13.1.2
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 addRoundSummary.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.
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
buildinfocommand 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
Scp096AddingTargetevent (#135). - Added
Scp096Enragingevent (#135). - Added
Scp096ChangeStateevent (#135). - Added
Scp096PryingGateevent (#135). - Added
Scp096TryNotCryevent (#135). - Added
Scp096StartCryingevent (#135). - Added
PlayerUsingRadioevent (#147). - Added
CassieAnnouncesScpTerminationevent (#137, #147). - Added
PlayerGetGroupevent (#147). - Added
PlayerUsingIntercomevent (#147, #149). - Renamed event
PlayerDeathtoPlayerDying(#108, #147). - Added
PlayerDeathevent (#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
- Added
PlayerInteractGeneratorevent (#98, #122). - Added
RoundEndConditionsCheckevent (#108, #122), - Added
Scp914PickupUpgradedandScp914InventoryItemUpgradedevents (#108, #123 by @SrLicht). - Added
throwerandpositiontoGrenadeExplodedevent (#108, #120 by @SrLicht). - Added
positiontoItemSpawnedevent (#108, #120 by @SrLicht). - Added
playerandpositionto PlaceBulletHole` event (#108, #120 by @SrLicht). - Added
positiontoPlaceBloodevent (#108, #120 by @SrLicht). - Added
elevatortoPlayerInteractElevatorevent (#108, #120 by @SrLicht). - Added
chambertoPlayerInteractLockerevent (#108, #120 by @SrLicht). - Added
shootingTargettoPlayerInteractShootingTargetevent (#108, #120 by @SrLicht). - Added
intensityanddurationtoPlayerReceiveEffectevent (#108, #120 by @SrLicht). - Added
rigidbodytoPlayerThrowItemevent (#108, #120 by @SrLicht). - Added
isResumedtoWarheadStopevent (#101, #122). - Added
projectileSettingsandfullForcetoPlayerThrowProjectileevent (#108, #120 by @SrLicht). - Removed
forceAmount,upwardsFactor,torqueandvelocityfromPlayerThrowProjectileevent (#108, #120 by @SrLicht). - Added
knobSettingtoScp914ActivateandScp914KnobChangeevents (#108, #120 by @SrLicht). - Added
previousKnobSettingtoScp914KnobChangeevent (#108, #120 by @SrLicht). - Added
outputPositiontoScp914UpgradePickupevent (#108, #120 by @SrLicht). - Added
resulttoPlayerGameConsoleCommandExecutedevent (#103, #122). - Improved
RoundEndevent cancelling - it now uses custom cancellation data instead of a bool (#116, #122). - Added
Statistics.CurrentRound.WarheadDetonated(#119, #122). - Fixed swapped arguments in
PlayerDamageevent (#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
- Fixed
Server.FriendlyFiresetter (#95). - Changed
IPlayertoICommandSenderinPlayerRemoteAdminCommandandPlayerRemoteAdminCommandExecutedevents (#100). - Added
ICommandSendertoConsoleCommandandConsoleCommandExecutedevents (#100). - Introduced
PlayerPreCoinFlipandPlayerCoinFlipevents (#100). - Added Idle Mode methods to
PluginAPI.Core.Server(#100).
NwPluginAPI 12.0.0-rc.4
- Added Leading Team to
RoundEndevent (#87). - Added
BanUpdatedban storage event (#87). - Added
PlayerRemoteAdminCommandExecuted,PlayerGameConsoleCommandExecutedandConsoleCommandExecutedevents (#87). - Added
Server.ReservedSlots(#87). - Fixed changing
Server.FriendlyFire(#87). - Fixed a server silent crashes when
IsValidEntrypoint()throws an exception (#87). - Fixed
-disableAnsiColorsargument being ignored by first two log entries (#87). - Minor QoL tweaks by @joker-119 (#86).
NwPluginAPI 12.0.0-rc.3
- Added support of parent commands registration by @sirmeepington (#68).
- Added ban storage events:
BanIssuedandBanRevoked(#81). - Added
BypassCheck()toPlayerCheckReservedSlotCancellationData(#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
- Fixes related to SCP:SL code changes (#70).
NwPluginAPI 12.0.0-rc.1
It's just version 12.0.0-beta10, but reuploaded with an updated version name, because of NuGet.
NwPluginAPI 12.0.0-beta10
NwPluginAPI 12.0.0-beta9
- Improved dependencies loading (#52).