Familiar QOL changes (#7614)

This commit is contained in:
Rane 2022-04-17 17:43:00 -04:00 committed by GitHub
parent d0a3044edd
commit 05af8776ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 112 additions and 63 deletions

View File

@ -5,6 +5,7 @@ using Content.Shared.Damage;
using Content.Shared.Verbs;
using Content.Shared.Tag;
using Content.Shared.ActionBlocker;
using Content.Shared.Actions;
using Content.Server.Cooldown;
using Content.Server.Bible.Components;
using Content.Server.Popups;
@ -13,7 +14,6 @@ using Robust.Shared.Audio;
using Robust.Shared.Player;
using Robust.Shared.Timing;
namespace Content.Server.Bible
{
public sealed class BibleSystem : EntitySystem
@ -25,6 +25,7 @@ namespace Content.Server.Bible
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly TagSystem _tagSystem = default!;
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
public override void Initialize()
{
@ -32,6 +33,8 @@ namespace Content.Server.Bible
SubscribeLocalEvent<BibleComponent, AfterInteractEvent>(OnAfterInteract);
SubscribeLocalEvent<SummonableComponent, GetVerbsEvent<AlternativeVerb>>(AddSummonVerb);
SubscribeLocalEvent<SummonableComponent, GetItemActionsEvent>(GetSummonAction);
SubscribeLocalEvent<SummonableComponent, SummonActionEvent>(OnSummon);
}
private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInteractEvent args)
@ -111,6 +114,17 @@ namespace Content.Server.Bible
args.Verbs.Add(verb);
}
private void GetSummonAction(EntityUid uid, SummonableComponent component, GetItemActionsEvent args)
{
if (component.AlreadySummoned)
return;
args.Actions.Add(component.SummonAction);
}
private void OnSummon(EntityUid uid, SummonableComponent component, SummonActionEvent args)
{
AttemptSummon(component, args.Performer, Transform(args.Performer));
}
private void AttemptSummon(SummonableComponent component, EntityUid user, TransformComponent? position)
{
if (component.AlreadySummoned || component.SpecialItemPrototype == null)
@ -126,6 +140,10 @@ namespace Content.Server.Bible
EntityManager.SpawnEntity(component.SpecialItemPrototype, position.Coordinates);
component.AlreadySummoned = true;
_actionsSystem.RemoveAction(user, component.SummonAction);
}
}
public sealed class SummonActionEvent : InstantActionEvent
{}
}

View File

@ -1,5 +1,8 @@
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Prototypes;
using Content.Shared.Actions.ActionTypes;
using Content.Server.Bible;
using Robust.Shared.Utility;
namespace Content.Server.Bible.Components
{
@ -19,5 +22,13 @@ namespace Content.Server.Bible.Components
[DataField("requriesBibleUser")]
public bool RequiresBibleUser = true;
[DataField("summonAction")]
public InstantAction SummonAction = new()
{
Icon = new SpriteSpecifier.Texture(new ResourcePath("Clothing/Head/Hats/witch.rsi/icon.png")),
Name = "bible-summon-verb",
Description = "bible-summon-verb-desc",
Event = new SummonActionEvent(),
};
}
}

View File

@ -4,6 +4,7 @@ bible-heal-fail-self = You hit {THE($target)} with {THE($bible)}, and it lands w
bible-heal-fail-others = {CAPITALIZE(THE($user))} hits {THE($target)} with {THE($bible)}, and it lands with a sad thack, dazing {OBJECT($target)}!
bible-sizzle = The book sizzles in your hands!
bible-summon-verb = Summon familiar
bible-summon-verb-desc = Summon a familiar that will aid you and gain humanlike intelligence once inhabited by a soul.
necro-heal-success-self = You hit {THE($target)} with {THE($bible)}, and {POSS-ADJ($target)} flesh warps as it melts!
necro-heal-success-others = {CAPITALIZE(THE($user))} hits {THE($target)} with {THE($bible)}, and {POSS-ADJ($target)} flesh warps as it melts!
necro-heal-fail-self = You hit {THE($target)} with {THE($bible)}, and it lands with a sad thwack, failing to smite {OBJECT($target)}.

View File

@ -8,7 +8,7 @@
description: Some cultures find them terrifying, others crunchy on the teeth.
components:
- type: MovementSpeedModifier
baseWalkSpeed : 6
baseWalkSpeed : 3
baseSprintSpeed : 6
- type: Sprite
drawdepth: Mobs
@ -51,6 +51,13 @@
bloodMaxVolume: 50
- type: ReplacementAccent
accent: mouse
- type: UnarmedCombat
range: 1.5
arcwidth: 0
arc: bite
damage:
types:
Piercing: 5
- type: entity
name: bee

View File

@ -113,48 +113,6 @@
types:
Heat : 1 #per second, scales with temperature & other constants
- type: entity
name: Cerberus
parent: MobCorgiNarsi
id: MobCorgiCerberus
description: This pupper is not wholesome.
components:
- type: GhostTakeoverAvailable
makeSentient: true
name: Cerberus, Evil Familiar
description: Obey your master. Spread chaos.
rules: You are an intelligent, demonic dog. Try to help the chaplain and any of his flock. As an antagonist, you're otherwise unrestrained.
- type: UnarmedCombat
range: 1.5
arcwidth: 0
arc: bite
damage:
types:
Piercing: 8
Slash: 7
- type: UtilityAI
behaviorSets:
- Idle
- type: AiFactionTag
factions:
- SimpleNeutral
- type: InteractionPopup
successChance: 0.5
interactSuccessString: petting-success-corrupted-corgi
interactFailureString: petting-failure-corrupted-corgi
- type: MobState
thresholds:
0: !type:NormalMobState {}
80: !type:CriticalMobState {}
160: !type:DeadMobState {}
- type: Grammar
attributes:
gender: male
proper: true
- type: Tag
tags:
- Familiar
- type: entity
name: Ian
parent: MobCorgi
@ -201,25 +159,6 @@
proper: true
gender: male
- type: entity
name: Remilia
parent: MobBat
id: MobBatRemilia
description: The chaplain's familiar. Likes fruit.
components:
- type: GhostTakeoverAvailable
makeSentient: true
name: Remilia, the chaplain's familiar
description: Obey your master. Eat fruit.
rules: Follow the chaplain around. Don't cause any trouble unless the chaplain tells you to.
- type: Grammar
attributes:
gender: female
proper: true
- type: Tag
tags:
- Familiar
- type: entity
name: Lisa
parent: MobCorgi

View File

@ -0,0 +1,73 @@
- type: entity
name: Remilia
parent: MobBat
id: MobBatRemilia
description: The chaplain's familiar. Likes fruit.
components:
- type: GhostTakeoverAvailable
makeSentient: true
name: Remilia, the chaplain's familiar
description: Obey your master. Eat fruit.
rules: You are an intelligent fruit bat. Follow the chaplain around. Don't cause any trouble unless the chaplain tells you to.
- type: Grammar
attributes:
gender: female
proper: true
- type: Tag
tags:
- Familiar
- DoorBumpOpener
- type: Access
tags:
- Chapel
- type: Mind
showExamineInfo: true
- type: Alerts
- type: entity
name: Cerberus
parent: MobCorgiNarsi
id: MobCorgiCerberus
description: This pupper is not wholesome.
components:
- type: GhostTakeoverAvailable
makeSentient: true
name: Cerberus, Evil Familiar
description: Obey your master. Spread chaos.
rules: You are an intelligent, demonic dog. Try to help the chaplain and any of his flock. As an antagonist, you're otherwise unrestrained.
- type: UnarmedCombat
range: 1.5
arcwidth: 0
arc: bite
damage:
types:
Piercing: 8
Slash: 7
- type: UtilityAI
behaviorSets:
- Idle
- type: AiFactionTag
factions:
- SimpleNeutral
- type: InteractionPopup
successChance: 0.5
interactSuccessString: petting-success-corrupted-corgi
interactFailureString: petting-failure-corrupted-corgi
- type: MobState
thresholds:
0: !type:NormalMobState {}
80: !type:CriticalMobState {}
160: !type:DeadMobState {}
- type: Grammar
attributes:
gender: male
proper: true
- type: Tag
tags:
- Familiar
- DoorBumpOpener
- type: Access
tags:
- Chapel
- type: Mind
showExamineInfo: true