Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes necessary for V Rising 1.0 Release #21

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions VCF.Core/Breadstone/ChatHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
{
public static bool Prefix(ChatMessageSystem __instance)
{
if (__instance.__ChatMessageJob_entityQuery != null)
if (__instance.__query_661171423_0 != null)

Check warning on line 17 in VCF.Core/Breadstone/ChatHook.cs

View workflow job for this annotation

GitHub Actions / build

The result of the expression is always 'true' since a value of type 'EntityQuery' is never equal to 'null' of type 'EntityQuery?'

Check warning on line 17 in VCF.Core/Breadstone/ChatHook.cs

View workflow job for this annotation

GitHub Actions / build

The result of the expression is always 'true' since a value of type 'EntityQuery' is never equal to 'null' of type 'EntityQuery?'

Check warning on line 17 in VCF.Core/Breadstone/ChatHook.cs

View workflow job for this annotation

GitHub Actions / build

The result of the expression is always 'true' since a value of type 'EntityQuery' is never equal to 'null' of type 'EntityQuery?'
{
NativeArray<Entity> entities = __instance.__ChatMessageJob_entityQuery.ToEntityArray(Allocator.Temp);
NativeArray<Entity> entities = __instance.__query_661171423_0.ToEntityArray(Allocator.Temp);
foreach (var entity in entities)
{
var fromData = __instance.EntityManager.GetComponentData<FromCharacter>(entity);
Expand Down
5 changes: 5 additions & 0 deletions VCF.Core/Framework/ChatCommandContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ public ChatCommandContext(VChatEvent e)

public string Name => User.CharacterName.ToString();
public bool IsAdmin => User.IsAdmin;

// If a message is longer than this an exception gets thrown converting to FixedString512Bytes
static int maxMessageLength = 509;
public void Reply(string v)
{
if(v.Length > maxMessageLength)
v = v[..maxMessageLength];
ServerChatUtils.SendSystemMessageToClient(VWorld.Server.EntityManager, User, v);
}

Expand Down
2 changes: 1 addition & 1 deletion VCF.Core/VCF.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.668" IncludeAssets="compile" />
<PackageReference Include="BepInEx.Core" Version="6.0.0-be.668" IncludeAssets="compile" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
<PackageReference Include="VRising.Unhollowed.Client" Version="0.6.5.*" />
<PackageReference Include="VRising.Unhollowed.Client" Version="1.0.0.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion VCF.SimpleSamplePlugin/VCF.SimpleSamplePlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be*" IncludeAssets="compile" />
<PackageReference Include="BepInEx.Core" Version="6.0.0-be*" IncludeAssets="compile" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.*" />
<PackageReference Include="VRising.Unhollowed.Client" Version="0.6.5.*" />
<PackageReference Include="VRising.Unhollowed.Client" Version="1.0.0.*" />
<PackageReference Include="Vrising.Bloodstone" Version="0.1.*" />
</ItemGroup>
<ItemGroup>
Expand Down
Loading