Добыча осколков суперматтерии только энергетическим оружием (#2672)
Co-authored-by: SliZen69 <yiffmaster69uwu@gmail.com>
This commit is contained in:
parent
450a8fba28
commit
b2fd4a76e9
3 changed files with 30 additions and 12 deletions
|
|
@ -26,6 +26,7 @@ using Content.Shared.Examine;
|
|||
using Content.Server.DoAfter;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Kitchen.Components;
|
||||
using Content.Shared.Weapons.Melee.EnergySword;
|
||||
using Content.Shared.Singularity.Components;
|
||||
using System;
|
||||
using Robust.Shared.Audio;
|
||||
|
|
@ -449,19 +450,27 @@ public sealed class SupermatterSystem : EntitySystem
|
|||
return;
|
||||
}
|
||||
|
||||
_adminLogger.Add(LogType.Action, LogImpact.High, $"{EntityManager.ToPrettyString(args.User):player} is trying to extract a sliver from the supermatter crystal.");
|
||||
_popup.PopupEntity(Loc.GetString("supermatter-tamper-begin"), args.User, args.User);
|
||||
|
||||
var doAfterArgs = new DoAfterArgs(EntityManager, args.User, 30, new SupermatterDoAfterEvent(), uid, target: uid, used: args.Used)
|
||||
if (HasComp<SMCuttableComponent>(args.Used))
|
||||
{
|
||||
BreakOnDamage = true,
|
||||
BreakOnHandChange = true,
|
||||
BreakOnMove = true,
|
||||
BreakOnWeightlessMove = false,
|
||||
NeedHand = true,
|
||||
RequireCanInteract = true,
|
||||
};
|
||||
_doAfter.TryStartDoAfter(doAfterArgs);
|
||||
_adminLogger.Add(LogType.Action, LogImpact.High, $"{EntityManager.ToPrettyString(args.User):player} is trying to extract a sliver from the supermatter crystal.");
|
||||
_popup.PopupEntity(Loc.GetString("supermatter-tamper-begin"), args.User, args.User);
|
||||
|
||||
var doAfterArgs = new DoAfterArgs(EntityManager, args.User, 30, new SupermatterDoAfterEvent(), uid, target: uid, used: args.Used)
|
||||
{
|
||||
BreakOnDamage = true,
|
||||
BreakOnHandChange = true,
|
||||
BreakOnMove = true,
|
||||
BreakOnWeightlessMove = false,
|
||||
NeedHand = true,
|
||||
RequireCanInteract = true,
|
||||
};
|
||||
|
||||
_doAfter.TryStartDoAfter(doAfterArgs);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vaporize(args.Used, uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
namespace Content.Shared.Weapons.Melee.EnergySword;
|
||||
|
||||
/// <summary>
|
||||
/// Applies to items that are capable of cutting supermatter slivers
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class SMCuttableComponent : Component
|
||||
{}
|
||||
|
|
@ -72,6 +72,7 @@
|
|||
shader: unshaded
|
||||
- type: Reflect
|
||||
# Sunrise-start
|
||||
- type: SMCuttable
|
||||
- type: Tag
|
||||
tags:
|
||||
- NoPaint
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue