Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
jhett12321 committed May 24, 2023
2 parents 4322170 + 6efb4a5 commit 947b09a
Show file tree
Hide file tree
Showing 189 changed files with 2,189 additions and 1,146 deletions.
3 changes: 1 addition & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
NWN_VERSION=8193.34
NWNX_VERSION=d44d373
NWNX_VERSION=b419e42
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1.9.0
with:
dotnet-version: '6.0.x'
dotnet-version: '7.0.x'

- name: Build
run: dotnet build --configuration Debug
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1.9.0
with:
dotnet-version: '6.0.x'
dotnet-version: '7.0.x'

- name: Build
run: dotnet build --configuration Release
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1.9.0
with:
dotnet-version: '6.0.x'
dotnet-version: '7.0.x'

- name: Tag Commit
if: github.event.inputs.tag != ''
Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1.9.0
with:
dotnet-version: '6.0.x'
dotnet-version: '7.0.x'

- name: Download Release Artifacts
uses: actions/download-artifact@v2
Expand Down Expand Up @@ -297,7 +297,7 @@ jobs:
push: true
build-args: |
NWNX_VERSION=${{ steps.env_vars.outputs.nwnx_version }}
BINARY_PATH=/binaries/net6.0
BINARY_PATH=/binaries/net7.0
labels: |
org.opencontainers.image.title=Anvil
org.opencontainers.image.description=Anvil is a C# library that attempts to wrap Neverwinter Script with C# niceties and contexts, instead of a collection of functions. This image contains a NWNX server configured to use Anvil.
Expand Down
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,72 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## 8193.35.0
https://github.com/nwn-dotnet/Anvil/compare/v8193.34.28...v8193.35.0

### Added
- DamageType: Added `CustomXX` damage type constants
- EffectSubType: Added `Unyielding` subtype.
- EffectType: Added `Pacify`, `BonusFeat`, `TimeStopImmunity`, `ForceWalk` effects.
- GuiEventType: Added `RadialOpen`
- GuiPanel: Added `Tile`, `Trigger`, `Creature`, `Item`, `Placeable`, `Door`, `Quickbar` panels.
- PlayerDeviceProperty: Added various graphics properties.
- Effect: Added `BonusFeat`, `ForceWalk`, `Pacified`, `TimeStopImmunity` effect methods.
- Effect: Added `LinkId`, `IgnoreImmunity` properties.
- Location: Added `TileId`, `TileRotation`, `TileHeight` properties.
- Location: Added `SetTile`, `SetTileAnimationLoops` methods.
- SQLQuery: Added `Reset` method.
- ModuleEvents.OnPlayerEquipItem: Added `Slot` property.
- ModuleEvents.OnPlayerGuiEvent: Added `Vector` property.
- ModuleEvents.OnPlayerUnequipItem: Added `Slot` property.
- SpellEvents.OnSpellCast: Added `IsSpontaneousCast`, `SpellLevel` properties.
- NwArea: Added `ReloadAreaGrass`, `ReloadAreaBorder`, `SetTiles`, `GetAreaLightColor`, `SetAreaLightColor`, `GetAreaLightDirection`, `SetAreaLightDirection`, `SetFogColor` methods.
- NwCreature: Added `ControllingPlayer` setter.
- NwCreature: Added `ActionUseFeat`, `GetSpellUsesLeft`, `SetEffectIconFlashing` methods
- NwGameObject: Added `Usable`, `VisibleDistance`, `VisualTransform`, `UiDiscoveryFlags` properties.
- NwGameObject: Added `GetVisualTransform` method with scope option.
- NwGameObject: Added `ReplaceObjectAnimation`, `ClearObjectAnimationOverride`, `SetTextBubbleOverride` methods.
- NwPlayer: Added `CameraFlags`, `ClientVersionCommitSha1` properties.
- NwPlayer: Added `AttachCamera`, `SetCameraLimits`, `SetShaderUniform`, `SetSpellTargetingData` methods.
- VisualTransform: Added `Clear` method.
- VisualTransformLerpSettings: Added `BehaviorFlags`, `Repeats` properties.
- DevastatingCriticalData: Added `Attacker` property.

### Package Updates
- NWNX: 2692ecb -> d44d373
- NWN.Core: 8193.34.15 -> 8193.35.6
- NWN.Native: 8193.34.5 -> 8193.35.6
- LightInject: 6.6.3 -> 6.6.4
- NLog: 5.1.3 -> 5.1.4

### Changed
- !! Anvil now targets .NET 7. You may need to update your plugin's target framework to successfully compile against Anvil.
- !! HookService: NWNX and NWN.Native no-longer exposes a list of function addresses, and the address parameter has been removed from `RequestHook`. The RequestHook now expects a delegate with the `NativeFunction` attribute. See [here for an example](https://github.com/nwn-dotnet/Anvil/blob/development/NWN.Anvil/src/main/Native/Functions/Functions.CNWSCreature.cs).
- ItemAppearance: Update return values to support the extended part ranges introduced in 8193.35.
- NwPlayer: `ClientVersion` now includes the revision value of the client version.
- NwPlayer: `EnterTargetMode` now specifies a setting object that contains all new options added in 8193.35.

### Removed
- ItemAppearanceArmorModel: Removed deprecated class.
- DoorEvents.OnDialogue: Removed deprecated class.
- PlaceableEvents.OnDialogue: Removed deprecated class.
- ItemAppearanceArmorModel: Removed deprecated class.
- Effect: Removed deprecated `EffectIcon` overload.
- ItemProperty: Removed deprecated `PropertyType` property.
- CreatureEvents.OnConversation: Removed deprecated `CurrentSpeaker` property.
- ModuleEvents.OnNuiEvent: Removed deprecated `WindowToken` property.
- CreatureClassInfo: Removed deprecated `AddKnownSpell`, `GetKnownSpellCountByLevel`, `GetKnownSpells`, `RemoveKnownSpell` methods.
- ItemAppearance: Removed deprecated `ClearArmorPieceColor`, `GetArmorModel`, `GetArmorPieceColor`, `SetArmorModel`, `SetArmorPieceColor` overloads.
- NativeObjectInfoAttribute: Removed unused class.
- NwArea: Removed deprecated `GetFogAmount`, `GetFogColor` methods.
- NwGameObject: Removed deprecated `CreatureAppearanceType` property.
- NwGameObject: Remove `Destroy`, `PlaySoundByStrRef` overloads.
- NwPlayer: Remove `ClearTlkOverride`, `CreateNuiWindow`, `NuiDestroy`, `NuiGetUserData`, `NuiGetWindowId`, `NuiSetUserData`, `SetTlkOverride` methods.
- Color: Removed `ToInt` method.

### Fixed
- (NWNX) Fixed an issue where nested VM scopes would cause an invalid stack and assertion error.

## 8193.34.28
https://github.com/nwn-dotnet/Anvil/compare/v8193.34.27...v8193.34.28

Expand Down
8 changes: 4 additions & 4 deletions NWN.Anvil.TestRunner/NWN.Anvil.TestRunner.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>

Expand Down Expand Up @@ -56,7 +56,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
</ItemGroup>
Expand All @@ -69,8 +69,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NWN.Core" Version="8193.34.15" PrivateAssets="compile" />
<PackageReference Include="NWN.Native" Version="8193.34.7" PrivateAssets="compile" />
<PackageReference Include="NWN.Core" Version="8193.35.6" PrivateAssets="compile" />
<PackageReference Include="NWN.Native" Version="8193.35.6" PrivateAssets="compile" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions NWN.Anvil.Tests/NWN.Anvil.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>

Expand Down Expand Up @@ -42,8 +42,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NWN.Core" Version="8193.34.15" PrivateAssets="compile" />
<PackageReference Include="NWN.Native" Version="8193.34.7" PrivateAssets="compile" />
<PackageReference Include="NWN.Core" Version="8193.35.6" PrivateAssets="compile" />
<PackageReference Include="NWN.Native" Version="8193.35.6" PrivateAssets="compile" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion NWN.Anvil.Tests/src/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
env_file:
- ${PWD-.}/config/nwserver.env
volumes:
- ${PWD-.}/../../../NWN.Anvil/bin/Release/net6.0:/nwn/anvil
- ${PWD-.}/../../../NWN.Anvil/bin/Release/net7.0:/nwn/anvil
- ${PWD-.}/NWN.Anvil.Tests:/nwn/run/anvil/Plugins/NWN.Anvil.Tests
- ${PWD-.}/../../../NWN.Anvil.TestRunner/bin/Release/NWN.Anvil.TestRunner:/nwn/run/anvil/Plugins/NWN.Anvil.TestRunner
- ${PWD-.}/results:/nwn/run/anvil/PluginData/NWN.Anvil.TestRunner
16 changes: 10 additions & 6 deletions NWN.Anvil/NWN.Anvil.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--Build-->
<PropertyGroup>
<!--When changing target frameworks, make sure to update Anvil.Internal.Assemblies.TargetFrameworks-->
<TargetFramework>net6.0</TargetFramework>
<!--When changing target frameworks, make sure to update:
- Class: Anvil.Internal.Assemblies.TargetFrameworks
- ci.yml: BINARY_PATH
- NWN.Anvil.Tests/docker-compose.yml
-->
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>

Expand Down Expand Up @@ -57,12 +61,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LightInject" Version="6.6.3" />
<PackageReference Include="LightInject" Version="6.6.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.1.3" />
<PackageReference Include="NLog" Version="5.1.4" />
<PackageReference Include="Paket.Core" Version="7.2.1" PrivateAssets="all" />
<PackageReference Include="NWN.Core" Version="8193.34.15" PrivateAssets="compile" />
<PackageReference Include="NWN.Native" Version="8193.34.7" PrivateAssets="compile" />
<PackageReference Include="NWN.Core" Version="8193.35.6" PrivateAssets="compile" />
<PackageReference Include="NWN.Native" Version="8193.35.6" PrivateAssets="compile" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions NWN.Anvil/NWN.Anvil.csproj.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=src_005Cmain_005Capi_005Cvariable_005Cinternal/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=src_005Cmain_005Capi_005Cvariable_005Cobjectstorage/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=src_005Cmain_005Capi_005Cvariable_005Cobjectstorage_005Cpersistent/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=src_005Cmain_005Cnative_005Cfunctions/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=src_005Cmain_005Cplugins_005Cpaket/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=src_005Cmain_005Cservices_005Capi/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=src_005Cmain_005Cservices_005Capi_005Ccreature/@EntryIndexedValue">True</s:Boolean>
Expand Down
6 changes: 0 additions & 6 deletions NWN.Anvil/src/main/API/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,6 @@ public string ToColorToken()
return StringHelper.Encoding.GetString(tokenBytes);
}

[Obsolete("Use Color.ToRGBA() instead.")]
public int ToInt()
{
return ToRGBA();
}

/// <summary>
/// Gets the 32-bit RGBA value of this Color structure.
/// </summary>
Expand Down
12 changes: 12 additions & 0 deletions NWN.Anvil/src/main/API/Constants/AreaLightColor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using NWN.Core;

namespace Anvil.API
{
public enum AreaLightColor
{
MoonAmbient = NWScript.AREA_LIGHT_COLOR_MOON_AMBIENT,
MoonDiffuse = NWScript.AREA_LIGHT_COLOR_MOON_DIFFUSE,
SunAmbient = NWScript.AREA_LIGHT_COLOR_SUN_AMBIENT,
SunDiffuse = NWScript.AREA_LIGHT_COLOR_SUN_DIFFUSE,
}
}
10 changes: 10 additions & 0 deletions NWN.Anvil/src/main/API/Constants/AreaLightDirection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using NWN.Core;

namespace Anvil.API
{
public enum AreaLightDirection
{
Moon = NWScript.AREA_LIGHT_DIRECTION_MOON,
Sun = NWScript.AREA_LIGHT_DIRECTION_SUN,
}
}
17 changes: 17 additions & 0 deletions NWN.Anvil/src/main/API/Constants/CameraFlag.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using NWN.Core;

namespace Anvil.API
{
[Flags]
public enum CameraFlag
{
EnableCollision = NWScript.CAMERA_FLAG_ENABLE_COLLISION,
DisableCollision = NWScript.CAMERA_FLAG_DISABLE_COLLISION,
DisableShake = NWScript.CAMERA_FLAG_DISABLE_SHAKE,
DisableScroll = NWScript.CAMERA_FLAG_DISABLE_SCROLL,
DisableTurn = NWScript.CAMERA_FLAG_DISABLE_TURN,
DisableTilt = NWScript.CAMERA_FLAG_DISABLE_TILT,
DisableZoom = NWScript.CAMERA_FLAG_DISABLE_ZOOM,
}
}
19 changes: 19 additions & 0 deletions NWN.Anvil/src/main/API/Constants/DamageType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,24 @@ public enum DamageType
Positive = NWScript.DAMAGE_TYPE_POSITIVE,
Sonic = NWScript.DAMAGE_TYPE_SONIC,
BaseWeapon = NWScript.DAMAGE_TYPE_BASE_WEAPON,
Custom1 = NWScript.DAMAGE_TYPE_CUSTOM1,
Custom2 = NWScript.DAMAGE_TYPE_CUSTOM2,
Custom3 = NWScript.DAMAGE_TYPE_CUSTOM3,
Custom4 = NWScript.DAMAGE_TYPE_CUSTOM4,
Custom5 = NWScript.DAMAGE_TYPE_CUSTOM5,
Custom6 = NWScript.DAMAGE_TYPE_CUSTOM6,
Custom7 = NWScript.DAMAGE_TYPE_CUSTOM7,
Custom8 = NWScript.DAMAGE_TYPE_CUSTOM8,
Custom9 = NWScript.DAMAGE_TYPE_CUSTOM9,
Custom10 = NWScript.DAMAGE_TYPE_CUSTOM10,
Custom11 = NWScript.DAMAGE_TYPE_CUSTOM11,
Custom12 = NWScript.DAMAGE_TYPE_CUSTOM12,
Custom13 = NWScript.DAMAGE_TYPE_CUSTOM13,
Custom14 = NWScript.DAMAGE_TYPE_CUSTOM14,
Custom15 = NWScript.DAMAGE_TYPE_CUSTOM15,
Custom16 = NWScript.DAMAGE_TYPE_CUSTOM16,
Custom17 = NWScript.DAMAGE_TYPE_CUSTOM17,
Custom18 = NWScript.DAMAGE_TYPE_CUSTOM18,
Custom19 = NWScript.DAMAGE_TYPE_CUSTOM19,
}
}
1 change: 1 addition & 0 deletions NWN.Anvil/src/main/API/Constants/EffectSubType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ public enum EffectSubType
Magical = NWScript.SUBTYPE_MAGICAL,
Supernatural = NWScript.SUBTYPE_SUPERNATURAL,
Extraordinary = NWScript.SUBTYPE_EXTRAORDINARY,
Unyielding = NWScript.SUBTYPE_UNYIELDING,
}
}
4 changes: 4 additions & 0 deletions NWN.Anvil/src/main/API/Constants/EffectType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,9 @@ public enum EffectType
CutsceneImmobilize = NWScript.EFFECT_TYPE_CUTSCENEIMMOBILIZE,
RunScript = NWScript.EFFECT_TYPE_RUNSCRIPT,
Icon = NWScript.EFFECT_TYPE_ICON,
Pacify = NWScript.EFFECT_TYPE_PACIFY,
BonusFeat = NWScript.EFFECT_TYPE_BONUS_FEAT,
TimeStopImmunity = NWScript.EFFECT_TYPE_TIMESTOP_IMMUNITY,
ForceWalk = NWScript.EFFECT_TYPE_FORCE_WALK,
}
}
7 changes: 7 additions & 0 deletions NWN.Anvil/src/main/API/Constants/GUIPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,12 @@ public enum GUIPanel
ExamineItem = NWScript.GUI_PANEL_EXAMINE_ITEM,
ExaminePlaceable = NWScript.GUI_PANEL_EXAMINE_PLACEABLE,
ExamineDoor = NWScript.GUI_PANEL_EXAMINE_DOOR,
Tile = NWScript.GUI_PANEL_RADIAL_TILE,
Trigger = NWScript.GUI_PANEL_RADIAL_TRIGGER,
Creature = NWScript.GUI_PANEL_RADIAL_CREATURE,
Item = NWScript.GUI_PANEL_RADIAL_ITEM,
Placeable = NWScript.GUI_PANEL_RADIAL_PLACEABLE,
Door = NWScript.GUI_PANEL_RADIAL_DOOR,
Quickbar = NWScript.GUI_PANEL_RADIAL_QUICKBAR,
}
}
1 change: 1 addition & 0 deletions NWN.Anvil/src/main/API/Constants/GuiEventType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ public enum GuiEventType
ExamineObject = NWScript.GUIEVENT_EXAMINE_OBJECT,
OptionsOpen = NWScript.GUIEVENT_OPTIONS_OPEN,
OptionsClose = NWScript.GUIEVENT_OPTIONS_CLOSE,
RadialOpen = NWScript.GUIEVENT_RADIAL_OPEN,
}
}
29 changes: 0 additions & 29 deletions NWN.Anvil/src/main/API/Constants/ItemAppearanceArmorModel.cs

This file was deleted.

16 changes: 16 additions & 0 deletions NWN.Anvil/src/main/API/Constants/ObjectUiDiscovery.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using NWN.Core;

namespace Anvil.API
{
[Flags]
public enum ObjectUiDiscovery
{
Default = NWScript.OBJECT_UI_DISCOVERY_DEFAULT,
None = NWScript.OBJECT_UI_DISCOVERY_NONE,
HiliteMouseover = NWScript.OBJECT_UI_DISCOVERY_HILITE_MOUSEOVER,
HiliteTab = NWScript.OBJECT_UI_DISCOVERY_HILITE_TAB,
TextbubbleMouseover = NWScript.OBJECT_UI_DISCOVERY_TEXTBUBBLE_MOUSEOVER,
TextbubbleTab = NWScript.OBJECT_UI_DISCOVERY_TEXTBUBBLE_TAB,
}
}
12 changes: 12 additions & 0 deletions NWN.Anvil/src/main/API/Constants/ObjectUiTextBubbleOverride.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using NWN.Core;

namespace Anvil.API
{
public enum ObjectUiTextBubbleOverride
{
None = NWScript.OBJECT_UI_TEXT_BUBBLE_OVERRIDE_NONE,
Replace = NWScript.OBJECT_UI_TEXT_BUBBLE_OVERRIDE_REPLACE,
Prepend = NWScript.OBJECT_UI_TEXT_BUBBLE_OVERRIDE_PREPEND,
Append = NWScript.OBJECT_UI_TEXT_BUBBLE_OVERRIDE_APPEND,
}
}
Loading

0 comments on commit 947b09a

Please sign in to comment.