<commit_before>﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DoorWedger : MonoBehaviour, IInteractable<HandApply>, ICheckedInteractable<HandApply>
{
    [SerializeField] [Tooltip("The time in seconds it takes to wedge open a door with this tool.")]
    private float openingDelay = 10f;

    public bool WillInteract(HandApply interaction, NetworkSide side)
    {
        if (!DefaultWillInteract.Default(interaction, side)) return false;

        if (Validations.IsTarget(gameObject, interaction)) return false;
        return true;
    }
    
    public void ServerPerformInteraction(HandApply interaction)
    {
        var targetObject = interaction.TargetObject.GetComponent<DoorController>();

        if (targetObject == null)
        {
            Chat.AddExamineMsgFromServer(interaction.Performer, "DEBUG: You hit NULL.");
            return;
        }

        if (targetObject.IsWelded)
        {
            Chat.AddExamineMsgFromServer(interaction.Performer, $"You can't force this door open with your {gameObject.name}, it's welded shut!");
        }

        if (targetObject.IsClosed)
        {
            ToolUtils.ServerUseToolWithActionMessages(interaction, openingDelay,
            "You start wedging open the door...",
            $"{interaction.Performer.ExpensiveName()} starts wedging open the door...",
            $"You force the door open with your {gameObject.name}!",
            $"{interaction.Performer.ExpensiveName()} forces the door open!",
            () =>
            {<commit_msg>Removed a debug line that was left in by accident<commit_after>﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DoorWedger : MonoBehaviour, IInteractable<HandApply>, ICheckedInteractable<HandApply>
{
    [SerializeField] [Tooltip("The time in seconds it takes to wedge open a door with this tool.")]
    private float openingDelay = 10f;

    public bool WillInteract(HandApply interaction, NetworkSide side)
    {
        if (!DefaultWillInteract.Default(interaction, side)) return false;

        if (Validations.IsTarget(gameObject, interaction)) return false;
        return true;
    }
    
    public void ServerPerformInteraction(HandApply interaction)
    {
        var targetObject = interaction.TargetObject.GetComponent<DoorController>();

        if (targetObject == null)
        {
            return;
        }

        if (targetObject.IsWelded)
        {
            Chat.AddExamineMsgFromServer(interaction.Performer, $"You can't force this door open with your {gameObject.name}, it's welded shut!");
        }

        if (targetObject.IsClosed)
        {
            ToolUtils.ServerUseToolWithActionMessages(interaction, openingDelay,
            "You start wedging open the door...",
            $"{interaction.Performer.ExpensiveName()} starts wedging open the door...",
            $"You force the door open with your {gameObject.name}!",
            $"{interaction.Performer.ExpensiveName()} forces the door open!",
            () =>
            {
{'fraction_non_alphanumeric': 0.0940032414910859, 'fraction_numerical': 0.0012965964343598054, 'mean_word_length': 2.8383084577114426, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '925535', 'n_tokens_mistral': 827, 'n_tokens_neox': 810, 'n_words': 222}