Commit Graph

36 Commits

Author SHA1 Message Date
ChungusGamer666
4f2227baf3 Implements a macro for checking mind traits (#76548)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/82850673/f85d0556-1806-40bf-92b8-597e46ccb4af)
Seeing this pattern repeated over various sections of code was starting
to piss me off

## Why It's Good For The Game

Lessens chance to cause errors with mind traits, ensures consistent
behavior, makes it easier to change how mind traits work if necessary.

## Changelog

hopefully not player facing

---------

Co-authored-by: san7890 <the@san7890.com>
2023-07-06 11:45:46 -06:00
necromanceranne
2600f23ebb Coroner Update: Pickle-Eating Morbid Weirdo Obsessed with Death and Perfectionism (#76318)
This PR introduces a whole bunch of Coroner and Morbid related content.

Firstly, Morbid is now a mind trait, and specifically, coroners start
with it.

Coroners also have a liver trait that allows them to heal toxins (very
slowly) from eating pickles and drinking pickle juice. They also
can...drink formaldehyde. I guess. Dissections is thirsty work.

Coroners gain a whole set of special tools specifically for use in any
surgeries marked as interests of the Morbid. This is determined by the
``surgery_flag`` called ``SURGERY_MORBID_CURIOSITY``. Currently, these
surgeries are included;

dissections, autospies, revival surgery, plastic surgery, organ/feature
manipulations, amputations

To fit the theme, TRAIT_MORBID also applies the reduction to eye
snatchers.

While using their special tools, and the surgery is a morbid curiosity,
the coroner/anyone who is morbid gains a 30% speed boost! This stacks
with the dissection speed boost. Otherwise, the tools are just regular
tools with a special name (though the scalpel is better at killing
undead, because, you know, you're watching over the dead).

The coroner's special medkit, which is the only one you can get in a
round, can fit their autopsy scanners and tools. Anything that comes
standard with their kit can go back into it.

Anyone who is morbid can safely retrieve the secrets of the elephant
graveyard. The serrated shovel, notably, is a much better tool and
notably better at killing organics, but not inorganics (like the dead).

(Gives roboticists secure morgue access during skeleton crew pop totals)
2023-06-30 12:55:14 +00: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
Jeremiah
9c6fdb567d TGUI list conversions + bug fixes (#63354)
About The Pull Request

    Converts more inputs to TGUI. Possibly all user-facing input lists in the game.
    Did any surrounding text/number inputs as well
    Added null choice support so users can press cancel.
    Added some misc TGUI input fixes
    Fixed custom vendors while I was there

I refactored a lot of code while just poking around.
Primarily, usage of .len in files where I was already working on lists.
Some code was just awful - look at guardian.dm and its non use of early returns
If there are any disputes, I can revert it just fine, those changes are not integral to the PR.
Why It's Good For The Game

Fixes #63629
Fixes #63307
Fixes custom vendors /again/
Text input is more performant.
Part of a long series of TGUI conversion to make the game more visually appealing
Changelog

cl
refactor: The majority of user facing input lists have been converted to TGUI.
refactor: Tgui text inputs now scale with entered input.
fix: Many inputs now properly accept cancelling out of the menu.
fix: Fixes an edge case where users could not press enter on number inputs.
fix: Custom vendor bluescreen.
fix: You can now press ENTER on text inputs without an entry to cancel.
/cl
2021-12-31 11:07:28 +13: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
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
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03: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
XDTM
3f28227f6c Makes surgery more stealthy (#44483)
About The Pull Request

Part of #44440

Surgery now gives detailed description to the surgeon and anyone within one tile of distance, and more vague or ambiguous descriptions to the patient and anyone further away. This can lead to a surgeon being able to perform a brainwashing in place of a brain surgery with nobody being the wiser, or implanting a different organ than the one agreed on, and so on.
Changelog

cl
add: Surgery steps are now shown in detail only to the surgeon and anyone standing adjacent to them; the patient and people watching from further away get a more vague/ambiguous description.
/cl
2019-06-18 11:44:58 +12:00
skoglol
8f0685df94 Fix some minor surgery text inconsistensies (#44198)
Currently we have all the basic surgeries listed without capital
letter, and all the researched ones with. This bring them all in line.
Also changed the name of a step in revival surgery to make it more
intuitive.
2019-06-01 15:16:12 -07:00
vuonojenmustaturska
fb45b7a017 Turns trait accessors into defines, fixes some bugs (#43820)
It's free performance.
2019-05-06 19:44:05 -04:00
Ian Turk
fbe5f4a062 Replaced body zone magic strings with defines 2018-03-19 15:44:51 -05:00
Xhuis
eb11c0a22c Plastic surgery name choices 2018-02-17 19:41:25 -05:00
ACCount
6de835a629 Adds tool_behaviour support to crafting, door wires, surgeries and mech construction (#35384)
* Adds tool_behaviour support to construction datums (mech construction)

* Adds tool_behaviour support to wire datums

* Adds tool_behavior support to surgeries

* Adds tool_behavior support to crafting

* New proc, to be used for checking tool qualities in hands

* Improves tool quality support on wires
2018-02-12 20:52:11 +01:00
XDTM
5a08a3aad0 Extends the disability refactor to include more traits, removing some snowflake code (#34664)
This way you can add/remove traits without fear of other sources overriding them. Now you can add TRAIT_STUNIMMUNE to somebody without what if hulk

Notable changes:

    Fakedeath now updates instantly, instead of waiting for the next life tick.
    Fakedeath now sets time of death when acquired.
    Removed extremely snowflake code in reagents that checked if you had morphine to remove slow immunity and so on.
    Hulk no longer overrides status_flag changes, in case there are any.
2018-01-25 09:12:44 +13:00
Jordan Brown
af4d9a85c9 Repaths /obj/item/weapon to /obj/item (#29929) 2017-08-16 10:38:51 -03:00
Christopher
950564b5c8 Fixes plastic surgery grammar issue. (#23713)
Fixes Plastic Surgery Grammar Issue

Changes plastic surgery appearance changing from saying "Zion Murphy are now Murphy Zion" to something that makes more sense within the English language "Zion Murphy is now Murphy Zion"
Changelog

🆑 Tofa01
Fix: Fixes grammar issue when changing someones appearance via plastic surgery.
/🆑
Fixes #23704
2017-02-06 18:30:48 +13:00
Joan Lung
ce40d29ead Makes the pronoun helper proc names less horrifyingly long (#20780)
* why were these so LONG, what the fuck

* gosh

* pronoun agenda
the true agenda is killing coiax's squished lines
2016-10-10 12:28:25 +13:00
Rui Neves Carvalho
80e7024f6c Fixes Sec Hud wanted status not being updated when changing identity. Original PR by Astralenigma, New one by phil235. 2015-10-19 21:22:05 +02:00
c0
04f7b3f2de Surgery, Implants and Organs rework: Phase 1 2015-07-31 22:18:31 +03:00
Ikarrus
5e50b2b982 Update and Changelog
Lizard names are now "name1-name2"
2015-07-05 22:20:00 -06:00
Ikarrus
b0cfaf401f Random Names for Lizards
Lizards now have their own list of names to pull from when randomizing their names.
2015-07-05 18:35:56 -06:00
phil235
752032628f Remove kitchen/utensil/spoon. Changes /kitchen/utensil stuff to simply be /kitchen.
Butchering spiders now is done in one step, not leg after leg. Changed simple_animal/harvest proc.
Kitchen knives are now weapon/kitchen/knife.
Fixes eating omelette with fork.
Changed some code to use is_sharp() instead of multiple type checks (spacevines and leather code).
Removes utensil/knife (we already have kitchen/knife).
2015-04-27 23:54:28 +02:00
kingofkosmos
de280c72b5 Removed some more spans from visible messages. 2015-04-24 21:06:59 +03:00
Ikarrus
f9d4926ad7 Facial Reconstruction Surgery
Plastic Surgery will restore the face if it is disfigured by acid.
2013-05-08 08:52:38 -06:00
petethegoat@gmail.com
efe09a57c8 Adds cavity implant surgery. Turn people into walking bombs, etc.
Adds two new variables to surgery steps- accept_hand, and accept_any_item. They are compatible and you can use both at once.
Removes the always_advance variable on surgery steps, in favour of the success() and failure() procs returning 1 or 0 to advance or not.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5765 316c924e-a436-60f5-8080-3fe189b3f50e
2013-02-22 18:10:28 +00:00
petethegoat@gmail.com
9f56f974fe Committing most of Incoming's proposed commit: http://forums.nanotrasen.com/viewtopic.php?f=16&t=12229
Adds lipoplasty, plastic surgery and gender reassignment surgery.

Adds a var/target_must_be_fat to the surgery datum, for surgeries exclusive to fatties.
Adds a var/always_advance to the surgery step datum, for when it should advance to the next step even on failure.

Adds /proc/get_location_accessible(), which is used by surgery to make sure you have access to the area you're operating on.
It's a fairly horrible, but it's not called that often, so it should be fine. Correct me if I'm wrong.

Updated the changelog.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5727 316c924e-a436-60f5-8080-3fe189b3f50e
2013-02-18 02:12:18 +00:00