Commit Graph

147 Commits

Author SHA1 Message Date
nemvar 8918a88612 Makes organ decay a lot nicer. (#45845)
* Gets rid of double processing memes.

* fixes the organ box thing

* Makes everything just a tad more performant

* even more performant

* Gets rid of the double processing on SSobj for body eggs

* forgot the brackets

* Also removes double processing memes from the shadowling armblade

* Removes the istype check for MMIs.
2019-08-15 21:52:07 -07:00
nemvar 02251be5ac Turns Gibberish code into something that's not gibberish (#45753) 2019-08-09 11:32:32 +12:00
RandolfTheMeh 48fbc073e5 [TMC] Defib Rework, Organ Damage Effects (#45104)
* Brain damage works on organ damage procs, some defib reworks

* Heart and Lung damaging effects and failure, liver damage and failure moved to its organ again

* Cleans up reused global

* Organ damage procs on living and living/carbon

* Changes brain damage procs again

* SR heals all organs on revive, no decay for cybernetic implants, stomach damage and fail effects.

* Damage and failure effects for the appendix, ears, and some touchups on the stomach

* Committing changes so I don't lose them

* Organs now cease decaying in the proper containers

* Organ Fridges

* Reverts map changes

* Adds coronary bypass, lobectomy, trying to deal with organ_stat runtime

* Actually fixes merge conflict

* Smartfridge tweaks

* Think I figured out map merger

* Evidently not

* Still runtiming with glass shards even after I remove the map changes?

* Fixes runtime error with brain_item

* Runtime fix on living/carbon/life

* Cleaning up old PR code

* Brain damage fix, moves defines to actually be in _DEFINES, under DNA since that's where organ slots were

* Wrong math operation used

* Brains in MMIs no longer decay

* Removes redundant variable, and defibs no longer work on heart attacks caused by failing hearts

* Removes misleading comment

* init freezes organs in case organ crates are added, morgue corpses are frozen, removes adjustLiverLoss

* Removes random spaces, scanners check brain damage severity now

* Swaps numbers for defines, fixes brain surgery, rebalances coronary bypass bleed since that was insane last I tested it

* List change

* Runs off of an index instead of using cut

* Brains can be put into organ fridges

* Fixes minor type, hotfix for cloning problem

* Removes pointless check

* Demon hearts no longer decay

* Nightmare hearts no longer decay

* Removes istype() check on process, sets can_decompose instead

* Condenses organ damage report

* Removes organ failure messages

* Less organ damage spam, implements organ threshold messages instead

* Brain damage messages go to owner, not source

* Self-examine shows damaged organs

* Minor code cleanup, adds autodoc comments to the new procs

* Inverts standard organ vars to prevent random organs decaying, adds a few more autodoc comments.

* Merged the booleans into a set of flags

* Healthy living improves organ healing rates

* dunno why this didn't update

* my actions have consequences

* Sets ORGAN_SYNTHETIC for overlooked robotics organs

* Doubles heart decay time

* 3 minute heart decay

* Lobectomy/Coronary_Bypass heal more

* removes hivemind spells from the changes
2019-07-29 02:18:22 -07:00
senjx 40fca141ef Fixes #44963, adds force and flag checks for items attacking brains (#45428)
* Adds force and flag checks for items attacking brains

Adds a force check and a NOBLUDGEON flag check for items that attack brains to prevent accidental or ridiculous brain damage via straw.

* Update brain_item.dm

* Adds force and flag checks for items attacking brains

Adds force and flag checks for items attacking brains to prevent accidental or ridiculous brain damage via straw/pen/whatever
Fixes https://github.com/tgstation/tgstation/issues/44963
2019-07-27 20:00:52 -07:00
AnturK a41a7dfc6d Fixes MMI's hearing cult chat sometimes. (#45187)
* Fixes MMI's hearing deadchat somtimes.

* Alright, less safe but also less expensive safety net.
2019-07-15 19:59:57 -04:00
kingofkosmos c969f6d3eb Merge branch 'master' into addswarningspans 2019-06-27 15:12:54 +03:00
kingofkosmos fb9731492c * extra spaces removed from "span class = '" --> "span class='"
* warning-spans added to cases of "You need..."
2019-06-25 21:03:25 +03:00
Shapsy 87ce5869fc 🧠 2019-06-24 11:57:24 -04:00
vuonojenmustaturska 8ddc9677c7 examine-code refactor (#44636)
* 1/4 done? maybe?

* more

* stuff

* incremental stuff

* stuff

* stuff & things

* mostly done but not yet

* stuffing

* stuffing 2: electric boogaloo

* Git Commit and the Kingdom of the Crystal Skull

* make it actually compile

* found more stuff

* fixes

* fix AI laws appearing out of order

* fix windows

* should be the remaining stuff

* this time for real

* i guess it should compile too

* fix sechuds
2019-06-19 22:07:57 +02:00
AnturK 4be070827f Fixes simple animal emotes / Refactors emote list (#44458)
* Fixes simple animal emotes.

* Makes emotes support multiple datums per key properly.

* Apply suggestions from code review

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>
2019-06-13 09:33:48 -04:00
vuonojenmustaturska 2d74a86353 [READY] Cleans up saycode by removing random hook stubs and using a signal where relevant (#44320)
About The Pull Request

This PR removes speech message and span hooks from dna, mutations, pierrot throat disease, species, tongues, masks, hats, held items, brain traumas and a carbon proc overload handling tonguelessness.

Tonguelessness is now handled by tongue removal registering for the speech signal and the hook being deregistered by having a tongue put in.

Also cleans up some /atom/movable/proc/get_spans() overloads that called the empty parent or overloaded the parent to do the exact same thing as the parent proc did.

Also cleans up calls to radio.talk_into() where the caller would often, as a result of copypasta, provide the proc with fresh copies of the proc's default values for proc args, and makes say_quote() better by giving it a default spans value so that none of the callers have to provide the same default one.
Why It's Good For The Game
Changelog

cl Naksu
code: Cleaned up saycode
/cl

* start with this

* oh man this looks so good

* hats are dead

* /obj/item/proc/speechModification is dead

* brain traumas and get_held_item_speechspans() are dead

* these should be static

* unfortunately we still need this

* /mob/living/carbon/treat_message(message) is kill

* clean up get_spans()

* dunk get_spans, modifies_speech for brain traumas, some superfluous static stuff

* move stuff around

* return values
2019-06-06 18:35:06 +12:00
vuonojenmustaturska 6a106bc877 Remove reagent ids and use typepaths where applicable (#44166)
cl Naksu
code: reagent IDs have been removed in favor using reagent typepaths where applicable
fix: mechas, borg hyposprays etc no longer display internal reagent ids to the player
/cl
2019-05-31 21:57:26 +12:00
vuonojenmustaturska fb45b7a017 Turns trait accessors into defines, fixes some bugs (#43820)
It's free performance.
2019-05-06 19:44:05 -04:00
tralezab 576606d1c4 zombies can eat brains (#43705)
zombies can eat brains (claw zombies will need some help!)
2019-04-26 12:20:09 -04:00
Denton 24c71eb7a7 Reduces sound volume for some ghost notifications 2019-01-03 10:49:41 +01:00
coiax 9f3e9a6960 Trauma bug fixes, stalking phantom balance (#42020)
* Traumas are copied when a person is cloned

🆑 coiax
add: When a person is cloned, any mental traumas are cloned as well.
/🆑

If the cloner is going to recreate your delicate personality, it's going
to have to recreate anything wrong with your brain as well. After all,
where does one greytider's legitimate fear of security end, and another
one's irrational fear begin?

Essentially, traumas could be easily gotten rid of by cloning, or death
would rob a person of a rare positive trauma. Now you're stuck with them
until you get rid of them.

* Suggested changes

* Removes cloning traumas

* No more cloning traumas
2018-12-23 16:52:47 +11:00
coiax bac3123c1e Log trauma granting/curing via View Variables (#42024)
This is definitely an oversight.
2018-12-22 12:49:44 -08:00
XDTM c05b0eaef9 Turns TRAIT_NOCLONE into TRAIT_BADDNA for consistency (#41819)
cl XDTM
balance: DNA-damaging methods (changeling draining, mainly) no longer prevent alternative revival methods, but can no longer be circumvented by upgrading DNA scanners.
balance: Any source of husking now prevents cloning on unupgraded cloning scanners, instead of only husking caused by changelings.
balance: Husking now fully prevents revival from several non-cloning methods, including defibrillation, surgery, and strange reagent.
/cl

Why? Consistency! Also, the removal of prescanning/autocloning really simplifies this.

Changeling draining effectively prevents cloning until you transfer the brain to an intact body.
2018-12-17 13:05:02 +13:00
Jordie 8a66665e95 Ban system and interface update (#41176)
Spiritual successor and extension to #17798, an almost entire rebuild of the SQL ban system backend and interface.
Bantypes are removed per #8584 and #6174. All bans are now 'role bans', server bans are when a ban's role is server. Admin bans are a column, meaning it's possible to ban admins from jobs.
Bans now have only an expiry datetime, duration is calculated from this when queried.
unbanned column is removed as it's superfluous, checking unban status is now done through checking unban_datetime. unban_round_id column added. Each ip and computerid columns rearranged so ip is always first, like in other tables. Bans now permit a null ckey, ip and computerid.

Ban checking is split into two procs now is_banned_from() does a check if a ckey is banned from one or more roles and returns true or false. This effectively replaces jobban_isbanned() used in simple if() statements. If connected a client's ban cache is checked rather than querying the DB. This makes it possible for a client connected to two or more servers to ignore any bans made on one server until their ban cache is rebuilt on the others. Could be avoided with cross-server calls to update ban caches or just the removal of the ban cache but as is I've done neither since I think it's enough of an edge case to not be worth it.
The second proc is is_banned_from_with_details(), this queries the DB for a role ban on a player's ckey, ip or CID and returns the details. This replaces direct queries in IsBanned.dm and the preferences menu.

The legacy ban system is removed.

The interfaces for banning, unbanning and editing bans have been remade to require less clicking and easier simultaneous operations. The banning and jobban panel are combined. They also store player connection details when opened so a client disconnecting no longer stops a ban being placed.

New banning panel:
Key, IP and CID can all be toggled to allow excluding them from a ban.
Checking Use IP and CID from last connection lets you enter only a ckey and have the DB fill these fields in for you, if possible.
Temporary bans have a drop-menu which lets you select between seconds, minutes, hours, days, weeks, months and years so you don't need to calculate how many minutes a long ban would be. The ban is still converted into minutes on the DB however.
Checking any of the head roles will check both of the boxes for you.
The red role box indicates there is already a ban on that role for this ckey. You can apply additional role bans to stack them.

New unbanning panel:
Unbanning panel is now separate from the banning panel but otherwise functionally the same.

Ban editing panel:
Actually just a modified banning panel, all the features from it work the same here.
You can now edit almost all parameters of a ban instead of just the reason.
You can't edit severity as it's not really part of the ban.
The panels have been tested but I've not been able to get my local server to be accessible so ban functionality isn't properly confirmed. Plenty of testing will be required as I'd rather not break bans.



cl
admin: Ban interface rework. The banning and unbanning panels have received a new design which is easier to use and allows multiple role bans to be made at once.
prefix: Ban search and unbanning moved to unbanning panel, which is now a separate panel to the old banning panel.
/cl
2018-12-05 08:48:37 +13:00
swindly 4bcd3cdc55 fixes word crimes 2018-11-19 17:56:59 -05:00
81Denton ccfbc2bb78 Adds separate MMI/borg messages for damaged brains (#41306)
* Adds separate MMI/borg messages for damaged brains

* better switch toggle msg, M.brain?.damaged_brain

* ree

* thanks helen

* I hate Mondays

* Update code/modules/mob/living/brain/MMI.dm

Co-Authored-By: 81Denton <32391752+81Denton@users.noreply.github.com>

* condenses vars
2018-11-09 19:34:49 -05:00
ShizCalev 43768593c8 Fixes posibrains becoming unusable if the old mob suicided. (#41336) 2018-11-07 23:36:40 -05:00
Jordan Brown b5e68bd52a Merge pull request #41231 from ShizCalev/capsaicin-cleanup
Cleans up eye/mouth protection checks
2018-11-02 14:23:17 -04:00
zxaber 292928ee92 Adding organ bag exception (#41208) 2018-10-30 07:26:21 -04:00
ShizCalev ddeb5c5af2 Cleans up eye/mouth protection checks 2018-10-30 06:55:25 -04:00
swindly ecf53d942f fixed mmis in mechs (#41167) 2018-10-27 14:28:58 -04:00
ShizCalev 17d894fcba Adds examine messages to disembodied & robot heads (#40999)
cl ShizCalev
tweak: Added some examine messages to disembodied heads indicating if it's missing eyes, or if it's brain is nonfunctional.
tweak: Added some examine messages to cyborg parts to indicate their current construction status.
tweak: You can now remove the power cell and cut the wiring out of a cyborg chest during construction.
/cl

Small indicator to help alleviate some minor wastes of time (such as folks bringing suicider's heads to the roboticist instead of the chef.)

Added some missing destroy handling, fixed vars not being set and unset properly, cleaned up some duplicate code in human/examine handling for departed souls.
2018-10-27 13:10:55 +13:00
ShizCalev c4064c9dac Fixes syndicate MMI nameswaping, adds better user feedback when inserting a dead brain (#41023) 2018-10-20 11:35:32 -07:00
ShizCalev 9dbc86d7c5 Ghetto surgery can now damage brains, which then can be healed by mannitol 2018-10-16 18:52:55 -04:00
ShizCalev f7fcc4e929 Removes tactical suicide borging (#40754)
* Removes tactical suicide borging

* correction
2018-10-15 22:51:22 +03:00
kevinz000 3e7184c975 Combat/Stun (slip) overhaul staging, mobility flags, adds crawling (#39967)
Aiming to implement the framework oranges has detailed in https://tgstation13.org/phpBB/viewtopic.php?f=10&t=19102
Moves canmove to a bitflag in a new variable called mobility_flags, that will allow finer grain control of what someone can do codewise, for example, letting them move but not stand up, or stand up but not move.

Adds Immobilize()d status effect that freezes movement but does not prevent anything else.
Adds Paralyze()d which is oldstun "You can't do anything at all and knock down).
Stun() will now prevent any item/UI usage and movement (which is similar to before).
Knockdown() will now only knockdown without preventing item usage/movement.
People knocked down will be able to crawl at softcrit-speeds
Refactors some /mob variables and procs to /mob/living.
update_canmove() refactored to update_mobility() and will handle mobility_flags instead of the removed canmove

cl
rscadd: Crawling is now possible if you are down but not stunned. Obviously, you will be slower.
/cl
Refactors are done. I'd rather get this merged faster than try to fine tune stuff like slips. The most obvious gameplay effect this pr has will be crawling, and I believe I made tiny tweaks but I can't find it Anything I missed or weird behavior should be reported.
2018-10-11 11:22:21 +13:00
XDTM 3f32f8c110 [Ready]Logs when speech is forced by an external factor (#39964)
* Logs when speech is forced by an external factor

* makes say args uniform

* fix
2018-09-03 11:38:16 +02:00
XDTM 5cec0a094e Splits fakedeath and death coma, gives fakedeath to zombies and skeletons, adds ghoul powder (#39487)
* Splits fakedeath and death coma, gives fakedeath to zombies and skeletons, adds ghoul powder

* s
2018-08-03 13:16:57 -04:00
AnturK faca150c53 Makes damage precision explicit 2018-07-14 19:48:46 +02:00
vuonojenmustaturska 14148f823a Allow players to un-ignore previously ignored popups for ghostroles, and ignore notifications with no ignore button (#38990)
Added a new ghost verb that lets you change your ignore settings, allowing previously ignored popups to be un-ignored and notifications without an ignore button to be ignored
2018-07-09 15:24:10 -04:00
Jordan Brown cf7e8aa9ec Qdels queries, adds sleep safety checks, DBcore checks for leaks (#38363)
* Qdels all queries, adds sleep handling

* DB Core messages admins about undeleted queries

* Compile fixes. Adds missing set waitfor

* Remove world/New shennanigans. Add DBQuery/BlockingExecute()

* Less spammy notifications to admins about undeleted queries

* Increase dbcore fire time to 1 minute

* Upgrade undeleted query warning

* Better place of death

* Fix build

* Remove BlockingExecute, see BSQL PR for why

* Yep, missed that one.

* Psyche, that's the WRONG QUERY!!
2018-06-18 22:48:35 +03:00
vuonojenmustaturska 1eccbcca18 Adds an EMP protection component, allowing ANYTHING to be protected from EMP (#37671)
The component is initialized with any combination of three flags, EMP_PROTECT_SELF protects against effects that target the object itself, EMP_PROTECT_WIRES protects against wires being messed with similar to the NO_EMP_WIRES_1 flag which this PR removes, EMP_PROTECT_CONTENTS protects against things that are inside the object like organs, internal "non-virtual" power cells and the like

This enables (but doesn't introduce) new mechanics such as adding EMP shielding at runtime to any atom, or taking it away.
2018-05-22 11:38:02 +12:00
ShizCalev ba1030f803 Makes more messages pronoun sensitive (#37582)
* Makes more messages pronoun sensitive

* Some cleanup

* more pronouns

* rever
2018-05-03 18:45:55 -04:00
AnturK 37e942c775 Fixes brain tumor. Again. (#37378) 2018-04-24 17:58:19 +03:00
Fox McCloud 057aa31cda Kills off /obj/item/device (#37297)
* Kills off /obj/item/device

* whoops

* whoops

* Fix
2018-04-23 15:00:23 +02:00
AnturK 43d323afff Fixes adjusting brain damage. 2018-04-15 12:17:15 +02:00
YPOQ 1226afde9f Fixes mannitol not curing minor brain traumas (#36645)
* Fixes mannitol not curing brain traumas

* Makes has_trauma_type random, adds type arg to cure_trauma_type

* Adds get_traumas_type proc

* Default to /datum/brain_trauma
2018-04-03 12:41:17 +03:00
kevinz000 f300a5c155 Interaction/Attack Hand Refactor (#36405) 2018-03-23 11:20:54 +01:00
XDTM 220f0588ad Fixes some more trauma bugs (#36487)
* fixes some more trauma bugs

* Update brain_trauma.dm

* Update brain_item.dm
2018-03-20 21:31:08 -04:00
Ian Turk fbe5f4a062 Replaced body zone magic strings with defines 2018-03-19 15:44:51 -05:00
XDTM e34930714b Refactors some trauma code, fixes some trauma heals not working (#36093)
* Refactors some trauma code, fixes some trauma heals not working

* that too

* fix indent

* antur comments
2018-03-15 07:57:46 +01:00
XDTM f56d3c35bb Adds limitations to brain traumas (#35938)
* Adds limitations to brain damage

* no need for these anymore

* a bit harder to gain traumas if you have some already

* (
2018-02-25 18:59:55 +02:00
XDTM 9d41e9734d Extensive surgery additions (#35520)
* Extensive surgery additions

* ,

* bioware

* restrict

* implants

* oops my hand slipped

* "i only changed a few lines, surely it's gonna compile, let's just push it and be done with it" --me, once again

* zombie surgery

* Adds brainwashing antag datum

* Antur Reviews

* @Antur part 2

* wow
2018-02-19 14:29:06 +02:00
coiax 393198b0e6 MMIs can now whisper without talking on the radio (#35738)
* MMIs can now whisper without talking on the radio

Fixes #35638.

* Otherwise, call super
2018-02-17 21:12:28 -05:00
Dax Dupont 62054d0eae Makes the posibrain play a ping sound on success. 2018-02-05 19:53:18 +01:00