Fixes holoparasite injector being usable on anything

This commit is contained in:
Vera Aguilera Puerto
2021-12-30 11:55:22 +01:00
parent 30db574ed8
commit c9ac29b8dc
6 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
using Robust.Shared.GameObjects;
namespace Content.Server.Guardian;
[RegisterComponent, ComponentProtoName("CanHostGuardian")]
public class CanHostGuardianComponent : Component
{
}

View File

@@ -126,6 +126,14 @@ namespace Content.Server.Guardian
return;
}
// Can only inject things with the component...
if (!HasComp<CanHostGuardianComponent>(target))
{
_popupSystem.PopupEntity(Loc.GetString("guardian-activator-invalid-target"), user, Filter.Entities(user));
return;
}
// If user is already a host don't duplicate.
if (HasComp<GuardianHostComponent>(target))
{

View File

@@ -0,0 +1,4 @@
author: Your_Name_Here
changes:
- type: Fix # One of the following: Add, Remove, Tweak, Fix
message: Fixes guardian injector being usable on anything. Now only humans can use it.

View File

@@ -7,6 +7,7 @@ guardian-already-present-invalid-creation = You are NOT re-living that haunting
guardian-no-actions-invalid-creation = You don't have the ability to host a guardian!
guardian-activator-empty-invalid-creation = The injector is spent.
guardian-activator-empty-examine = [color=#ba1919]The injector is spent.[/color]
guardian-activator-invalid-target = Only humans can be injected! # Change this once other species can inject it?
guardian-no-soul = Your guardian has no soul.
guardian-available = Your guardian now has a soul.

View File

@@ -371,6 +371,9 @@
makeSentient: true
name: monkey
description: Ook ook!
rules: |
Being a monkey does NOT give you a free pass to kill, RDM or self-antag.
- type: Sprite
drawdepth: Mobs
layers:

View File

@@ -21,6 +21,7 @@
- type: CameraRecoil
- type: Examiner
- type: HumanInventoryController
- type: CanHostGuardian
- type: AiFactionTag
factions:
- NanoTrasen