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,50 @@
//using static RebirthManager;
public class MinEventActionDespawnEntity : MinEventActionTargetedBase
{
public override void Execute(MinEventParams _params)
{
//Log.Out("MinEventActionDespawnEntity-Execute START");
EntityAlive entity = _params.Self as EntityAlive;
if (entity == null)
{
//Log.Out("MinEventActionDespawnEntity-Execute 1");
return;
}
if (entity is EntityTurret)
{
//Log.Out("MinEventActionDespawnEntity-Execute 2");
EntityTurret entityTurret = (EntityTurret)entity;
entity.Buffs.SetCustomVar("$FR_Turret_Temp", 2f);
entity.bWillRespawn = false;
GameManager.Instance.World.RemoveEntity(entity.entityId, EnumRemoveEntityReason.Killed);
}
else
{
//Log.Out("MinEventActionDespawnEntity-Execute 3");
RebirthUtilities.DespawnEntity(entity);
/*entity.bIsChunkObserver = false;
if (entity is EntityNPCRebirth)
{
EntityNPCRebirth npc = (EntityNPCRebirth)entity;
if (npc != null && npc.LeaderUtils.Owner != null)
{
npc.LeaderUtils.Owner.Companions.Remove(npc);
//Log.Out("MinEventActionDespawnEntity-Execute REMOVE HIRE/OWNED ENTITY, hire: " + npc.entityId);
RebirthManager.RemoveHire(npc.entityId, true);
}
}
entity.bWillRespawn = false;
GameManager.Instance.World.RemoveEntity(entity.entityId, EnumRemoveEntityReason.Despawned);*/
}
//Log.Out("MinEventActionDespawnEntity-Execute 4");
}
}