Skip to content

Commit

Permalink
Ports mothroaches + Moth emotes (shiptest-ss13#1843)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Can you guess what this PR does? If you answered that it ports [this
pull request](tgstation/tgstation#68763), [this
pull request](tgstation/tgstation#71784), and [a
partial part of this one
too](BeeStation/BeeStation-Hornet#7645), then
you're right!

![imagen](https://user-images.githubusercontent.com/75212565/227387000-cc205158-286b-4841-9c5a-2e4d6d8d6200.png)

![imagen](https://user-images.githubusercontent.com/75212565/227386830-213997a1-ebe9-4573-8f8e-052e72bacea2.png)


You can also craft moth plushies now. You just need some cloth,
mothroach hide, and a heart!

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

silly little moth roaches and emotes, who wouldn't want them in the
game?

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
add: Mothroaches are now a thing
add: Moth laughter, chittering and squeaking
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
meemofcourse authored Apr 9, 2023
1 parent ab19d4e commit 0410075
Show file tree
Hide file tree
Showing 14 changed files with 127 additions and 7 deletions.
7 changes: 7 additions & 0 deletions code/datums/components/crafting/recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1144,3 +1144,10 @@
reqs = list(/datum/reagent/consumable/ice = 25,
/obj/item/stack/sheet/metal = 2)
category = CAT_MISC
/datum/crafting_recipe/mothplush
name = "Moth Plushie"
result = /obj/item/toy/plush/moth
reqs = list(/obj/item/stack/sheet/animalhide/mothroach = 1,
/obj/item/organ/heart = 1,
/obj/item/stack/sheet/cotton/cloth = 3)
category = CAT_MISC
8 changes: 8 additions & 0 deletions code/game/objects/items/stacks/sheets/leather.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ GLOBAL_LIST_INIT(gondola_recipes, list ( \
new/datum/stack_recipe("gondola suit", /obj/item/clothing/under/costume/gondola, 2), \
))

/obj/item/stack/sheet/animalhide/mothroach
name = "mothroach hide"
desc = "A thin layer of mothroach hide."
singular_name = "mothroach hide piece"
icon_state = "sheet-mothroach"
item_state = "sheet-mothroach"
merge_type = /obj/item/stack/sheet/animalhide/mothroach

/obj/item/stack/sheet/animalhide/gondola
name = "gondola hide"
desc = "The extremely valuable product of gondola hunting."
Expand Down
5 changes: 5 additions & 0 deletions code/modules/food_and_drinks/food/snacks/meat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@
desc = "A slab of mouse meat. Best not eat it raw."
foodtype = RAW | MEAT | GROSS

/obj/item/reagent_containers/food/snacks/meat/slab/mothroach
name = "mothroach meat"
desc = "A light slab of meat."
foodtype = RAW | MEAT | GROSS

/obj/item/reagent_containers/food/snacks/meat/slab/corgi
name = "corgi meat"
desc = "Tastes like... well you know..."
Expand Down
42 changes: 35 additions & 7 deletions code/modules/mob/living/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@
message = "crosses their arms."
hands_use_check = TRUE

/datum/emote/living/carbon/mothchitter
key = "chitter"
key_third_person = "chitters"
message = "chitters."
emote_type = EMOTE_AUDIBLE
vary = TRUE

/datum/emote/living/carbon/mothchitter/get_sound(mob/living/user)
var/mob/living/carbon/human/H = user
if(ismoth(H) | (istype(H, /mob/living/simple_animal/pet/mothroach)))
return 'sound/voice/moth/mothchitter.ogg'

/datum/emote/living/chuckle
key = "chuckle"
key_third_person = "chuckles"
Expand Down Expand Up @@ -256,13 +268,17 @@
return !C.silent

/datum/emote/living/laugh/get_sound(mob/living/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.dna.species.id == "human" && (!H.mind || !H.mind.miming))
if(user.gender == FEMALE)
return 'sound/voice/human/womanlaugh.ogg'
else
return pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg')
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
var/human_laugh = ishumanbasic(H)
if(human_laugh && (!H.mind || !H.mind.miming))
if(user.gender == FEMALE)
return 'sound/voice/human/womanlaugh.ogg'
else
return pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg')
if(ismoth(H))
return 'sound/voice/moth/mothlaugh.ogg'

/datum/emote/living/look
key = "look"
Expand All @@ -276,6 +292,18 @@
message = "nods."
message_param = "nods at %t."

/datum/emote/living/carbon/mothsqueak
key = "msqueak"
key_third_person = "lets out a tiny squeak"
message = "lets out a tiny squeak!"
emote_type = EMOTE_AUDIBLE
vary = TRUE

/datum/emote/living/carbon/mothsqueak/get_sound(mob/living/user)
var/mob/living/carbon/human/H = user
if(ismoth(H) | (istype(H, /mob/living/simple_animal/pet/mothroach)))
return 'sound/voice/moth/mothsqueak.ogg'

/datum/emote/living/point
key = "point"
key_third_person = "points"
Expand Down
71 changes: 71 additions & 0 deletions code/modules/mob/living/simple_animal/friendly/mothroach.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/mob/living/simple_animal/pet/mothroach
name = "mothroach"
desc = "This is the adorable by-product of multiple attempts at genetically mixing mothpeople with cockroaches."
initial_language_holder = /datum/language_holder/moth
icon_state = "mothroach"
icon_living = "mothroach"
icon_dead = "mothroach_dead"
deathsound = 'sound/voice/moth/moth_a.ogg'
held_state = "mothroach"
head_icon = 'icons/mob/pets_held.dmi'
worn_slot_flags = ITEM_SLOT_HEAD
emote_hear = list("chitters", "flutters")
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/mothroach = 3, /obj/item/stack/sheet/animalhide/mothroach = 1)
mob_biotypes = MOB_ORGANIC|MOB_BUG
mob_size = MOB_SIZE_SMALL
ventcrawler = VENTCRAWLER_ALWAYS
health = 25
maxHealth = 25
speed = 1.25
gold_core_spawnable = FRIENDLY_SPAWN
verb_say = "flutters"
verb_ask = "flutters inquisitively"
verb_exclaim = "flutters loudly"
verb_yell = "flutters loudly"
response_disarm_continuous = "shoos"
response_disarm_simple = "shoo"
response_harm_continuous = "hits"
response_harm_simple = "hit"
response_help_continuous = "pats"
response_help_simple = "pat"

/mob/living/simple_animal/pet/mothroach/Initialize()
. = ..()
add_verb(src, /mob/living/proc/update_resting)
ADD_TRAIT(src, TRAIT_HOLDABLE, INNATE_TRAIT)

/mob/living/simple_animal/pet/mothroach/update_resting()
. = ..()
if(stat == DEAD)
return
if (resting)
icon_state = "[icon_living]_rest"
else
icon_state = "[icon_living]"
regenerate_icons()

/mob/living/simple_animal/pet/mothroach/attack_hand(mob/living/carbon/human/M)
. = ..()
if(stat == DEAD)
return
else
switch(M.a_intent)
if("help")
new /obj/effect/temp_visual/heart(loc)
manual_emote("chitters happily!")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, src, /datum/mood_event/pet_animal, src)
if("harm")
playsound(loc, 'sound/voice/moth/scream_moth.ogg', 50, TRUE)

/mob/living/simple_animal/pet/mothroach/attackby(obj/item/I, mob/user, params)
if(isclothing(I))
to_chat(user, "<span class='notice'>You feed [I] to [src].</span>")
visible_message("[src] chitters happily!")
qdel(I) // this sucks
else
return ..()

/mob/living/simple_animal/pet/mothroach/check_weakness(obj/item/weapon, mob/living/attacker)
if(istype(weapon, /obj/item/melee/flyswatter))
return 9 // flyswatters deal 10x damage to mothroaches
return 0
Binary file modified icons/mob/pets.dmi
Binary file not shown.
Binary file modified icons/mob/pets_held.dmi
Binary file not shown.
Binary file modified icons/mob/pets_held_lh.dmi
Binary file not shown.
Binary file modified icons/mob/pets_held_rh.dmi
Binary file not shown.
Binary file modified icons/obj/stack_objects.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,7 @@
#include "code\modules\mob\living\simple_animal\friendly\gator.dm"
#include "code\modules\mob\living\simple_animal\friendly\gondola.dm"
#include "code\modules\mob\living\simple_animal\friendly\lizard.dm"
#include "code\modules\mob\living\simple_animal\friendly\mothroach.dm"
#include "code\modules\mob\living\simple_animal\friendly\mouse.dm"
#include "code\modules\mob\living\simple_animal\friendly\penguin.dm"
#include "code\modules\mob\living\simple_animal\friendly\pet.dm"
Expand Down
Binary file added sound/voice/moth/mothchitter.ogg
Binary file not shown.
Binary file added sound/voice/moth/mothlaugh.ogg
Binary file not shown.
Binary file added sound/voice/moth/mothsqueak.ogg
Binary file not shown.

0 comments on commit 0410075

Please sign in to comment.