Make welders only deal burn damage when lit. (#5695)

This commit is contained in:
Leon Friedrich
2021-12-12 12:12:48 +13:00
committed by GitHub
parent c041a8339f
commit 237a90cd48
5 changed files with 47 additions and 15 deletions

View File

@@ -1,10 +1,12 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Server.Chemistry.Components;
using Content.Server.Chemistry.Components.SolutionManager;
using Content.Server.Chemistry.EntitySystems;
using Content.Server.Items;
using Content.Server.Tools.Components;
using Content.Server.Weapon.Melee;
using Content.Shared.Audio;
using Content.Shared.Examine;
using Content.Shared.FixedPoint;
@@ -41,6 +43,13 @@ namespace Content.Server.Tools
SubscribeLocalEvent<WelderComponent, ToolUseFinishAttemptEvent>(OnWelderToolUseFinishAttempt);
SubscribeLocalEvent<WelderComponent, ComponentShutdown>(OnWelderShutdown);
SubscribeLocalEvent<WelderComponent, ComponentGetState>(OnWelderGetState);
SubscribeLocalEvent<WelderComponent, MeleeHitEvent>(OnMeleeHit);
}
private void OnMeleeHit(EntityUid uid, WelderComponent component, MeleeHitEvent args)
{
if (!args.Handled && component.Lit)
args.BonusDamage += component.LitMeleeDamageBonus;
}
public (FixedPoint2 fuel, FixedPoint2 capacity) GetWelderFuelAndCapacity(EntityUid uid, WelderComponent? welder = null, SolutionContainerManagerComponent? solutionContainer = null)