Explosions and Grenades, Triggers, OnDestroy, OnExAct, Fueltanks and destructible tables (#247)
* initial explosiveComponent * remove garbagee * assets * tile mass deletion baby * grenades * tweaks * Update Content.Server/GameObjects/Components/Explosion/ExplosiveComponent.cs Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com> * Ex_act based on damage, fixes and tweaks * One finishing touch Done the most cringe way * ex_act explosions, tables are destructible now also adds fuel tanks * adds ex_act to mobs
This commit is contained in:
committed by
Pieter-Jan Briers
parent
f1aeaaa640
commit
10801af2f7
@@ -1,4 +1,5 @@
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using System.Linq;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.Components.Storage;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.GameObjects.Components.Container;
|
||||
@@ -26,7 +27,7 @@ namespace Content.Server.GameObjects
|
||||
/// <summary>
|
||||
/// Storage component for containing entities within this one, matches a UI on the client which shows stored entities
|
||||
/// </summary>
|
||||
public class ServerStorageComponent : SharedStorageComponent, IAttackBy, IUse, IActivate, IStorageComponent
|
||||
public class ServerStorageComponent : SharedStorageComponent, IAttackBy, IUse, IActivate, IStorageComponent, IDestroyAct
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IMapManager _mapManager;
|
||||
@@ -340,5 +341,14 @@ namespace Content.Server.GameObjects
|
||||
|
||||
_storageInitialCalculated = true;
|
||||
}
|
||||
|
||||
void IDestroyAct.OnDestroy(DestructionEventArgs eventArgs)
|
||||
{
|
||||
var storedEntities = storage.ContainedEntities.ToList();
|
||||
foreach (var entity in storedEntities)
|
||||
{
|
||||
Remove(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user