diff --git a/Content.Server/Interaction/InteractionPopupSystem.cs b/Content.Server/Interaction/InteractionPopupSystem.cs index a01bf92a2a..bed519ff9d 100644 --- a/Content.Server/Interaction/InteractionPopupSystem.cs +++ b/Content.Server/Interaction/InteractionPopupSystem.cs @@ -37,7 +37,7 @@ public sealed class InteractionPopupSystem : EntitySystem return; string msg = ""; // Stores the text to be shown in the popup message - string sfx = ""; // Stores the filepath of the sound to be played + string? sfx = null; // Stores the filepath of the sound to be played if (_random.Prob(component.SuccessChance)) { @@ -61,10 +61,13 @@ public sealed class InteractionPopupSystem : EntitySystem else _popupSystem.PopupEntity(msg, uid, Filter.Entities(args.User)); //play only for the initiating entity. - if (component.SoundPerceivedByOthers) - SoundSystem.Play(Filter.Pvs(args.Target), sfx, args.Target); //play for everyone in range - else - SoundSystem.Play(Filter.Entities(args.User, args.Target), sfx, args.Target); //play only for the initiating entity and its target. + if (sfx is not null) //not all cases will have sound. + { + if (component.SoundPerceivedByOthers) + SoundSystem.Play(Filter.Pvs(args.Target), sfx, args.Target); //play for everyone in range + else + SoundSystem.Play(Filter.Entities(args.User, args.Target), sfx, args.Target); //play only for the initiating entity and its target. + } component.LastInteractTime = curTime; args.Handled = true; diff --git a/Resources/Audio/Animals/cat_hiss.ogg b/Resources/Audio/Animals/cat_hiss.ogg new file mode 100644 index 0000000000..0572e65203 Binary files /dev/null and b/Resources/Audio/Animals/cat_hiss.ogg differ diff --git a/Resources/Audio/Animals/ferret_happy.ogg b/Resources/Audio/Animals/ferret_happy.ogg new file mode 100644 index 0000000000..9021c1096b Binary files /dev/null and b/Resources/Audio/Animals/ferret_happy.ogg differ diff --git a/Resources/Audio/Animals/license.txt b/Resources/Audio/Animals/license.txt index 3196554abf..e1c05d4c72 100644 --- a/Resources/Audio/Animals/license.txt +++ b/Resources/Audio/Animals/license.txt @@ -2,8 +2,12 @@ The following sounds were used from freesound: cat_meow.ogg: modified from "Meow 4.wav" by freesound user "TRNGLE" (https://freesound.org/people/TRNGLE/sounds/368006/) licensed under CCBY 3.0. The original audio was trimmed, split to mono, and converted from WAV to OGG format. +cat_hiss.ogg: modified from "catHisses1.wav" by freesound user "Zabuhailo" (https://freesound.org/people/Zabuhailo/sounds/146963/) licensed under CC0 1.0 (public domain). The original audio was trimmed and converted from WAV to OGG format. + small_dog_bark_happy.ogg: modified from "Dog bark2.wav" by freesound user "MisterTood" (https://freesound.org/people/MisterTood/sounds/9032/) licensed under CC0 1.0 (public domain). The original audio was trimmed and converted from WAV to OGG format. duck_quack_happy.ogg: modified from "Duck Quack - Sound Effect (HD).mp3" by freesound user "Tabby+Gus." (https://freesound.org/people/Tabby+Gus./sounds/515408/) licensed under CC0 1.0 (public domain). The original audio was trimmed, looped, split to mono, and converted from MP3 to OGG format. chicken_cluck_happy.ogg: modified from "Chicken Single Alarm Call" by freesound user "Rudmer_Rotteveel" (https://freesound.org/people/Rudmer_Rotteveel/sounds/316920/) licensed under CC0 1.0 (public domain). The original audio was trimmed and converted from WAV to OGG format. + +ferret_happy.ogg: modified from "Ferret" by freesound user "J.Zazvurek" (https://freesound.org/people/J.Zazvurek/sounds/155115/) licensed under CC BY 3.0. The original audio was trimmed and converted from WAV to OGG format. diff --git a/Resources/Locale/en-US/interaction/interaction-popup-component.ftl b/Resources/Locale/en-US/interaction/interaction-popup-component.ftl index fc278c1578..221118db56 100644 --- a/Resources/Locale/en-US/interaction/interaction-popup-component.ftl +++ b/Resources/Locale/en-US/interaction/interaction-popup-component.ftl @@ -13,6 +13,7 @@ petting-success-dog = You pet {THE($target)} on {POSS-ADJ($target)} soft floofy petting-success-frog = You pet {THE($target)} on {POSS-ADJ($target)} slippery little head. petting-success-goat = You pet {THE($target)} on {POSS-ADJ($target)} horned floofy head. petting-success-goose = Against all odds, you manage to pet {THE($target)} on {POSS-ADJ($target)} horrible little head. +petting-success-possum = You pet {THE($target)} on {POSS-ADJ($target)} horrible little head. petting-success-reptile = You pet {THE($target)} on {POSS-ADJ($target)} scaly little head. petting-success-sloth = You pet {THE($target)} on {POSS-ADJ($target)} slow moving head. petting-success-space-cat = You pet {THE($target)} on {POSS-ADJ($target)} glass domed head. @@ -26,6 +27,7 @@ petting-failure-corrupted-corgi = You reach out to pet {THE($target)}, but think petting-failure-crab = You reach out to pet {THE($target)}, but {SUBJECT($target)} snaps {POSS-ADJ($target)} claws in your general direction! petting-failure-goat = You reach out to pet {THE($target)}, but {SUBJECT($target)} stubbornly refuses! petting-failure-goose = You reach out to pet {THE($target)}, but {SUBJECT($target)} {CONJUGATE-BE($target)} too horrible! +petting-failure-possum = You reach out to pet {THE($target)}, but are met with hisses and snarls! petting-failure-sloth = You reach out to pet {THE($target)}, but {SUBJECT($target)} somehow dodge with ludicrous speed! ## Knocking on windows diff --git a/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml b/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml index 16a6b09661..0cbd61626d 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/mobs.yml @@ -45,6 +45,32 @@ - MobCorgi - MobCorgiOld +- type: entity + name: Possum Morty Spawner + id: SpawnMobPossumMorty + parent: MarkerBase + components: + - type: Sprite + layers: + - state: green + - state: ai + - type: ConditionalSpawner + prototypes: + - MobPossumMorty + +- type: entity + name: Raccoon Morticia Spawner + id: SpawnMobRaccoonMorticia + parent: MarkerBase + components: + - type: Sprite + layers: + - state: green + - state: ai + - type: ConditionalSpawner + prototypes: + - MobRaccoonMorticia + ## Player-controlled - type: entity diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 8633bf2996..8fabc0c9b7 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -937,3 +937,119 @@ successChance: 0.5 interactSuccessString: petting-success-tarantula interactFailureString: petting-failure-generic + +- type: entity + name: possum + parent: SimpleMobBase + id: MobPossum + description: '"O Possum! My Possum!" -- Walt Whitman, 1865' + components: + - type: Sprite + drawdepth: Mobs + sprite: Mobs/Animals/possum.rsi + scale: 0.7, 0.7 # Possums are pretty huge on Goonstation, let's scale them down a little. + layers: + - map: ["enum.DamageStateVisualLayers.Base"] + state: possum + - type: Physics + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeCircle + radius: 0.35 + mass: 10 + mask: + - Impassable + - MobImpassable + - VaultImpassable + - SmallImpassable + layer: + - Opaque + - type: Appearance + visuals: + - type: DamageStateVisualizer + normal: possum + crit: possum_dead # TODO: Make it so possums can "play dead." Probably need AI changes + dead: possum_dead + - type: Butcherable + spawned: FoodMeat + pieces: 3 + - type: InteractionPopup + successChance: 0.2 # Low when undomesticated. + interactSuccessString: petting-success-possum # Possums don't really make much noise when they're happy. They make clicking noises as a mating call, but that is NOT the same thing! + interactFailureString: petting-failure-possum + interactFailureSound: + path: /Audio/Animals/cat_hiss.ogg # This sound effect is intended for generic hissing. For easy reference it's named after the animal it came from IRL. + - type: Grammar + attributes: + gender: epicene + +- type: entity + name: Morty + parent: MobPossum + id: MobPossumMorty + description: The station's resident Didelphis virginiana. A sensitive but resilient kind of guy. + components: + - type: InteractionPopup + successChance: 1.0 # Hey, c'mon, this is Morty we're talking about here. + - type: Grammar + attributes: + proper: true + gender: male + +- type: entity + name: raccoon + parent: SimpleMobBase + id: MobRaccoon + description: Trash panda! + components: + - type: Sprite + drawdepth: Mobs + sprite: Mobs/Animals/raccoon.rsi + scale: 0.7, 0.7 + layers: + - map: ["enum.DamageStateVisualLayers.Base"] + state: raccoon + - type: Physics + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeCircle + radius: 0.35 + mass: 10 + mask: + - Impassable + - MobImpassable + - VaultImpassable + - SmallImpassable + layer: + - Opaque + - type: Appearance + visuals: + - type: DamageStateVisualizer + normal: raccoon + crit: raccoon_dead + dead: raccoon_dead + - type: Butcherable + spawned: FoodMeat + pieces: 3 + - type: InteractionPopup + successChance: 0.2 # Low when undomesticated. + interactSuccessString: petting-success-soft-floofy + interactFailureString: petting-failure-generic + - type: Grammar + attributes: + gender: epicene + +- type: entity + name: Morticia + parent: MobRaccoon + id: MobRaccoonMorticia + description: A powerful creature of the night. Her eyeshadow is always on point. + components: + - type: InteractionPopup + successChance: 0.7 + - type: Grammar + attributes: + proper: true + gender: female diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml index 8fbaf4589b..95e8fe09ab 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml @@ -339,3 +339,50 @@ - type: Grammar attributes: gender: epicene + +- type: entity + name: ferret + parent: SimpleMobBase + id: MobFerret + description: Just a silly little guy! + components: + - type: Sprite + drawdepth: Mobs + sprite: Mobs/Pets/ferret.rsi + scale: 0.7, 0.7 + layers: + - map: ["enum.DamageStateVisualLayers.Base"] + state: ferret + - type: Physics + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeCircle + radius: 0.35 + mass: 10 + mask: + - Impassable + - MobImpassable + - VaultImpassable + - SmallImpassable + layer: + - Opaque + - type: Appearance + visuals: + - type: DamageStateVisualizer + normal: ferret + crit: ferret_dead + dead: ferret_dead + - type: Butcherable + spawned: FoodMeat + pieces: 3 + - type: InteractionPopup + successChance: 0.8 + interactDelay: 1.5 # Avoids overlapping SFX due to spam - these SFX are a little longer than the typical 1 second. + interactSuccessString: petting-success-soft-floofy + interactFailureString: petting-failure-generic + interactSuccessSound: + path: /Audio/Animals/ferret_happy.ogg + - type: Grammar + attributes: + gender: epicene diff --git a/Resources/Textures/Mobs/Animals/possum.rsi/meta.json b/Resources/Textures/Mobs/Animals/possum.rsi/meta.json new file mode 100644 index 0000000000..fd9ad6a836 --- /dev/null +++ b/Resources/Textures/Mobs/Animals/possum.rsi/meta.json @@ -0,0 +1,23 @@ +{ + "version": 1, + "size": + { + "x": 32, + "y": 32 + }, + "license": "CC-BY-NC-SA-3.0", + "copyright": "https://github.com/goonstation/goonstation/commit/c98666f47a90d106c7a154cedffc747b3769e933", + "states": + [ + { + "name": "possum", + "directions": 4, + "delays": [[1],[1],[1],[1]] + }, + { + "name": "possum_dead", + "directions": 1, + "delays": [[1]] + } + ] +} diff --git a/Resources/Textures/Mobs/Animals/possum.rsi/possum.png b/Resources/Textures/Mobs/Animals/possum.rsi/possum.png new file mode 100644 index 0000000000..ba77f0525d Binary files /dev/null and b/Resources/Textures/Mobs/Animals/possum.rsi/possum.png differ diff --git a/Resources/Textures/Mobs/Animals/possum.rsi/possum_dead.png b/Resources/Textures/Mobs/Animals/possum.rsi/possum_dead.png new file mode 100644 index 0000000000..33d79f10b6 Binary files /dev/null and b/Resources/Textures/Mobs/Animals/possum.rsi/possum_dead.png differ diff --git a/Resources/Textures/Mobs/Animals/raccoon.rsi/meta.json b/Resources/Textures/Mobs/Animals/raccoon.rsi/meta.json new file mode 100644 index 0000000000..79b79df2f6 --- /dev/null +++ b/Resources/Textures/Mobs/Animals/raccoon.rsi/meta.json @@ -0,0 +1,24 @@ +{ + "version": 1, + "size": + { + "x": 32, + "y": 32 + }, + "license": "CC-BY-NC-SA-3.0", + "copyright": "https://github.com/goonstation/goonstation/commit/c98666f47a90d106c7a154cedffc747b3769e933", + "states": + [ + { + "name": "raccoon", + "directions": 4, + "delays": [[1],[1],[1],[1]] + }, + + { + "name": "raccoon_dead", + "directions": 1, + "delays": [[1]] + } + ] +} diff --git a/Resources/Textures/Mobs/Animals/raccoon.rsi/raccoon.png b/Resources/Textures/Mobs/Animals/raccoon.rsi/raccoon.png new file mode 100644 index 0000000000..2ee009185d Binary files /dev/null and b/Resources/Textures/Mobs/Animals/raccoon.rsi/raccoon.png differ diff --git a/Resources/Textures/Mobs/Animals/raccoon.rsi/raccoon_dead.png b/Resources/Textures/Mobs/Animals/raccoon.rsi/raccoon_dead.png new file mode 100644 index 0000000000..b91bb50eb7 Binary files /dev/null and b/Resources/Textures/Mobs/Animals/raccoon.rsi/raccoon_dead.png differ diff --git a/Resources/Textures/Mobs/Pets/ferret.rsi/ferret.png b/Resources/Textures/Mobs/Pets/ferret.rsi/ferret.png new file mode 100644 index 0000000000..4bc126fb41 Binary files /dev/null and b/Resources/Textures/Mobs/Pets/ferret.rsi/ferret.png differ diff --git a/Resources/Textures/Mobs/Pets/ferret.rsi/ferret_dead.png b/Resources/Textures/Mobs/Pets/ferret.rsi/ferret_dead.png new file mode 100644 index 0000000000..3dddeba127 Binary files /dev/null and b/Resources/Textures/Mobs/Pets/ferret.rsi/ferret_dead.png differ diff --git a/Resources/Textures/Mobs/Pets/ferret.rsi/meta.json b/Resources/Textures/Mobs/Pets/ferret.rsi/meta.json new file mode 100644 index 0000000000..7a2b8c2166 --- /dev/null +++ b/Resources/Textures/Mobs/Pets/ferret.rsi/meta.json @@ -0,0 +1,24 @@ +{ + "version": 1, + "size": + { + "x": 32, + "y": 32 + }, + "license": "CC-BY-NC-SA-3.0", + "copyright": "https://github.com/goonstation/goonstation/commit/c98666f47a90d106c7a154cedffc747b3769e933", + "states": + [ + { + "name": "ferret", + "directions": 4, + "delays": [[1],[1],[1],[1]] + }, + + { + "name": "ferret_dead", + "directions": 1, + "delays": [[1]] + } + ] +}