Skip to content

Commit

Permalink
resomi
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinary1 committed Feb 22, 2025
1 parent 1103102 commit 314e1b4
Show file tree
Hide file tree
Showing 183 changed files with 1,855 additions and 4 deletions.
10 changes: 9 additions & 1 deletion Content.Server/Flash/FlashSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public override void Initialize()
SubscribeLocalEvent<FlashImmunityComponent, FlashAttemptEvent>(OnFlashImmunityFlashAttempt);
SubscribeLocalEvent<PermanentBlindnessComponent, FlashAttemptEvent>(OnPermanentBlindnessFlashAttempt);
SubscribeLocalEvent<TemporaryBlindnessComponent, FlashAttemptEvent>(OnTemporaryBlindnessFlashAttempt);
SubscribeLocalEvent<FlashModifierComponent, FlashAttemptEvent>(OnModifierFlashAttempt);
}

private void OnFlashMeleeHit(EntityUid uid, FlashComponent comp, MeleeHitEvent args)
Expand Down Expand Up @@ -121,6 +122,9 @@ public void Flash(EntityUid target,

if (attempt.Cancelled)
return;

if (attempt.Multiplier != 1f)
flashDuration *= attempt.Multiplier;

// don't paralyze, slowdown or convert to rev if the target is immune to flashes
if (!_statusEffectsSystem.TryAddStatusEffect<FlashedComponent>(target, FlashedKey, TimeSpan.FromSeconds(flashDuration / 1000f), true))
Expand Down Expand Up @@ -208,6 +212,8 @@ private void OnTemporaryBlindnessFlashAttempt(EntityUid uid, TemporaryBlindnessC
{
args.Cancel();
}

private void OnModifierFlashAttempt(EntityUid uid, FlashModifierComponent component, FlashAttemptEvent args) => args.Multiplier = component.Modifier;
}

/// <summary>
Expand All @@ -219,12 +225,14 @@ public sealed class FlashAttemptEvent : CancellableEntityEventArgs
public readonly EntityUid Target;
public readonly EntityUid? User;
public readonly EntityUid? Used;
public float Multiplier;

public FlashAttemptEvent(EntityUid target, EntityUid? user, EntityUid? used)
public FlashAttemptEvent(EntityUid target, EntityUid? user, EntityUid? used, float multiplier = 1f)
{
Target = target;
User = user;
Used = used;
Multiplier = multiplier;
}
}
/// <summary>
Expand Down
5 changes: 5 additions & 0 deletions Content.Shared/Abilities/Resomi/SharedResomi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using Content.Shared.Actions;

namespace Content.Shared.Abilities.Resomi;

public sealed partial class ResomiJumpActionEvent : WorldTargetActionEvent;
8 changes: 8 additions & 0 deletions Content.Shared/Flash/Components/FlashModifierComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Content.Shared.Flash.Components;

[RegisterComponent]
public sealed partial class FlashModifierComponent : Component
{
[DataField]
public float Modifier = 1f;
}
12 changes: 12 additions & 0 deletions Content.Shared/_Starlight/Restrict/SharedRestrictSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Content.Shared.Popups;
using Content.Shared.Tag;
using Content.Shared.Weapons.Melee.Events;
using Content.Shared.Weapons.Ranged.Systems;
using Robust.Shared.Network;
using Robust.Shared.Random;

Expand All @@ -16,6 +17,7 @@ public override void Initialize()
{
SubscribeLocalEvent<RestrictByUserTagComponent, AttemptMeleeEvent>(OnAttemptMelee);
SubscribeLocalEvent<RestrictByUserTagComponent, InteractionAttemptEvent>(OnAttemptInteract);
SubscribeLocalEvent<RestrictByUserTagComponent, AttemptShootEvent>(OnShotAttempt);
}

private void OnAttemptInteract(Entity<RestrictByUserTagComponent> ent, ref InteractionAttemptEvent args)
Expand All @@ -27,6 +29,16 @@ private void OnAttemptInteract(Entity<RestrictByUserTagComponent> ent, ref Inter
_popup.PopupClient(Loc.GetString(_random.Pick(ent.Comp.Messages)), args.Uid);
}
}

private void OnShotAttempt(Entity<RestrictByUserTagComponent> ent, ref AttemptShootEvent args)
{
if (!_tagSystem.HasAllTags(args.User, ent.Comp.Contains) || _tagSystem.HasAnyTag(args.User, ent.Comp.DoestContain))
{
args.Cancelled = true;
if (ent.Comp.Messages.Count != 0)
args.Message = Loc.GetString(_random.Pick(ent.Comp.Messages));
}
}

private void OnAttemptMelee(Entity<RestrictByUserTagComponent> ent, ref AttemptMeleeEvent args)
{
Expand Down
2 changes: 2 additions & 0 deletions Resources/Audio/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 added Resources/Audio/Voice/Resomi/resomi_scream.ogg
Binary file not shown.
22 changes: 21 additions & 1 deletion Resources/Changelog/ChangelogStarlight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3589,4 +3589,24 @@ Entries:
id: 497
time: '2025-02-21T19:20:04.000000+00:00'
url: https://github.com/ss14Starlight/space-station-14/pull/340

- author: pofitlo-Git, Rinary
changes:
- message: Added Resomi as new playable race.
type: Add
id: 498
time: '2025-02-21T20:11:35.000000+00:00'
url: https://github.com/ss14Starlight/space-station-14/pull/343
- author: Rinary
changes:
- message: Changed resomi health from 70 to 85.
type: Tweak
id: 499
time: '2025-02-21T21:21:58.109677+00:00'
url: 'null'
- author: Rinary
changes:
- message: Resomi can use battery guns.
type: Tweak
id: 500
time: '2025-02-21T21:22:14.457685+00:00'
url: 'null'
18 changes: 18 additions & 0 deletions Resources/Locale/en-US/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/en-US/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)
3 changes: 2 additions & 1 deletion Resources/Locale/en-US/species/species.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ species-name-arachnid = Arachnid
species-name-moth = Moth Person
species-name-skeleton = Skeleton
species-name-vox = Vox
species-name-resomi = Resomi
species-name-gingerbread = delicious baked good
## Misc species things

snail-hurt-by-salt-popup = The salty solution burns like acid!
snail-hurt-by-salt-popup = The salty solution burns like acid!
11 changes: 11 additions & 0 deletions Resources/Prototypes/Body/Organs/resomi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- type: entity
id: OrganResomiEyes
parent: OrganHumanEyes
name: eye
description: "I see you!"
components:
- type: FunctionalOrgan
comps:
- type: NightVision
- type: FlashModifier
modifier: 2
118 changes: 118 additions & 0 deletions Resources/Prototypes/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: 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: 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: Mobs/Species/Resomi/parts.rsi
state: "l_arm"

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

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

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

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

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

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

- type: entity
id: RightFootResomi
name: "right resomi foot"
parent: [PartHuman, BaseRightFoot]
components:
- type: Sprite
sprite: Mobs/Species/Resomi/parts.rsi
state: "r_foot"
49 changes: 49 additions & 0 deletions Resources/Prototypes/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: OrganResomiEyes
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 314e1b4

Please sign in to comment.