Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:44:53 +09:30
commit f1fbbe67bb
1722 changed files with 165268 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
using UnityEngine.Scripting;
[Preserve]
public class NetPackageChangeNPCName : NetPackage
{
public NetPackageChangeNPCName Setup(int _npcEntityID, string _newName)
{
this.npcEntityID = _npcEntityID;
this.newName = _newName;
return this;
}
public override void read(PooledBinaryReader _reader)
{
this.npcEntityID = _reader.ReadInt32();
this.newName = _reader.ReadString();
}
public override void write(PooledBinaryWriter _writer)
{
base.write(_writer);
_writer.Write(this.npcEntityID);
_writer.Write(this.newName);
}
public override void ProcessPackage(World _world, GameManager _callbacks)
{
//Log.Out("NetPackageChangeNPCName-ProcessPackage 1");
if (_world == null || !_world.IsRemote())
{
//Log.Out("NetPackageChangeNPCName-ProcessPackage 2");
return;
}
EntityNPCRebirth npc = _world.GetEntity(this.npcEntityID) as EntityNPCRebirth;
if (npc != null)
{
npc.SetEntityName(this.newName);
}
}
public override int GetLength()
{
return 4;
}
private int npcEntityID;
private string newName;
}