diff --git a/Content.Server/Nyanotrasen/Abilities/Oni/HeldbyOniComponent.cs b/Content.Server/Nyanotrasen/Abilities/Oni/HeldbyOniComponent.cs new file mode 100644 index 00000000000..41ec3fa630e --- /dev/null +++ b/Content.Server/Nyanotrasen/Abilities/Oni/HeldbyOniComponent.cs @@ -0,0 +1,8 @@ +namespace Content.Server.Abilities.Oni +{ + [RegisterComponent] + public sealed partial class HeldByOniComponent : Component + { + public EntityUid Holder = default!; + } +} diff --git a/Content.Server/Nyanotrasen/Abilities/Oni/OniComponent.cs b/Content.Server/Nyanotrasen/Abilities/Oni/OniComponent.cs new file mode 100644 index 00000000000..af18a8021d4 --- /dev/null +++ b/Content.Server/Nyanotrasen/Abilities/Oni/OniComponent.cs @@ -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; + } +} diff --git a/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs b/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs new file mode 100644 index 00000000000..e0139685a7a --- /dev/null +++ b/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs @@ -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(OnEntInserted); + SubscribeLocalEvent(OnEntRemoved); + SubscribeLocalEvent(OnOniMeleeHit); + SubscribeLocalEvent(OnHeldMeleeHit); + SubscribeLocalEvent(OnStamHit); + } + + private void OnEntInserted(EntityUid uid, OniComponent component, EntInsertedIntoContainerMessage args) + { + var heldComp = EnsureComp(args.Entity); + heldComp.Holder = uid; + + if (TryComp(args.Entity, out var tool) && _toolSystem.HasQuality(args.Entity, "Prying", tool)) + tool.SpeedModifier *= 1.66f; + + if (TryComp(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(args.Entity, out var tool) && _toolSystem.HasQuality(args.Entity, "Prying", tool)) + tool.SpeedModifier /= 1.66f; + + if (TryComp(args.Entity, out var gun)) + { + gun.MinAngle /= 15f; + gun.AngleIncrease /= 15f; + gun.MaxAngle /= 15f; + } + + RemComp(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(component.Holder, out var oni)) + return; + + args.ModifiersList.Add(oni.MeleeModifiers); + } + + private void OnStamHit(EntityUid uid, HeldByOniComponent component, StaminaMeleeHitEvent args) + { + if (!TryComp(component.Holder, out var oni)) + return; + + args.Multiplier *= oni.StamDamageMultiplier; + } + } +} diff --git a/Content.Shared/Humanoid/NamingSystem.cs b/Content.Shared/Humanoid/NamingSystem.cs index 5e9ebdbf23c..a44f396dcaf 100644 --- a/Content.Shared/Humanoid/NamingSystem.cs +++ b/Content.Shared/Humanoid/NamingSystem.cs @@ -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))); diff --git a/Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs b/Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs index 54c74e542fc..ad2562fe141 100644 --- a/Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs +++ b/Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs @@ -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, } diff --git a/Resources/Locale/en-US/nyanotrasen/abilities/Oni.ftl b/Resources/Locale/en-US/nyanotrasen/abilities/Oni.ftl new file mode 100644 index 00000000000..a84178339d6 --- /dev/null +++ b/Resources/Locale/en-US/nyanotrasen/abilities/Oni.ftl @@ -0,0 +1 @@ +oni-gun-fire = You can't fire guns! diff --git a/Resources/Locale/en-US/nyanotrasen/markings/Oni.ftl b/Resources/Locale/en-US/nyanotrasen/markings/Oni.ftl new file mode 100644 index 00000000000..7b8a14bccf3 --- /dev/null +++ b/Resources/Locale/en-US/nyanotrasen/markings/Oni.ftl @@ -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 diff --git a/Resources/Locale/en-US/nyanotrasen/species/namepreset.ftl b/Resources/Locale/en-US/nyanotrasen/species/namepreset.ftl new file mode 100644 index 00000000000..030001e5ef5 --- /dev/null +++ b/Resources/Locale/en-US/nyanotrasen/species/namepreset.ftl @@ -0,0 +1 @@ +namepreset-x-no-y = {$last}-no-{$first} diff --git a/Resources/Locale/en-US/nyanotrasen/species/species.ftl b/Resources/Locale/en-US/nyanotrasen/species/species.ftl index b67fa191414..c55f81ed0b5 100644 --- a/Resources/Locale/en-US/nyanotrasen/species/species.ftl +++ b/Resources/Locale/en-US/nyanotrasen/species/species.ftl @@ -1 +1,2 @@ +species-name-oni = Oni species-name-felinid = Felinid diff --git a/Resources/Prototypes/Nyanotrasen/Damage/modifier_sets.yml b/Resources/Prototypes/Nyanotrasen/Damage/modifier_sets.yml index a92c387bd09..97f5b72cf0f 100644 --- a/Resources/Prototypes/Nyanotrasen/Damage/modifier_sets.yml +++ b/Resources/Prototypes/Nyanotrasen/Damage/modifier_sets.yml @@ -1,3 +1,10 @@ +- type: damageModifierSet + id: Oni + coefficients: + Blunt: 0.85 + Slash: 0.85 + Piercing: 0.85 + - type: damageModifierSet id: Felinid coefficients: diff --git a/Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_female.yml b/Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_female.yml new file mode 100644 index 00000000000..afb58253096 --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_female.yml @@ -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 diff --git a/Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_location.yml b/Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_location.yml new file mode 100644 index 00000000000..a7eda394872 --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_location.yml @@ -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 diff --git a/Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_male.yml b/Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_male.yml new file mode 100644 index 00000000000..2742cf90734 --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Datasets/Names/oni_male.yml @@ -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 diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Customization/Markings/Oni_horns.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Customization/Markings/Oni_horns.yml new file mode 100644 index 00000000000..39dca5ef9ab --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Customization/Markings/Oni_horns.yml @@ -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 diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Player/Oni.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Player/Oni.yml new file mode 100644 index 00000000000..86126334be9 --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Player/Oni.yml @@ -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 diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Species/Oni.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Species/Oni.yml new file mode 100644 index 00000000000..e11f1c4165f --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/Species/Oni.yml @@ -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. diff --git a/Resources/Prototypes/Nyanotrasen/Species/Oni.yml b/Resources/Prototypes/Nyanotrasen/Species/Oni.yml new file mode 100644 index 00000000000..84c6eac63d2 --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Species/Oni.yml @@ -0,0 +1,36 @@ +- type: species + id: Oni + name: species-name-oni + roundStart: true + prototype: MobOni + dollPrototype: MobOniDummy + markingLimits: MobOniMarkingLimits + sprites: MobHumanSprites + skinColoration: Hues + maleFirstNames: names_oni_male + femaleFirstNames: names_oni_female + lastNames: names_oni_location + naming: XnoY + +- type: markingPoints + id: MobOniMarkingLimits + points: + Hair: + points: 1 + required: false + FacialHair: + points: 1 + required: false + HeadTop: + points: 1 + required: true + defaultMarkings: [ OniHornSingleCurved ] + Chest: + points: 1 + required: false + Legs: + points: 2 + required: false + Arms: + points: 2 + required: false diff --git a/Resources/Prototypes/Species/species_weights.yml b/Resources/Prototypes/Species/species_weights.yml index ca66b529d18..990a8ccecfa 100644 --- a/Resources/Prototypes/Species/species_weights.yml +++ b/Resources/Prototypes/Species/species_weights.yml @@ -5,6 +5,7 @@ Human: 5 Reptilian: 4 SlimePerson: 4 + Oni: 3 #Nyanotrasen Oni, see Prototypes/Nyanotrasen/Entities/Mobs/Species/Oni.yml Felinid: 4 # Nyanotrasen - Felinid, see Prototypes/Nyanotrasen/Entities/Mobs/Species/felinid.yml Vulpkanin: 3 # DeltaV - Vulpkanin, see Prototypes/DeltaV/Entities/Mobs/Species/vulpkanin.yml Diona: 2 diff --git a/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_curved.png b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_curved.png new file mode 100644 index 00000000000..cca26d0c7c4 Binary files /dev/null and b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_curved.png differ diff --git a/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_curved_outwards.png b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_curved_outwards.png new file mode 100644 index 00000000000..dc3d02a43ef Binary files /dev/null and b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_curved_outwards.png differ diff --git a/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_left_broke_curved.png b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_left_broke_curved.png new file mode 100644 index 00000000000..1375882784c Binary files /dev/null and b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_left_broke_curved.png differ diff --git a/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_right_broke_curved.png b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_right_broke_curved.png new file mode 100644 index 00000000000..797a21ab85b Binary files /dev/null and b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/double_right_broke_curved.png differ diff --git a/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/meta.json b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/meta.json new file mode 100644 index 00000000000..73fe4fb60c0 --- /dev/null +++ b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/meta.json @@ -0,0 +1,39 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Made by Rane", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "single_curved", + "directions": 4 + }, + { + "name": "single_left_curved", + "directions": 4 + }, + { + "name": "single_right_curved", + "directions": 4 + }, + { + "name": "double_curved_outwards", + "directions": 4 + }, + { + "name": "double_curved", + "directions": 4 + }, + { + "name": "double_left_broke_curved", + "directions": 4 + }, + { + "name": "double_right_broke_curved", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/single_curved.png b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/single_curved.png new file mode 100644 index 00000000000..0f9b9cb293e Binary files /dev/null and b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/single_curved.png differ diff --git a/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/single_left_curved.png b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/single_left_curved.png new file mode 100644 index 00000000000..d079bef1e53 Binary files /dev/null and b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/single_left_curved.png differ diff --git a/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/single_right_curved.png b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/single_right_curved.png new file mode 100644 index 00000000000..f0398e4ddd1 Binary files /dev/null and b/Resources/Textures/Nyanotrasen/Mobs/Customization/oni_horns.rsi/single_right_curved.png differ