Skip to content

Commit

Permalink
resomi
Browse files Browse the repository at this point in the history
  • Loading branch information
pofitlo-Git committed Nov 8, 2024
1 parent 0047169 commit 07f5191
Show file tree
Hide file tree
Showing 153 changed files with 1,537 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Content.Server/Flash/FlashSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ public void Flash(EntityUid target,
bool melee = false,
TimeSpan? stunDuration = null)
{
#region CorvaxNext
//CorvaxNext duration modifier for resomi
if (TryComp<FlashModifierComponent>(target, out var CompUser))
{
flashDuration *= CompUser.Modifier;
}
#endregion

var attempt = new FlashAttemptEvent(target, user, used);
RaiseLocalEvent(target, attempt, true);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Content.Shared.Alert;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Server.Resomi.Abilities
{
[RegisterComponent]
public sealed partial class ResomiSkillComponent : Component
{
/// <summary>
/// Whether this component is active or not.
/// </summarY>
[DataField("enabled")]
public bool Enabled = true;

[DataField("invisibleWallAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? InvisibleWallAction = "ActionMimeInvisibleWall";

[DataField("invisibleWallActionEntity")] public EntityUid? InvisibleWallActionEntity;

// The vow zone lies below
public bool VowBroken = false;

public bool ReadyToRepent = false;

/// <summary>
/// Time when the mime can repent their vow
/// </summary>
[DataField("vowRepentTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan VowRepentTime = TimeSpan.Zero;

/// <summary>
/// How long it takes the mime to get their powers back
/// </summary>
[DataField("vowCooldown")]
public TimeSpan VowCooldown = TimeSpan.FromMinutes(5);

[DataField]
public ProtoId<AlertPrototype> VowAlert = "VowOfSilence";

[DataField]
public ProtoId<AlertPrototype> VowBrokenAlert = "VowBroken";

[DataField("wallPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string WallPrototype = "WallInvisible";

}
}
87 changes: 87 additions & 0 deletions Content.Server/_CorvaxNext/Resomi/Abilities/ResomiSkillSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
using Content.Server.Popups;
using Content.Shared.Actions;
using Content.Shared.Actions.Events;
using Content.Shared.Alert;
using Content.Shared.Coordinates.Helpers;
using Content.Shared.Maps;
using Content.Shared.Mobs.Components;
using Content.Shared.Physics;
using Robust.Shared.Containers;
using Robust.Shared.Map;
using Robust.Shared.Timing;
using Content.Shared.Speech.Muting;
using Robust.Shared.Physics.Systems;

namespace Content.Server.Resomi.Abilities
{
public sealed class ResomiSkillSystem : EntitySystem
{
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
[Dependency] private readonly EntityLookupSystem _lookupSystem = default!;
[Dependency] private readonly TurfSystem _turf = default!;
[Dependency] private readonly IMapManager _mapMan = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly IGameTiming _timing = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ResomiSkillComponent, ComponentInit>(OnComponentInit);
SubscribeLocalEvent<ResomiSkillComponent, InvisibleWallActionEvent>(OnInvisibleWall);
}

public override void Update(float frameTime)
{
base.Update(frameTime);
// Queue to track whether mimes can retake vows yet

var query = EntityQueryEnumerator<ResomiSkillComponent>();
while (query.MoveNext(out var uid, out var mime))
{
if (!mime.VowBroken || mime.ReadyToRepent)
continue;

if (_timing.CurTime < mime.VowRepentTime)
continue;

mime.ReadyToRepent = true;
_popupSystem.PopupEntity(Loc.GetString("mime-ready-to-repent"), uid, uid);
}
}

private void OnComponentInit(EntityUid uid, ResomiSkillComponent component, ComponentInit args)
{
EnsureComp<MutedComponent>(uid);
_alertsSystem.ShowAlert(uid, component.VowAlert);
_actionsSystem.AddAction(uid, ref component.InvisibleWallActionEntity, component.InvisibleWallAction, uid);
}

/// <summary>
/// Creates an invisible wall in a free space after some checks.
/// </summary>
private void OnInvisibleWall(EntityUid uid, ResomiSkillComponent component, InvisibleWallActionEvent args)
{
if (!component.Enabled)
return;

if (_container.IsEntityOrParentInContainer(uid))
return;

var xform = Transform(uid);
// Get the tile in front of the mime
var offsetValue = xform.LocalRotation.ToWorldVec();
var coords = xform.Coordinates.Offset(offsetValue).SnapToGrid(EntityManager, _mapMan);
var tile = coords.GetTileRef(EntityManager, _mapMan);
if (tile == null)
return;

_popupSystem.PopupEntity(Loc.GetString("mime-invisible-wall-popup", ("mime", uid)), uid);
// Make sure we set the invisible wall to despawn properly
Spawn(component.WallPrototype, _turf.GetTileCenter(tile.Value));
// Handle args so cooldown works
args.Handled = true;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Content.Shared._CorvaxNext.Flash.Components;

[RegisterComponent]
public sealed partial class FlashModifierComponent : Component
{
[DataField]
public float Modifier = 1f;
}
2 changes: 2 additions & 0 deletions Resources/Audio/_CorvaxNext/Voice/Resomi/attritbutions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- files: [resomi_scream.ogg]
copyright: '"'
Binary file not shown.
18 changes: 18 additions & 0 deletions Resources/Locale/ru-RU/_CorvaxNext/accessories/resomi-hair.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
marking-HairResomiBackstrafe = Resomi Backstrafe
marking-HairResomiBurstShort = Resomi Burst Short
marking-HairResomiDefault = Resomi Default
marking-HairResomiDroopy = Resomi Droopy
marking-HairResomiEars = Resomi Ears
marking-HairResomiFluffymohawk = Resomi Fluffymohawk
marking-HairResomiHedge = Resomi Hedge
marking-HairResomiLongway = Resomi Longway
marking-HairResomiMane = Resomi Mane
marking-HairResomiManeBeardless = Resomi Mane (Beardless)
marking-HairResomiMohawk = Resomi Mohawk
marking-HairResomiMushroom = Resomi Mushroom
marking-HairResomiNotree = Resomi Notree
marking-HairResomiSpiky = Resomi Spiky
marking-HairResomiPointy = ResomiPointy
marking-HairResomiTwies = Resomi Twies
marking-HairResomiUpright = Resomi Upright
marking-HairResomiLong = Resomi Long
29 changes: 29 additions & 0 deletions Resources/Locale/ru-RU/_CorvaxNext/markings/resomi.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
marking-ResomiTail = Resomi tail
marking-ResomiTail-tail = Resomi tail
marking-ResomiTailFeathers = Tail feathers
marking-ResomiTailFeathers-tail_feathers = Tail feathers
marking-ResomiLArmFeathers = Resomi left arm Feathers
marking-ResomiLArmFeathers-l_hand_feathers = Resomi left arm Feathers
marking-ResomiLLegFeathers = Resomi left leg Feathers
marking-ResomiLLegFeathers-l_foot_feathers = Resomi left leg Feathers
marking-ResomiRArmFeathers = Resomi right arm Feathers
marking-ResomiRArmFeathers-r_hand_feathers = Resomi right arm Feathers
marking-ResomiRLegFeathers = Resomi right leg Feathers
marking-ResomiRLegFeathers-r_foot_feathers = Resomi right leg Feathers
marking-ResomiFluff = Resomi under fluff
marking-ResomiFluff-fluff = Resomi under fluff
marking-ResomiFluffHead = Resomi head fluff
marking-ResomiFluffHead-fluff_head = Resomi head fluff
marking-ResomiFluffHeadUp = Resomi head fluff (up)
marking-ResomiFluffHeadUp-fluff_head_up = Resomi head fluff (up)
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/species/species.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ species-name-arachnid = Арахнид
species-name-moth = Ниан
species-name-skeleton = Скелет
species-name-vox = Вокс
species-name-resomi = Резоми #CorvaxNext
snail-hurt-by-salt-popup = Солевой раствор жжёт как кислота!
118 changes: 118 additions & 0 deletions Resources/Prototypes/_CorvaxNext/Body/Parts/resomi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
- type: entity
id: PartResomi
parent: [BaseItem, BasePart]
name: "resomi body part"
abstract: true
components:
- type: Extractable
juiceSolution:
reagents:
- ReagentId: Fat
Quantity: 3
- ReagentId: Blood
Quantity: 10

- type: entity
id: TorsoResomi
name: "resomi torso"
parent: [PartHuman, BaseTorso]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "torso_m"
- type: Extractable
juiceSolution:
reagents:
- ReagentId: Fat
Quantity: 10
- ReagentId: Blood
Quantity: 20


- type: entity
id: HeadResomi
name: "resomi head"
parent: [PartHuman, BaseHead]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "head_m"
- type: Extractable
juiceSolution:
reagents:
- ReagentId: Fat
Quantity: 5
- ReagentId: Blood
Quantity: 10

- type: entity
id: LeftArmResomi
name: "left resomi arm"
parent: [PartHuman, BaseLeftArm]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "l_arm"

- type: entity
id: RightArmResomi
name: "right resomi arm"
parent: [PartHuman, BaseRightArm]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "r_arm"

- type: entity
id: LeftHandResomi
name: "left resomi hand"
parent: [PartHuman, BaseLeftHand]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "l_hand"

- type: entity
id: RightHandResomi
name: "right resomi hand"
parent: [PartHuman, BaseRightHand]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "r_hand"

- type: entity
id: LeftLegResomi
name: "left resomi leg"
parent: [PartHuman, BaseLeftLeg]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "l_leg"

- type: entity
id: RightLegResomi
name: "right resomi leg"
parent: [PartHuman, BaseRightLeg]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "r_leg"

- type: entity
id: LeftFootResomi
name: "left resomi foot"
parent: [PartHuman, BaseLeftFoot]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "l_foot"

- type: entity
id: RightFootResomi
name: "right resomi foot"
parent: [PartHuman, BaseRightFoot]
components:
- type: Sprite
sprite: _CorvaxNext/Mobs/Species/Resomi/parts.rsi
state: "r_foot"
49 changes: 49 additions & 0 deletions Resources/Prototypes/_CorvaxNext/Body/Prototypes/resomi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
- type: body
id: Resomi
name: "resomi"
root: torso
slots:
head:
part: HeadResomi
connections:
- torso
organs:
brain: OrganHumanBrain
eyes: OrganHumanEyes
torso:
part: TorsoResomi
connections:
- right_arm
- left_arm
- right_leg
- left_leg
organs:
heart: OrganHumanHeart
lungs: OrganHumanLungs
stomach: OrganHumanStomach
liver: OrganHumanLiver
kidneys: OrganHumanKidneys
right_arm:
part: RightArmResomi
connections:
- right_hand
left_arm:
part: LeftArmResomi
connections:
- left_hand
right_hand:
part: RightHandResomi
left_hand:
part: LeftHandResomi
right_leg:
part: RightLegResomi
connections:
- right_foot
left_leg:
part: LeftLegResomi
connections:
- left_foot
right_foot:
part: RightFootResomi
left_foot:
part: LeftFootResomi
Loading

0 comments on commit 07f5191

Please sign in to comment.