Commit Graph

21 Commits

Author SHA1 Message Date
Zephyr
ecbcef778d Refactors Regenerate Organs, and a few organ helpers (#74219)
## About The Pull Request

Refactors regenerate organs to be slightly more intelligent in handling
organ changes and replacements.
Noteably:
- We don't remove organs that were modified by the owner; such as
changing out your heart for a cybernetic
- We early break out of the for loop if they aren't supposed to have an
organ there and remove it
- We check for the organ already being correct, and just healing it and
continuing if it is

Also changes the names of some of the organ helpers into snake_case
### Mapping March
Ckey to receive rewards: N/A

## Why It's Good For The Game
## Changelog

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-03-26 17:54:36 +01:00
Jack Edge
26c601147d Update surgery pain messages: grammar, spelling (#74113)
A number of "OH NO WHY IS THIS HAPPENING" surgery pain messages have
been tweaked for grammar and spelling. (For example, you no longer have
statements like "you can no longer feel your the liver anymore".)
2023-03-20 12:35:26 -06:00
John Willard
3b0794eca9 Surgery code improvements (#71182)
## About The Pull Request

* Changes a lot of things about surgeries to hopefully bring it up to
more modern code standards.
* Removes a ton of single-letter vars used in checking surgeries on
people.
* Makes use of continue/break in for() loops.
* Properly documents the vars on surgeries
* Turns 'ignore clothes', 'self operating', 'lying required', 'require
limb' and 'require real limb' from vars into surgery flags
* Removes a lot re-defines of target_mobtype being set to human, as
that's the base anyways.
* Also tries to organize the vars on each surgery a bit.
* Makes the surgery initiator hopefully a little bit more sane
* Removes the surgery's can_cancel and stomach pump's
accumulated_experience vars, as they were entirely unused.

## Why It's Good For The Game

I looked at surgery code and couldn't stand it, this is hopefully
helping bring it to something we can stand.
This however doesn't touch the individual surgery steps.

## Changelog

im exhausted i don't know if this has in-game effects
2022-11-20 23:22:46 -08:00
lizardqueenlexi
588779256e Surgery computers tell which tool to use. (#70973)
## About The Pull Request


![image](https://user-images.githubusercontent.com/105025397/199194075-d1a3b42a-5c2e-4a02-84d1-84b4be2b601b.png)

All surgery step names, displayed in the surgical computer, will now
show which tool to use for that step in parentheses. In cases where
multiple tools have a 100% success chance, all are listed; if no tool
has a 100% chance then the "correct" one is shown.

Surgery computers will never display "alternate" tools for surgeries
(those with a lower success chance), but this shouldn't be a problem.
Surgical computers are _usually_ in places with surgical tools at hand,
and NanoTrasen wouldn't want to encourage doing brain surgery with a
screwdriver. Y'know, probably.
## Why It's Good For The Game

Firstly, this change is particularly helpful to new players. If you have
little experience with surgery, it's not always clear which tool you're
meant to use for which step. This is especially true for some of the
odder surgeries - if you didn't already know, it's not clear at all that
"brainwash" means "use a hemostat". While there are certainly guides on
the wiki, it's nice to have as much information provided in-game as
possible.

Secondly, this change brings consistency. A _small_ number of surgical
steps (healing broken bones, namely) already do this! I see no reason
why this shouldn't be extended to the remaining surgical steps,
especially because it's not particularly obtrusive to the surgery
computer interface.
## Changelog
🆑
qol: Made surgical computers tell you what tool to use for the current
surgical step.
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-04 01:00:12 -07:00
Kapu1178
6d470992cb This tail refactor turned into an organ refactor. Funny how that works. (#67017)
* Fuck you (refactors ur tails)

* Errors

* Wow. Pain.

* Fixes up probably everything

* finish up here

* Fixes hard del maybe

* original owner hard del

* garbage collection runtime

* suck my peen byond

* Mapped tails

* motherfucker.

* motherrfucker. again.

* Whooopppppsie

* yeah bad idea

* Turns out external organs literally just sat in nullspace forever if their parent was deleted, and didnt Remove() themselves, causing harddels.

* So anyways I repathed all organs

* Fixes

* really.

* unit test... test

* unit test-test but it passes linters this time because im a moh-ron

* I've lost track of what im doing at this point

* Hopefully fixes hard del?

* meh

* Update code/datums/dna.dm

* things n stuff

* repath from master pull
2022-05-30 21:18:34 -07:00
nmajask
64d5de009c Revives "Adds sound effects to surgeries" (#65578)
* Adds surgical sounds

Rough implementation as I don't have too much time tonight.

* Fixed falure_sound

Fixed a typo

* Removed the lists

Removed the lists and added sounds to revival surgery, stuff will probably break

* Fixes the playsounds still using pick

* Added sounds to more surgeries

Added sounds to four more surgeries
2022-03-25 20:07:00 -04:00
Seth Scherer
3a8df56b9b You can no longer continue a surgery if the organ in question is somehow removed whilst mid operation (#63459) 2021-12-23 14:05:59 -06:00
itseasytosee
f51000f506 Repaths knives to not all be children of the kitchen knife. (#62035)
Basically makes the code less dumb, took a long time. I worked hard to make sure there were no unintended effects (minus the fact you can no longer get spoons from the experimentor). No player-facing effects

I thought it looked weird that all cultist and combat knives were subtypes of the kitchen knives
2021-10-15 15:28:01 -07:00
FlamingLily
c5a110308d Surgery pain messages and screaming in agony (#61252)
Adds (purely flavourful) unique pain messages to surgery steps, with a 30% chance for forced screaming in agonizing pain

Messages are things like "You feel a horrible stabbing in your chest" and w/ever.

Also see Skyrat-SS13/Skyrat-tg#5899
2021-09-15 13:30:49 +01:00
MrMelbert
b3e8eebdc9 Kills /obj/item/melee/transforming, replaces it with a transforming weapon component (#60761)
This PR kills off the transforming subtype of /obj/item/melee and replaces it with a component to handle the transforming behavior, /datum/component/transforming.

The transforming component handles updating the variables of an item when it's transformed. Things like force, sharpness, whetstone force bonus, and attack verbs. Similar to the two-handed component, but instead of transforming into a two-hander it remains a one handed weapon.

The "nemesis" behavior (dealing addition damage to certain factions) of the transforming subtype was moved to the cleaving saw only, since it was the only transforming item that used it. In the future, this can be made into a bespoke element/component as well.

The following weapons and items have been updated to use this component:

    Energy Swords / Sabers / Bananium Energy Sword
    Energy Circular Saw
    Energy Dagger
    Energy Axe
    Toy Energy Sword
    Holographic Energy Sword
    Switchblade
    Advanced Medical Tools (Laser scalpel, Mechanical Pinches, Searing Tool)
    Advanced Engineering Tools (Hand Drill, Jaws of Life / Syndicate Jaws of Life)
    Combat Wrench
    Cleaving Saw
    Telescopic Batons / Contractor Batons
    Roasting Stick
    Telescopic Riot Shield
    Energy Shield / Bananium Energy Shield

This PR also touches up the code around the various above items.
2021-08-23 11:45:54 -07:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
FlamingLily
3958db8d27 Cleans up surgery and organ code. (#59068)
About The Pull Request

Scrubs those filthy single letter variables out of surgery and organ code.
Replaces a few 0s and 1s with FALSE and TRUE where relevant
Normalises and cleans up surgery step lists and surgical implements lists.
Replaces a whole lotta for loops with for x as anything in y lops

This is my first PR (upstream anyway) so I encourage you to treat my code with as much confidence as I treat it, which is to say none, because there's a strong chance I've totally broken everything.

But it compiles!
Why It's Good For The Game

code improvement, follows contributing guidelines.
Changelog

🆑 FlamingLily
code: Cleanup of surgery and organ code
/🆑
2021-05-22 19:49:47 +12:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Jared-Fogle
418bd80a6b Remove healing skill (#52005)
* Remove healing skill

* Remove dissection from tech web
2020-07-07 10:10:12 -04:00
moo
bb3d562d01 Cobbduceus: Surgery Skill XP/Step Buffs (#49196)
* 💉

* 🐣

* excels help

* waaa_fb

* fixed lobotomy skill

* waaa_fb2
2020-02-14 19:17:27 +01:00
moo
4022d0c427 Bumps up Surgery XP gains, Fixes Surgery XP Gains, Fixes Surgery Failure Bug (#48231)
* works on my machine

* saving is a sin 1% of the time!

* works... on... my... machine...?

* i can't test this but it worked on my machine too

Co-Authored-By: Bobbahbrown <bobbahbrown@gmail.com>

* more testing /w TW

* caps XP gain (per iteration) for TW

* no skinnies

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
2020-01-02 23:48:15 +01:00
moo
964b3d65d5 Cobbduceus: Healing lvl? (Medical Skill) (#47538)
* b

* helps to commit huh

* math is hard

* parenthesis are even harder

* Update code/datums/skills/_skill.dm

Co-Authored-By: Bobbahbrown <bobbahbrown@gmail.com>

* removes efficiency... or efficacy 😏

* baby sha... i mean files
2019-11-21 04:49:24 +00:00
Fikou
e450be44dc surgery tool refactor (#46856)
* awooooooooooooooooo

* a

* aw shet

* woops!!

* a

* wow heck you
2019-10-09 12:25:42 -04:00
kingofkosmos
df1fecc58c Adds notice-span to visible_messages with no spans (#46044)
About The Pull Request

Adds 'notice' span class to all visible_messages which had no span class, making all those black messages blue.
Why It's Good For The Game

This should help differentiate action-messages from talking-messages in the chat. More actions will be blue, thus black talking-messages should pop out more.
2019-08-26 20:50:00 +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