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

[RequireComponent(typeof(Pickupable))]
public class FireExtinguisher : NetworkBehaviour, IInteractable<HandActivate>, ICheckedInteractable<AimApply>
{
	bool safety = true;
	public int travelDistance = 6;
	private float travelTime => 1f / travelDistance;
	public ReagentContainer reagentContainer;
	public RegisterItem registerItem;
	public Pickupable pickupable;

	[SerializeField]
	[Range(1,50)]
	private int reagentsPerUse = 5;

	public SpriteRenderer spriteRenderer;
	[SyncVar(hook = nameof(SyncSprite))] public int spriteSync;
	public Sprite[] spriteList;

	public override void OnStartClient()
	{
		SyncSprite(spriteSync);
		base.OnStartClient();
	}

	public void Awake()
	{
		if ( !pickupable )
		{
			pickupable = GetComponent<Pickupable>();
		}
	}

	public void ServerPerformInteraction(HandActivate interaction)
	{
		if (safety)
		{
			safety = false;<commit_msg>Added lifecycle support for extinguisher safety pin<commit_after>﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;

[RequireComponent(typeof(Pickupable))]
public class FireExtinguisher : NetworkBehaviour, IServerSpawn,
	IInteractable<HandActivate>,
	ICheckedInteractable<AimApply>
{
	bool safety = true;
	public int travelDistance = 6;
	private float travelTime => 1f / travelDistance;
	public ReagentContainer reagentContainer;
	public RegisterItem registerItem;
	public Pickupable pickupable;

	[SerializeField]
	[Range(1,50)]
	private int reagentsPerUse = 5;

	public SpriteRenderer spriteRenderer;
	[SyncVar(hook = nameof(SyncSprite))] public int spriteSync;
	public Sprite[] spriteList;

	public override void OnStartClient()
	{
		SyncSprite(spriteSync);
		base.OnStartClient();
	}

	public void Awake()
	{
		if ( !pickupable )
		{
			pickupable = GetComponent<Pickupable>();
		}
	}

	public void OnSpawnServer(SpawnInfo info)
	{
		safety = true;
		SyncSprite(0);
	}

	public void ServerPerformInteraction(HandActivate interaction)
	{
		if (safety)
		{
			safety = false;
{'fraction_non_alphanumeric': 0.09107981220657277, 'fraction_numerical': 0.006103286384976526, 'mean_word_length': 5.659375, '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': '2367569', 'n_tokens_mistral': 737, 'n_tokens_neox': 677, 'n_words': 165}