Skip to content

Commit

Permalink
Oni Morphotype from nyanotrasen (#28)
Browse files Browse the repository at this point in the history
* Oni Morphotype from nyanotrasen

The big felinid destroyer has arrived.

* Added some files. changed species weight again by deletin that one space and addin vulpkanin weight.

(will have to prolly change that after felinids merge)

* Finally fixin the *reason* why it just didnt wanted to show

Also Fixed horns

* Changed localization of files.

* Changed excess to critThreshold

Also changed capitalization of oni_horns.rsi to Oni_horns.rsi.

* Leavin a comment so that someone else can do this.

* Additional merge fixes with files.

* Added THE NAMING SYSTEM!

Only touched 2 base files and summarized it because had no other choice from my understanding

* Removed erroneously named folder

* Replaced erroneously named folder

* Added link so the horns dont have file names.

---------

Signed-off-by: Adrian16199 <[email protected]>
Co-authored-by: Colin-Tel <[email protected]>
  • Loading branch information
Adrian16199 and Colin-Tel authored Sep 21, 2023
1 parent a3cacae commit b88d866
Show file tree
Hide file tree
Showing 26 changed files with 420 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Content.Server.Abilities.Oni
{
[RegisterComponent]
public sealed partial class HeldByOniComponent : Component
{
public EntityUid Holder = default!;
}
}
14 changes: 14 additions & 0 deletions Content.Server/Nyanotrasen/Abilities/Oni/OniComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Content.Shared.Damage;

namespace Content.Server.Abilities.Oni
{
[RegisterComponent]
public sealed partial class OniComponent : Component
{
[DataField("modifiers", required: true)]
public DamageModifierSet MeleeModifiers = default!;

[DataField("stamDamageBonus")]
public float StamDamageMultiplier = 1.25f;
}
}
76 changes: 76 additions & 0 deletions Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
using Content.Server.Tools;
using Content.Shared.Tools.Components;
using Content.Shared.Damage.Events;
using Content.Shared.Weapons.Melee.Events;
using Content.Shared.Weapons.Ranged.Components;
using Robust.Shared.Containers;

namespace Content.Server.Abilities.Oni
{
public sealed class OniSystem : EntitySystem
{
[Dependency] private readonly ToolSystem _toolSystem = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<OniComponent, EntInsertedIntoContainerMessage>(OnEntInserted);
SubscribeLocalEvent<OniComponent, EntRemovedFromContainerMessage>(OnEntRemoved);
SubscribeLocalEvent<OniComponent, MeleeHitEvent>(OnOniMeleeHit);
SubscribeLocalEvent<HeldByOniComponent, MeleeHitEvent>(OnHeldMeleeHit);
SubscribeLocalEvent<HeldByOniComponent, StaminaMeleeHitEvent>(OnStamHit);
}

private void OnEntInserted(EntityUid uid, OniComponent component, EntInsertedIntoContainerMessage args)
{
var heldComp = EnsureComp<HeldByOniComponent>(args.Entity);
heldComp.Holder = uid;

if (TryComp<ToolComponent>(args.Entity, out var tool) && _toolSystem.HasQuality(args.Entity, "Prying", tool))
tool.SpeedModifier *= 1.66f;

if (TryComp<GunComponent>(args.Entity, out var gun))
{
gun.MinAngle *= 15f;
gun.AngleIncrease *= 15f;
gun.MaxAngle *= 15f;
}
}

private void OnEntRemoved(EntityUid uid, OniComponent component, EntRemovedFromContainerMessage args)
{
if (TryComp<ToolComponent>(args.Entity, out var tool) && _toolSystem.HasQuality(args.Entity, "Prying", tool))
tool.SpeedModifier /= 1.66f;

if (TryComp<GunComponent>(args.Entity, out var gun))
{
gun.MinAngle /= 15f;
gun.AngleIncrease /= 15f;
gun.MaxAngle /= 15f;
}

RemComp<HeldByOniComponent>(args.Entity);
}

private void OnOniMeleeHit(EntityUid uid, OniComponent component, MeleeHitEvent args)
{
args.ModifiersList.Add(component.MeleeModifiers);
}

private void OnHeldMeleeHit(EntityUid uid, HeldByOniComponent component, MeleeHitEvent args)
{
if (!TryComp<OniComponent>(component.Holder, out var oni))
return;

args.ModifiersList.Add(oni.MeleeModifiers);
}

private void OnStamHit(EntityUid uid, HeldByOniComponent component, StaminaMeleeHitEvent args)
{
if (!TryComp<OniComponent>(component.Holder, out var oni))
return;

args.Multiplier *= oni.StamDamageMultiplier;
}
}
}
5 changes: 5 additions & 0 deletions Content.Shared/Humanoid/NamingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public string GetName(string species, Gender? gender = null)

switch (speciesProto.Naming)
{
//Start of Nyano code for Oni naming
case SpeciesNaming.XnoY:
return Loc.GetString("namepreset-x-no-y",
("first", GetFirstName(speciesProto, gender)), ("last", GetLastName(speciesProto)));
//End of Nyano code for Oni naming
case SpeciesNaming.TheFirstofLast:
return Loc.GetString("namepreset-thefirstoflast",
("first", GetFirstName(speciesProto, gender)), ("last", GetLastName(speciesProto)));
Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,8 @@ public enum SpeciesNaming : byte
{
FirstLast,
FirstDashFirst,
//Start of Nyano code for Oni naming
XnoY,
//End of Nyano code for Oni naming
TheFirstofLast,
}
1 change: 1 addition & 0 deletions Resources/Locale/en-US/nyanotrasen/abilities/Oni.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oni-gun-fire = You can't fire guns!
7 changes: 7 additions & 0 deletions Resources/Locale/en-US/nyanotrasen/markings/Oni.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
marking-OniHornSingleCurved = Single Curved
marking-OniHornSingleLeftCurved =Single Left Curved
marking-OniHornSingleRightCurved = Single Right Curved
marking-OniHornDoubleCurvedOutwards = Double Curved Outwards
marking-OniHornDoubleCurved = Double Curved
marking-OniHornDoubleLeftBrokeCurved = Double Left Broke Curved
marking-OniHornDoubleRightBrokeCurved = Double Right Broke Curved
1 change: 1 addition & 0 deletions Resources/Locale/en-US/nyanotrasen/species/namepreset.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
namepreset-x-no-y = {$last}-no-{$first}
1 change: 1 addition & 0 deletions Resources/Locale/en-US/nyanotrasen/species/species.ftl
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
species-name-oni = Oni
species-name-felinid = Felinid
7 changes: 7 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Damage/modifier_sets.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
- type: damageModifierSet
id: Oni
coefficients:
Blunt: 0.85
Slash: 0.85
Piercing: 0.85

- type: damageModifierSet
id: Felinid
coefficients:
Expand Down
21 changes: 21 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_female.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- type: dataset
id: names_oni_female
values:
- Akari #
- Kira
- Kirameki
- Aki #
- Akiho
- Akimi
- Akashi #
- Saya
- Aporo #
- Arute
- Meguru
- Tiara #
- Suisei
- Io #
- Aoi
- Mizu
- Shuten #epic references
- Suika
31 changes: 31 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_location.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
- type: dataset
id: names_oni_location
values:
- Amiboshi
- Amefuriboshi
- Aoboshi
- Ashitareboshi
- Chirikoboshi
- Chichiriboshi
- Ekieboshi
- Inamiboshi
- Hatsuinoshi
- Hikitsuboshi
- Hotohoriboshi
- Karasukiboshi
- Miboshi
- Namameboshi
- Nakagoboshi
- Nuriboshi
- Soiboshi
- Suboshi
- Subaruboshi
- Tamaonoboshi
- Tasukiboshi
- Tataraboshi
- Tomiteboshi
- Tomoboshi
- Tokakiboshi
- Torokiboshi
- Umiyameboshi
- Urukiboshi
20 changes: 20 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_male.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- type: dataset
id: names_oni_male
values:
- Kiyoshi #
- Satoshi #
- Teru #
- Hiroshi
- Takashi #
- Eeichi #永一
- Eeichirou #永一朗
- Kyousaburou
- Tsutomu
- Tsuyoshi
- Kenshi
- Kenji
- Kenichi
- Susumu
- Kyounosuke
- Suisei #Mars
- Shuten #Reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
- type: marking
id: OniHornSingleCurved
bodyPart: HeadTop
markingCategory: HeadTop
forcedColoring: false
speciesRestriction: [Oni]
sprites:
- sprite: Nyanotrasen/Mobs/Customization/oni_horns.rsi
state: single_curved

- type: marking
id: OniHornSingleLeftCurved
bodyPart: HeadTop
markingCategory: HeadTop
forcedColoring: false
speciesRestriction: [Oni]
sprites:
- sprite: Nyanotrasen/Mobs/Customization/oni_horns.rsi
state: single_left_curved

- type: marking
id: OniHornSingleRightCurved
bodyPart: HeadTop
markingCategory: HeadTop
forcedColoring: false
speciesRestriction: [Oni]
sprites:
- sprite: Nyanotrasen/Mobs/Customization/oni_horns.rsi
state: single_right_curved

- type: marking
id: OniHornDoubleCurvedOutwards
bodyPart: HeadTop
markingCategory: HeadTop
forcedColoring: false
speciesRestriction: [Oni]
sprites:
- sprite: Nyanotrasen/Mobs/Customization/oni_horns.rsi
state: double_curved_outwards

- type: marking
id: OniHornDoubleCurved
bodyPart: HeadTop
markingCategory: HeadTop
forcedColoring: false
speciesRestriction: [Oni]
sprites:
- sprite: Nyanotrasen/Mobs/Customization/oni_horns.rsi
state: double_curved

- type: marking
id: OniHornDoubleLeftBrokeCurved
bodyPart: HeadTop
markingCategory: HeadTop
forcedColoring: false
speciesRestriction: [Oni]
sprites:
- sprite: Nyanotrasen/Mobs/Customization/oni_horns.rsi
state: double_left_broke_curved

- type: marking
id: OniHornDoubleRightBrokeCurved
bodyPart: HeadTop
markingCategory: HeadTop
forcedColoring: false
speciesRestriction: [Oni]
sprites:
- sprite: Nyanotrasen/Mobs/Customization/oni_horns.rsi
state: double_right_broke_curved
35 changes: 35 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Entities/Mobs/Player/Oni.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
- type: entity
save: false
name: Urist McOni
parent: MobOniBase
id: MobOni
components:
- type: CombatMode
- type: InteractionPopup
successChance: 1
interactSuccessString: hugging-success-generic
interactSuccessSound: /Audio/Effects/thudswoosh.ogg
messagePerceivedByOthers: hugging-success-generic-others
- type: MindContainer
showExamineInfo: true
- type: Input
context: "human"
- type: MobMover
- type: InputMover
- type: Respirator
damage:
types:
Asphyxiation: 1.0
damageRecovery:
types:
Asphyxiation: -1.0
- type: Alerts
- type: Actions
- type: Eye
- type: CameraRecoil
- type: Examiner
- type: CanHostGuardian
- type: NpcFactionMember
factions:
- NanoTrasen
#type: PotentialPsionic
45 changes: 45 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Entities/Mobs/Species/Oni.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
- type: entity
parent: BaseMobHuman
name: Urist McOni
id: MobOniBase
abstract: true
components:
- type: Speech
speechSounds: Baritone
- type: HumanoidAppearance
species: Oni
- type: Sprite
scale: 1.2, 1.2
- type: Oni
modifiers:
coefficients:
Blunt: 1.35
Slash: 1.2
Piercing: 1.2
Asphyxiation: 1.35
- type: Damageable
damageModifierSet: Oni
- type: Body
prototype: Human
- type: Fixtures
fixtures: # TODO: This needs a second fixture just for mob collisions.
fix1:
shape:
!type:PhysShapeCircle
radius: 0.42
density: 220
restitution: 0.0
mask:
- MobMask
layer:
- MobLayer
- type: Stamina
critThreshold: 115

- type: entity
save: false
name: Urist McOni
parent: MobHumanDummy
id: MobOniDummy
noSpawn: true
description: A dummy oni meant to be used in character setup.
Loading

0 comments on commit b88d866

Please sign in to comment.