Datumized Emotes (#17544)

* Add raw tg emote datums

* Some more initial implementation

* First (big) commit

* More reworks, most emotes seem to work but cooldowns are weird

* Add the remaining emote species

* Add simple mobs

* Update defines, add more comments

* Remove unnecessary intentional calls

* Fix some bugs, add more functionality
- Silicon mobs/bots can't use all the living emotes
- Sound volume can now be specified for emotes
- Added a define for emotes to not go thru runechat
- Reorganized some emotes
- Some human emotes that need breath will gasp
- IPCs can beep boop
- Restore power warn for robits
- Sneezing and coughing have sound effects

* Fixes emote species separation not working in *help

* Reorganize emotes based on what's available on paradise

* mouthful mode

* Update implants to use emote signals

* Update species whitelist to use a typecache

* Cleanups

* More small changes
- Remove old extraneous typecache
- Reconfigure drask emotes
- Make all mime emotes visible (since they're silent)

* Remove old emote functions

* Update emote sounds, volume

* Rework more emotes into EMOTE_VISIBLE

* *rumble*

* More slight testing and cleanup
- Drop audio emote cooldown from 10 to 5 seconds
- Change clapping behaivor slightly, putting it into run_emote
- Update some emote flags here and there
- Fix up johnny, though remind me why this one exists?

* Fix indentation, missing typecast

* fix some returns

* More review

* Rename emote files

* Add'l review

* Even more emote fixes!

- Move defines out into an emote define file
- Integrate audio and general emote cooldowns
- change some 1 and 2 into visible/audible
- Try to fix monkey screech

* Add ability for admins to mute users' emotes.

* Rename cooldowns, add general mob emote cooldown.

* Fix flip not always geting the right message

* Add some emote target handling, docs

* Fix admin rights, indentation

* Update emote.dm

set default mode to ANY

* General implant fixes

- The way implant triggers are handled is now improved, with separate checks for death and emotes instead of just checking deathgasp.
- Implants can choose to be triggered for the first death or for every death.
- Voice of God play dead now activates sad trombone

read: voice of god can now no longer lowtiergod nukies

* Bunch of other changes and bugfixes

- Adds number flag for behavior
- Reworks how muzzling/vocalizing emotes works
- Breaks out sound effects
- Drops cooldown to 1.5s

* Fix people being able to snore/nightmare while awake.

* Bump paralysis on living emotes

* First review pass

* Clean up implants (while we're here) and fix compile errors

* in living error

* More outstanding review fixes

* use more isx() checks

* Add pre-emote signal, try_run_emote()

* Prevent silicons from playing their deathgasp multiple times

* Add emote postfix behavior for adding parameters to non-message params.

Also adds a signal to intercept emote actions.

* Fix linter complaints

* Remove new player checks on GLOB.dead_mob_list

* Fix species emotes not being distinguished, remove weird legacy code

* monkey ball

* better docs == better code

* Fix audio cooldown, silicon emotes

* Fix ghost emotes (don't worry they're staying)

* Restore spin to 2 seconds

* oh johnny boy

* Make fainting last two seconds instead of .2 seconds

* Remove extra highfive message

* Tick friendly emotes

* Fix up friendly emotes, ghost emotes

* Add some emote message safeguards, prevent flip from showing twice

* Fix ghost vision message format

* Fix hands_use_check on non-carbon mobs

* Bring emotes in line with say re. oxyloss

* Add option for death implants to not trigger on gib

* Try adding some unit testing

* Include emote unit tests

* More attempts at unit testing

* More attempts at unit testing?

* forget it this is fine

* Housekeeping

* Little bit more

* Remove extra bolding from ghostsight emotes

* More sanity checks, fix snore

* Remove stack trace when unintentional emote fails

* Update code/modules/mob/living/silicon/silicon_emote.dm

oops

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* More implant cleanups

* Oh I missed this

* Silence wagging, more review fixes

* Oops 2

* ensure everything can swear

* High-five fixes and status effect stuff
- Adds new on_timeout() function that gets triggered when a status effect expires
- Fixes up passing arguments to status effects
- Ensures high-five explosions don't kill the wizards

* More review stuff
- Add a stat to text to make things easier
- Make it harder to delete emotes
- BIG DANGER
- pose can no longer be set while unconscious

* Remove extra high five logic, godmode changes

* forgor

* Fix gasp not working

* Update docs for good measure

* Some review and custom emote fixes

* Fixes death alarms being broken

* Better handle stat_allowed, more review comments.

* ..() conventions

* This is why unit tests are nice

* Remove drone snowflake emote stuff

* Linting

* No more flipping on the ground

* Snap doesn't require hands free

* Does it make complete sense? no, but it's Fun

* Apply suggestions from code review

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* Fix revenant messages, power warning

* epic webedit fail, laugh at this user

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
Luc
2022-06-14 15:06:24 -07:00
committed by GitHub
parent 9dc65f5cf0
commit 747d8111ca
82 changed files with 3035 additions and 2331 deletions
+1 -1
View File
@@ -106,7 +106,7 @@
if(blood_volume)
blood_volume = max(blood_volume - amt, 0)
if(prob(10 * amt)) // +5% chance per internal bleeding site that we'll cough up blood on a given tick.
custom_emote(1, "coughs up blood!")
custom_emote(EMOTE_VISIBLE, "coughs up blood!")
add_splatter_floor(loc, 1)
return 1
else if(amt >= 1 && prob(5 * amt)) // +2.5% chance per internal bleeding site that we'll cough up blood on a given tick. Must be bleeding internally in more than one place to have a chance at this.
+2 -2
View File
@@ -77,10 +77,10 @@
if(is_bruised())
if(prob(2) && !(NO_BLOOD in owner.dna.species.species_traits))
owner.custom_emote(1, "coughs up blood!")
owner.custom_emote(EMOTE_VISIBLE, "coughs up blood!")
owner.bleed(1)
if(prob(4))
owner.custom_emote(1, "gasps for air!")
owner.custom_emote(EMOTE_VISIBLE, "gasps for air!")
owner.AdjustLoseBreath(10 SECONDS)
/obj/item/organ/internal/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
@@ -181,7 +181,7 @@
I.receive_damage(brute * 0.5)
brute -= brute * 0.5
if(status & ORGAN_BROKEN && prob(40) && brute)
if(status & ORGAN_BROKEN && prob(40) && brute && !owner.stat)
owner.emote("scream") //getting hit on broken hand hurts
if(status & ORGAN_SPLINTED && prob((brute + burn)*4)) //taking damage to splinted limbs removes the splints
status &= ~ORGAN_SPLINTED
@@ -627,7 +627,7 @@ Note that amputating the affected organ does in fact remove the infection from t
)
to_chat(owner, "<span class='userdanger'>Something feels like it shattered in your [name]!</span>")
playsound(owner, "bonebreak", 150, 1)
if(!HAS_TRAIT(owner, TRAIT_NOPAIN))
if(!HAS_TRAIT(owner, TRAIT_NOPAIN) && !owner.stat)
owner.emote("scream")
status |= ORGAN_BROKEN
@@ -62,7 +62,7 @@
if(hand && owner.canUnEquip(hand))
owner.unEquip(hand)
to_chat(owner, "<span class='userdanger'>Your [name] malfunctions, dropping what it was holding!</span>")
owner.custom_emote(1, "drops what [owner.p_they()] [owner.p_were()] holding, [owner.p_their()] [name] malfunctioning!")
owner.custom_emote(EMOTE_VISIBLE, "drops what [owner.p_they()] [owner.p_were()] holding, [owner.p_their()] [name] malfunctioning!")
/obj/item/organ/external/arm/right
limb_name = "r_arm"
@@ -92,10 +92,10 @@
return
if(owner.AmountWeakened())
to_chat(owner, "<span class='userdanger'>Your [name] malfunctions, preventing you from getting back up!</span>")
owner.custom_emote(1, "is unable to get back up, [owner.p_their()] [name] malfunctioning!")
owner.custom_emote(EMOTE_VISIBLE, "is unable to get back up, [owner.p_their()] [name] malfunctioning!")
else
to_chat(owner, "<span class='userdanger'>Your [name] malfunctions, dropping you to the ground!</span>")
owner.custom_emote(1, "drops to the ground, [owner.p_their()] [name] malfunctioning!")
owner.custom_emote(EMOTE_VISIBLE, "drops to the ground, [owner.p_their()] [name] malfunctioning!")
switch(severity)
if(1)
owner.AdjustWeakened(8 SECONDS)
@@ -130,10 +130,10 @@
return
if(owner.AmountWeakened())
to_chat(owner, "<span class='userdanger'>Your [name] malfunctions, preventing you from getting back up!</span>")
owner.custom_emote(1, "is unable to get back up, [owner.p_their()] [name] malfunctioning!")
owner.custom_emote(EMOTE_VISIBLE, "is unable to get back up, [owner.p_their()] [name] malfunctioning!")
else
to_chat(owner, "<span class='userdanger'>Your [name] malfunctions, dropping you to the ground!</span>")
owner.custom_emote(1, "drops to the ground, [owner.p_their()] [name] malfunctioning!")
owner.custom_emote(EMOTE_VISIBLE, "drops to the ground, [owner.p_their()] [name] malfunctioning!")
switch(severity)
if(1)
owner.AdjustWeakened(8 SECONDS)
@@ -173,7 +173,7 @@
if(hand && owner.canUnEquip(hand))
owner.unEquip(hand)
to_chat(owner, "<span class='userdanger'>Your [name] malfunctions, dropping what it was holding!</span>")
owner.custom_emote(1, "drops what [owner.p_they()] [owner.p_were()] holding, [owner.p_their()] [name] malfunctioning!")
owner.custom_emote(EMOTE_VISIBLE, "drops what [owner.p_they()] [owner.p_were()] holding, [owner.p_their()] [name] malfunctioning!")
/obj/item/organ/external/hand/remove()
if(owner)