Familiar QOL changes (#7614)
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Shared.Damage;
|
|||||||
using Content.Shared.Verbs;
|
using Content.Shared.Verbs;
|
||||||
using Content.Shared.Tag;
|
using Content.Shared.Tag;
|
||||||
using Content.Shared.ActionBlocker;
|
using Content.Shared.ActionBlocker;
|
||||||
|
using Content.Shared.Actions;
|
||||||
using Content.Server.Cooldown;
|
using Content.Server.Cooldown;
|
||||||
using Content.Server.Bible.Components;
|
using Content.Server.Bible.Components;
|
||||||
using Content.Server.Popups;
|
using Content.Server.Popups;
|
||||||
@@ -13,7 +14,6 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
|
|
||||||
namespace Content.Server.Bible
|
namespace Content.Server.Bible
|
||||||
{
|
{
|
||||||
public sealed class BibleSystem : EntitySystem
|
public sealed class BibleSystem : EntitySystem
|
||||||
@@ -25,6 +25,7 @@ namespace Content.Server.Bible
|
|||||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||||
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
|
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
|
||||||
|
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -32,6 +33,8 @@ namespace Content.Server.Bible
|
|||||||
|
|
||||||
SubscribeLocalEvent<BibleComponent, AfterInteractEvent>(OnAfterInteract);
|
SubscribeLocalEvent<BibleComponent, AfterInteractEvent>(OnAfterInteract);
|
||||||
SubscribeLocalEvent<SummonableComponent, GetVerbsEvent<AlternativeVerb>>(AddSummonVerb);
|
SubscribeLocalEvent<SummonableComponent, GetVerbsEvent<AlternativeVerb>>(AddSummonVerb);
|
||||||
|
SubscribeLocalEvent<SummonableComponent, GetItemActionsEvent>(GetSummonAction);
|
||||||
|
SubscribeLocalEvent<SummonableComponent, SummonActionEvent>(OnSummon);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInteractEvent args)
|
private void OnAfterInteract(EntityUid uid, BibleComponent component, AfterInteractEvent args)
|
||||||
@@ -111,6 +114,17 @@ namespace Content.Server.Bible
|
|||||||
args.Verbs.Add(verb);
|
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)
|
private void AttemptSummon(SummonableComponent component, EntityUid user, TransformComponent? position)
|
||||||
{
|
{
|
||||||
if (component.AlreadySummoned || component.SpecialItemPrototype == null)
|
if (component.AlreadySummoned || component.SpecialItemPrototype == null)
|
||||||
@@ -126,6 +140,10 @@ namespace Content.Server.Bible
|
|||||||
|
|
||||||
EntityManager.SpawnEntity(component.SpecialItemPrototype, position.Coordinates);
|
EntityManager.SpawnEntity(component.SpecialItemPrototype, position.Coordinates);
|
||||||
component.AlreadySummoned = true;
|
component.AlreadySummoned = true;
|
||||||
|
_actionsSystem.RemoveAction(user, component.SummonAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public sealed class SummonActionEvent : InstantActionEvent
|
||||||
|
{}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
using Content.Shared.Actions.ActionTypes;
|
||||||
|
using Content.Server.Bible;
|
||||||
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.Bible.Components
|
namespace Content.Server.Bible.Components
|
||||||
{
|
{
|
||||||
@@ -19,5 +22,13 @@ namespace Content.Server.Bible.Components
|
|||||||
[DataField("requriesBibleUser")]
|
[DataField("requriesBibleUser")]
|
||||||
public bool RequiresBibleUser = true;
|
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(),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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-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-sizzle = The book sizzles in your hands!
|
||||||
bible-summon-verb = Summon familiar
|
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-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-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)}.
|
necro-heal-fail-self = You hit {THE($target)} with {THE($bible)}, and it lands with a sad thwack, failing to smite {OBJECT($target)}.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
description: Some cultures find them terrifying, others crunchy on the teeth.
|
description: Some cultures find them terrifying, others crunchy on the teeth.
|
||||||
components:
|
components:
|
||||||
- type: MovementSpeedModifier
|
- type: MovementSpeedModifier
|
||||||
baseWalkSpeed : 6
|
baseWalkSpeed : 3
|
||||||
baseSprintSpeed : 6
|
baseSprintSpeed : 6
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: Mobs
|
drawdepth: Mobs
|
||||||
@@ -51,6 +51,13 @@
|
|||||||
bloodMaxVolume: 50
|
bloodMaxVolume: 50
|
||||||
- type: ReplacementAccent
|
- type: ReplacementAccent
|
||||||
accent: mouse
|
accent: mouse
|
||||||
|
- type: UnarmedCombat
|
||||||
|
range: 1.5
|
||||||
|
arcwidth: 0
|
||||||
|
arc: bite
|
||||||
|
damage:
|
||||||
|
types:
|
||||||
|
Piercing: 5
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: bee
|
name: bee
|
||||||
|
|||||||
@@ -113,48 +113,6 @@
|
|||||||
types:
|
types:
|
||||||
Heat : 1 #per second, scales with temperature & other constants
|
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
|
- type: entity
|
||||||
name: Ian
|
name: Ian
|
||||||
parent: MobCorgi
|
parent: MobCorgi
|
||||||
@@ -201,25 +159,6 @@
|
|||||||
proper: true
|
proper: true
|
||||||
gender: male
|
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
|
- type: entity
|
||||||
name: Lisa
|
name: Lisa
|
||||||
parent: MobCorgi
|
parent: MobCorgi
|
||||||
|
|||||||
73
Resources/Prototypes/Entities/Mobs/Player/familiars.yml
Normal file
73
Resources/Prototypes/Entities/Mobs/Player/familiars.yml
Normal 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
|
||||||
Reference in New Issue
Block a user