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
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
PlayerDeath
toPlayerDying
(#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
- Added
PlayerInteractGenerator
event (#98, #122). - Added
RoundEndConditionsCheck
event (#108, #122), - Added
Scp914PickupUpgraded
andScp914InventoryItemUpgraded
events (#108, #123 by @SrLicht). - Added
thrower
andposition
toGrenadeExploded
event (#108, #120 by @SrLicht). - Added
position
toItemSpawned
event (#108, #120 by @SrLicht). - Added
player
andposition
to PlaceBulletHole` event (#108, #120 by @SrLicht). - Added
position
toPlaceBlood
event (#108, #120 by @SrLicht). - Added
elevator
toPlayerInteractElevator
event (#108, #120 by @SrLicht). - Added
chamber
toPlayerInteractLocker
event (#108, #120 by @SrLicht). - Added
shootingTarget
toPlayerInteractShootingTarget
event (#108, #120 by @SrLicht). - Added
intensity
andduration
toPlayerReceiveEffect
event (#108, #120 by @SrLicht). - Added
rigidbody
toPlayerThrowItem
event (#108, #120 by @SrLicht). - Added
isResumed
toWarheadStop
event (#101, #122). - Added
projectileSettings
andfullForce
toPlayerThrowProjectile
event (#108, #120 by @SrLicht). - Removed
forceAmount
,upwardsFactor
,torque
andvelocity
fromPlayerThrowProjectile
event (#108, #120 by @SrLicht). - Added
knobSetting
toScp914Activate
andScp914KnobChange
events (#108, #120 by @SrLicht). - Added
previousKnobSetting
toScp914KnobChange
event (#108, #120 by @SrLicht). - Added
outputPosition
toScp914UpgradePickup
event (#108, #120 by @SrLicht). - Added
result
toPlayerGameConsoleCommandExecuted
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
- Fixed
Server.FriendlyFire
setter (#95). - Changed
IPlayer
toICommandSender
inPlayerRemoteAdminCommand
andPlayerRemoteAdminCommandExecuted
events (#100). - Added
ICommandSender
toConsoleCommand
andConsoleCommandExecuted
events (#100). - Introduced
PlayerPreCoinFlip
andPlayerCoinFlip
events (#100). - Added Idle Mode methods to
PluginAPI.Core.Server
(#100).
NwPluginAPI 12.0.0-rc.4
- Added Leading Team to
RoundEnd
event (#87). - Added
BanUpdated
ban storage event (#87). - Added
PlayerRemoteAdminCommandExecuted
,PlayerGameConsoleCommandExecuted
andConsoleCommandExecuted
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
- Added support of parent commands registration by @sirmeepington (#68).
- Added ban storage events:
BanIssued
andBanRevoked
(#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).