Commit Graph

51 Commits

Author SHA1 Message Date
SkyratBot
067188d366 [MIRROR] Micro-optimize qdel by only permitting one parameter [MDB IGNORE] (#25889)
* Micro-optimize qdel by only permitting one parameter (#80628)

Productionizes #80615.

The core optimization is this:

```patch
-	var/hint = to_delete.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up.
+	var/hint = to_delete.Destroy(force) // Let our friend know they're about to get fucked up.
```

We avoid a heap allocation in the form of copying the args over to a new
list. A/B testing shows this results in 33% better overtime, and in a
real round shaving off a full second of self time and 0.4 seconds of
overtime--both of these would be doubled in the event this is merged as
the new proc was only being run 50% of the time.

* Micro-optimize qdel by only permitting one parameter

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-12-29 14:41:12 +00:00
SkyratBot
22943b9449 [MIRROR] Refactors UnarmedAttack so we don't have like 4 Unarmed Attack signals, kills two more snowflake species procs [MDB IGNORE] (#24356)
* Refactors `UnarmedAttack` so we don't have like 4 Unarmed Attack signals, kills two more snowflake species procs

* Update chameleon.dm

* Update _species.dm

* Modular

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-10-16 12:37:49 -04:00
SkyratBot
0c9149bf35 [MIRROR] Refactor gib code to use bitflags and have documentation [MDB IGNORE] (#24143)
* Refactor gib code to use bitflags and have documentation

* Modular updates

* Modular updates

* Modular updates

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-10-09 15:00:17 -04:00
SkyratBot
a493ff2e24 [MIRROR] Fix butchered and gibbed mobs to transfer reagents and diseases to meat [MDB IGNORE] (#24091)
* Fix butchered and gibbed mobs to transfer reagents and diseases to meat (#78454)

## About The Pull Request
Fixes #78386
Fixes #60352

Butchering monkey meat or gibbing mobs will now properly transfer all
reagents and diseases to the byproducts.

## Why It's Good For The Game
More realism is nice.

## Changelog
🆑
fix: Fix butchered monkeys to transfer reagents and diseases to meat
/🆑

---------

Co-authored-by: Jacquerel <hnevard@ gmail.com>

* Fix butchered and gibbed mobs to transfer reagents and diseases to meat

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
2023-10-03 09:10:02 -04:00
SkyratBot
9f3be12c19 [MIRROR] [TEST-MERGE FIRST] Wound refactor number two: Full synthetic support [MDB IGNORE] (#23601)
* [TEST-MERGE FIRST] Wound refactor number two: Full synthetic support

* Wound refactor two compatability (#23618)

* Delam emergency procedure moth (#23483)

* safety moff

* delta/whitespace/examine

* icebox

* moff poster

* moff poster

* Update DelamProcedure.tsx

* Update scram.dm

* sound plays during warning

* remove nightshift, theres already a global proc

* scrubber hint

* missed that define

* Apply suggestions from code review

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>

* covered by ui_interact

* Update modular_skyrat/modules/delam_emergency_stop/code/scram.dm

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>

* Update modular_skyrat/modules/delam_emergency_stop/code/scram.dm

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Automatic changelog for PR #23483 [ci skip]

* Automatic changelog compile [ci skip]

* [non modular] disables TG "hold up" for the foreseeable future (#23607)

Update gun.dm

* Automatic changelog for PR #23607 [ci skip]

* [MIRROR] Desouls Hivelord [MDB IGNORE] (#23609)

* Desouls Hivelord (#78213)

## About The Pull Request

![dreammaker_RJz4brjobM](https://github.com/tgstation/tgstation/assets/7483112/e5e4a3e9-ea6b-47f9-887c-3339d24d3fa8)

Replaces the sprite of the hivelord with a new one, in my continuing
quest to annihilate the old asteroid mob sprites.
A (never completed) asteroid mob resprite was actually my first PR, this
one is my 200th.
I am also planning on fucking with basic mob versions of these mobs some
time but the sprites can be atomised out.

In addition to replacing the old-ass MSPaint sprites, this PR also adds
a short death animation effect to the hivelord brood (from hivelords or
legions) which looks nicer than them just vanishing instantly upon
death.

Look at this video for an example of the animation:
https://www.youtube.com/watch?v=cKaskN5-y2A

## Why It's Good For The Game

Looks nicer.

## Changelog

🆑
image: Hivelords have a new sprite.
image: Hivelord and Legion brood have a death animation.
/🆑

* Desouls Hivelord

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>

* Automatic changelog for PR #23609 [ci skip]

* [MIRROR] Updates chem factory tank sprites [MDB IGNORE] (#23608)

* Updates chem factory tank sprites (#78209)

Updates chem factory tank sprites.

* Updates chem factory tank sprites

---------

Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>

* [MIRROR] Rice Dough can be made in a beaker [MDB IGNORE] (#23611)

* Rice Dough can be made in a beaker (#78062)

## About The Pull Request

Rice dough can be made in a beaker using 20u of Rice Flour and 10u of
Water. 10u of Rice Flour is made from 5u of Rice and 5u of Flour. Rice
dough can still be crafted manually using the crafting menu and the
original recipe.
## Why It's Good For The Game

Cooks can sometimes get swamped with work, especially on a high-pop
shift or when there are no botanists. By making rice dough more
convenient to make, cooks don't need to spend as much time in the
crafting menu.
Rice Flour is made from mixing equal parts Rice and Flour. Since no
recipe other than Rice dough uses both Rice and Flour in it's Recipe, it
should be fine to turn those regents into the intermediate reagent "Rice
Flour".
Fixes #77966
## Changelog
🆑
qol: Rice Dough may be made in beaker instead of being crafted, but the
rice and flour must be added first
/🆑

* Rice Dough can be made in a beaker

---------

Co-authored-by: blueDev2 <89804215+blueDev2@users.noreply.github.com>

* Automatic changelog for PR #23608 [ci skip]

* Automatic changelog for PR #23611 [ci skip]

* f

* awda

* unused type!!!

* Apply suggestions from code review

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* oh hey unused defines! bye

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Co-authored-by: Changelogs <action@github.com>
Co-authored-by: RatFromTheJungle <62520989+RatFromTheJungle@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
Co-authored-by: blueDev2 <89804215+blueDev2@users.noreply.github.com>

---------

Co-authored-by: nikothedude <59709059+nikothedude@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Changelogs <action@github.com>
Co-authored-by: RatFromTheJungle <62520989+RatFromTheJungle@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
Co-authored-by: blueDev2 <89804215+blueDev2@users.noreply.github.com>
2023-09-16 11:24:49 -04:00
SkyratBot
2bcbb36ab9 [MIRROR] [TEST-MERGE FIRST] Allows all limbs to be dismembered and significantly refactors wounds [MDB IGNORE] (#23407)
* [TEST-MERGE FIRST] Allows all limbs to be dismembered and significantly refactors wounds

* ah fuck it

* test

* edaawdawd

* Revert "edaawdawd"

This reverts commit 47be710fe61a1f4ca79212b29b3e88bf05ec9a3a.

* nothing but sheer hatred

* freaawd

* dzfxg

* Fixing some diffs here while we are at it.

* These are deprecated and should be removed

---------

Co-authored-by: nikothedude <59709059+nikothedude@users.noreply.github.com>
Co-authored-by: nikothedude <simon.prouty@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-09-05 13:24:22 -04:00
SkyratBot
c529b754fb [MIRROR] Fixes a bunch of callbacks that were being qdeleted, and code cleanup [MDB IGNORE] (#23319)
* Fixes a bunch of callbacks that were being qdeleted, and code cleanup (#77904)

## About The Pull Request

![image](https://github.com/tgstation/tgstation/assets/13398309/559eb50a-461c-4220-b628-55412baaffc3)

Continuing the work of
https://github.com/tgstation/tgstation/pull/77850.

it started with finding one that was being missed and causing a
runtime...then I noticed a whole lot more. While I was doing this I
found callbacks that weren't being nulled in `Destroy()`, so I added
that wherever I found these spots as well as some general code cleanup.

There were a lot more of these than I initially hoped to encounter so
I'm labeling it as a refactor.

## Why It's Good For The Game

Fixes lots of runtimes, improves code resiliency.

## Changelog

🆑
refactor: fixed a bunch of instances of callbacks being qdeleted and
cleaned up related code
/🆑

* Fixes a bunch of callbacks that were being qdeleted, and code cleanup

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-08-25 19:06:07 -04:00
SkyratBot
88e4c08a98 [MIRROR] New Medical job: The Coroner [MDB IGNORE] (#20963)
* New Medical job: The Coroner

* Fixes coroner (code-side) (#21005)

* Fixes coroner

* Update jobs.dm

* trailing newline

* wew

* VR Replacements

* w

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-05-08 03:44:11 +01:00
SkyratBot
ccb8a92cc9 [MIRROR] Updates paper biscuits and the paper cutter [MDB IGNORE] (#20312)
* Updates paper biscuits and the paper cutter (#74473)

## About The Pull Request

Well this started as a PR updating some of the spelling and grammar on
the biscuits... though spilled out a little into other aspects of the
relevant code.
There are a few things I've done here.

**Paper biscuits:**

- Updated spelling and grammar for paper biscuits. Confidental ->
confidential, that sort of thing.
- A little reorganisation and cleanup of the code itself.
- Preset slips are now generated on init on the parent from a var,
rather than each having its own init proc.
- Early returns, clearer vars, etc

**Paper Cutters**
Ended up doing more here, even though it wasn't the original reason I
started looking at this code.

- Added one (1) paper cutter blade to the paper cutters cargo crate.
Raised the price a little. This is just a reskinned hatchet, so I don't
think it's much of a balance concern.
- Clarifies and docs vars
- Cleans up refs on destroy
- Many `to_chat`s to `balloon_alert`s
- Removed single-letter vars
- Cancelled attack chains when trying to actually use the cutter. You
now pick it up either by having the blade secured and no paper inside,
or by dragging it into your hand.

## Changelog
🆑
spellcheck: Paper biscuits now have more proper spelling and grammar
qol: You now get one spare paper cutter blade in the paper cutter cargo
crate.
tweak: You now use right click to cut paper with a paper cutter
fix: You can now remove paper from a paper cutter if you change your
mind.
/🆑

---------

Co-authored-by: san7890 <the@ san7890.com>

* Updates paper biscuits and the paper cutter

---------

Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
2023-04-04 04:45:59 +01:00
SkyratBot
2dc1e76135 [MIRROR] Makes eyestabbing and neck slicing a little easier to use. Also add's screams to kneecapping. [MDB IGNORE] (#20217)
Makes eyestabbing and neck slicing a little easier to use. Also add's screams to kneecapping.

Co-authored-by: Helg2 <93882977+Helg2@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-04-01 03:24:54 +01:00
SkyratBot
a2cb8c5c0c [MIRROR] Completely removes do_mob and do_after_mob [MDB IGNORE] (#19126)
* Completely removes do_mob and do_after_mob

* update modular

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2023-02-19 19:19:50 +00:00
SkyratBot
708b641716 [MIRROR] Heretic blades can properly butcher [MDB IGNORE] (#19281)
* Heretic blades can properly butcher (#73145)

Presets initial butchering component, which allows heretic blades to
properly butcher, and sounds to work on items that don't have a custom sound.

* Heretic blades can properly butcher

---------

Co-authored-by: the-orange-cow <76538214+the-orange-cow@users.noreply.github.com>
2023-02-11 13:30:10 -08:00
SkyratBot
78336ebb65 [MIRROR] Fix pacifists being able to slice necks [MDB IGNORE] (#17476)
* Fix pacifists being able to slice necks (#71149)

## About The Pull Request
Fixes #71146

Pacifists will no longer be able to slice peoples necks. (however they
can still butcher things)

## Why It's Good For The Game
Better consistency.

## Changelog
🆑
fix: Fix pacifists being able to slice necks
/🆑

* Fix pacifists being able to slice necks

Co-authored-by: Tim <timothymtorres@gmail.com>
2022-11-15 20:41:05 -05:00
Zonespace
f7c26bbf25 515 Compat (#17465)
* ONLY SKYRAT CHANGES

* ACTUALLY SKYRAT CHANGES

* yolo, revert later

* Update alternate_byond_versions.txt

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-11-15 06:59:06 +00:00
SkyratBot
b5bd312379 [MIRROR] Add investigate_deaths [MDB IGNORE] (#17424)
* Add investigate_deaths

* merge changes other than giant_spider which deps on tg/70848

* gib

* dust

* death

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-11 14:44:33 -05:00
SkyratBot
b8bed19d13 [MIRROR] Butchering requires you to be in combat mode. [MDB IGNORE] (#15903)
* Butchering requires you to be in combat mode. (#69510)

This was an oversight that occurred when intents were replaced with combat mode

	if(user.a_intent != INTENT_HARM)
		return

was never replaced by its combat mode equivalent.
This is relevant today because it makes it impossible to preform surgeries on dead monkeys (you will just butcher them)

* Butchering requires you to be in combat mode.

Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com>
2022-08-29 20:19:26 -04:00
SkyratBot
83665417d2 [MIRROR] Replaces GetComponent in Mining items with Signalers [MDB IGNORE] (#15221)
* Replaces GetComponent in Mining items with Signalers (#68575)

* Replaces many instances of GetComponents in mining items with signals and better uses overall of Components, in drills and the GPS handcuffs.
* To do this, also added 3 new signals to mechs when you are adding/removing mech equipment onto one.

* Replaces GetComponent in Mining items with Signalers

Co-authored-by: Salex08 <33989683+Salex08@users.noreply.github.com>
2022-07-28 11:45:29 -07:00
SkyratBot
647b408d01 [MIRROR] Fixes typos in span, other html elements [MDB IGNORE] (#10222)
* Fixes typos in span, other html elements (#63510)

Atomizes a much larger PR for another time...
There are typos in span and other html messages that causes them to not render correctly or at all.
Bug fixes
Converts those instances of span to use the macro

* Fixes typos in span, other html elements

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2021-12-23 17:18:43 +00:00
SkyratBot
169c42a262 [MIRROR] Refactors connect_loc_behalf into a component (#7613)
* Refactors connect_loc_behalf into a component (#60678)

See title. Also refactors caltrops into a component because they use connect_loc_behalf which requires them to hold the state.

This also fixes COMPONENT_DUPE_SELECTIVE from just outright not working.

connect_loc_behalf doesn't make sense as an element because it tries to hold states. There is also no way to maintain current behaviour and not have the states that it needs.
Due to the fact that it tries to hold states, it means the code itself is a lot more buggy because it's a lot harder to successfully manage these states without runtimes or bugs. 

On metastation, there is only 2519 connect_loc_behalf components at roundstart. MrStonedOne has told me that datums take up this much space:
image

If we do the (oversimplified) math, there are only ever 5 variables that'll likely be changed on most connect_loc_behalf components at runtime:
connections,
tracked,
signal_atom,
parent,
signal_procs

This means that on metastation at roundstart, we take up this amount: (24 + 16 * 5) * 2519 = 261.97600 kilobytes
This is not really significant and the benefits of moving this to a component greatly outweighs the memory cost.

(Basically the memory cost is outweighed by the maint cost of tracking down issues with the thing. It's too buggy to be viable longterm basically)

* Update glass.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-08-17 20:29:11 +01:00
SkyratBot
d2d89a863a [MIRROR] [Ready] Mining Loot Rework (#7461)
* [Ready] Mining Loot Rework

* AAAA

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-08-10 16:12:36 +01:00
SkyratBot
56d4291ef6 [MIRROR] Reverts Entered() passing dir instead of old loc (#6646)
* Reverts Entered() passing dir instead of old loc (#59910)

* Reverts Entered() passing dir instead of old loc

Co-authored-by: Rohesie <rohesie@gmail.com>
2021-07-02 16:42:34 +01:00
SkyratBot
5326760cb3 [MIRROR] Makes turfs persist their signals, uses this to optimize connect_loc (#6465)
* Makes turfs persist their signals, uses this to optimize connect_loc  (#59608)

* Makes turfs persist signals

* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear

* Converts all uses of connect_loc over to the new patterns

* Adds some comments, actually makes turfs persist signals

* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work

* bro fuck documentation

* Changes from a var to a proc, prevents admemems and idiots

* Extra detail on why we do the copy post qdel

* Makes turfs persist their signals, uses this to optimize connect_loc

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-06-23 04:23:48 +01:00
SkyratBot
d85a02babd [MIRROR] Refactors move procs to support multitle objects (#6423)
* Refactors move procs to support multitle objects

* Update _blob.dm

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-22 22:40:04 +01:00
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
SkyratBot
5880be0168 [MIRROR] (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc (#5524)
* (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc

* WHEW THAT WAS EASY

* Update ammo.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-05-07 22:39:27 +01:00
SkyratBot
40cd6757fb [MIRROR] Improves throat slitting combat log messages (#3661)
* Improves throat slitting combat log messages (#57176)

Co-authored-by: ShizCalev <ShizCalev@ users.noreply.github.com>

* Improves throat slitting combat log messages

Co-authored-by: ArcaneDefence <51932756+ArcaneDefence@users.noreply.github.com>
Co-authored-by: ShizCalev <ShizCalev@ users.noreply.github.com>
2021-02-26 14:04:22 +00:00
SkyratBot
e890b1282b [MIRROR] Replaces intents with combat mode (#3063)
* Replaces intents with combat mode

* updates

* a

* Update living_defense.dm

* https://github.com/tgstation/tgstation/pull/56638/files

* gunsafety!

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-05 16:58:16 +01:00
SkyratBot
94f9a384b0 [MIRROR] [READY] Bespoke Datum Mats (#2737)
* [READY] Bespoke Datum Mats

* Update sheetifier.dm

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2021-01-17 13:25:04 +01:00
SkyratBot
3a0491d3b4 [MIRROR] Small do-after refactor (#2074)
* Small do-after refactor (#55172)

This is an alternative to the PR Ryll made, it does some things similar e.g. the default limit of 1 interaction per target for a person, however, it refactors do_afters to support overrides for max interaction counts and unique sources.

For example, stripping uses the item being stripped as the source, allowing you to strip multiple items, but not the same item multiple times.

I've also fixed most other edge-cases this could cause where balance would be affected, but feel free to point out any I might've missed, this'll probably require some longer-term testmerging.

* Small do-after refactor

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
2020-12-07 22:46:59 +01:00
SkyratBot
6ecaa9a994 [MIRROR] Standardizes attack chain signal returns and fixes a tk bug (#1409)
* Standardizes attack chain signal returns and fixes a tk bug (#54475)

The attack chain is a bit of a mess, and the introduction of signals hasn't helped in simplifying it.

In order to take a step into untangling this, I re-ordered the attack signals to no longer be by source type and instead to be grouped more modularly, as they are all members of the attack chain and function similarly. They all share the trait of potentially ending the attack chain via a return, but had several different names for it. I joined it into one.

Additionally, fixed a tk bug reported by @ Timberpoes by adding a signal return check at the base of /mob/proc/RangedAttack

Lastly, removed the async call of /datum/mutation/human/telekinesis/proc/on_ranged_attack, which was added as a lazy patch to appease the linter complaining about a sleep on a signal handler (namely in /obj/singularity/attack_tk). Fixed the problem using timers.

Also cleaned some code here and there.

* Standardizes attack chain signal returns and fixes a tk bug

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-10-21 07:39:32 +02:00
SkyratBot
e65a48e91f [MIRROR] Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#430)
* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#52761)

Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.

Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.

This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.

To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.

Requested by @optimumtact.
Changelog

cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl

* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-19 20:17:28 -04:00
Ryll Ryll
a97c51b30b [READY] Wounds part 2: Piercing wounds, dismemberment changes, housekeeping (#51786)
* pierce the heavens

* starts doing projs

* continue pierce

* before armor

* before sharpness redefine

* rename sharp defines, before further implementation

* finishing undoing atk_type back to sharpness

* neatens up sharpness defines, FALSE -> SHARP_NONE

* more piercing, removes brute damage bleed, bubblegum no longer wound

* starts letting embeds get in on the fun

* half with embed

* work on dismembering

* continued embed work

* more moving bandaging to limbs

* more dismemberment work

* removing embed pierce stuff

* tweaking bullets

* more docs and work on dismemberment

* spans, piercing, guns

* dismemberment and scar fixes

* bee changes

* bullets embedding

* more bullet and dismember work

* dismemberment, surgery, piercing, formaldehyde,

* pleases travis

* pierce smite

* nicer on blood

* Auto stash before rebase of "tgstation/master"

* more neatening

* wounds only consider up to 35 damage, wounds on l6 and 762

* updates hulk

* balance

* defines

* lower slug to 50 brute to accommodate wounds

* adds differentiation for having flesh/bones/both in mobs

* moves scar descs to json, renames organic_state

* excises removed healing skill

* fixes logs, inconsistencies, some balance changes

* untab

* slight compress

* a

* kills pointed global list

* dmdoc

* halfway through roh

* finishes roh review

* okay NOW i finished roh's reviews

* roh roh roh your boat

* gently down the stream

* global lists

* list ops, fix scanner for bone gel improvised fix

* travis moment

* sounds added and moved

* pellet clouds can join the fun fully, slight gun balancing for wounds

* doc moment

* unconflicts myself

* update hulk

* Update code/_onclick/item_attack.dm

Co-authored-by: Rohesie <rohesie@gmail.com>

* crying ascii face

* final rohview

* oops

* final final

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-07-23 22:20:09 -04:00
Ryll Ryll
0f6496a55c [READY] Adds Medical Wounds: Bamboo Bones and the Skin of Your Teeth (#50558)
About The Pull Request

This PR adds medical wounds, new forms of injuries that people can suffer that cause debilitation and complications, and often require more than what can be found in a medkit to treat. But let's be honest, big complicated walls of text about medical changes make people's eyes glaze over easily- so I created a handy infograph to explain the basics!

Also there's a full guide here!

dreamseeker_2020-04-18_20-42-19.png

The infograph may not be fully up to date with the specifics of the PR's status, but it'll be updated along with major changes so people have something to use as a crash course for familiarizing themselves with how wounds function. I also have another infograph with all 9 of the possible initial wounds coming, and will be up soon. You can also find the longform design doc here with more info on the broad details, including descriptions of treatments: hackmd whee
What this does

There's a lot to cover, but here's the bullet points of the main features and changes:

    Getting lots of damage on a limb can result in wounds, with more damage causing worse wounds. These can range from dislocated joints and minor cuts to compound fractures and fourth degree burns, and can affect you in different ways depending on what bodypart they're applied to (namely with broken bones).
    You can damage individual bodyparts on clothing (only jumpsuits for now) through the use of lasers and sharp weapons. Bodyparts that reach max damage are considered "shredded" and will not apply any protection for that zone until it is repaired with cloth. If all zones are disabled, the entire piece of clothing is shredded and unwearable until repaired with 3 cloth. Jumpsuits give a small amount of wound protection, and since sharp weapons and lasers generally get extra wound bonuses against bare flesh, even a plain jumpsuit provides decent protection from a few laser shots or scalpel stabs.
    Lasers gain a powerful niche versus unarmored/lightly armored carbons! As noted above, lasers can shred clothing and burn away zones of jumpsuits in 2 shots each, after which the target's bare flesh is exposed (barring other clothing), and lasers excel at dealing burn wounds against uncovered skin. Think big, nasty charring!
    Bleeding is now totally limb based, and gauze is as well. Bleeding is also 95% cut wound based, meaning sharp weapons make you bleed rather than just having 40+ brute on a limb.
    The more wounds and damage you get on a bodypart, the easier it'll be to gain more severe wounds. Wounds are arranged from Moderate, to Severe, to Critical in increasing severity, and you'll generally have to suffer the lesser ones before getting the worse ones.

dreamseeker_2020-05-15_03-15-59.png
Above: Someone having an incredibly bad day from bloodloss

dreamseeker_2020-05-04_22-29-29.png
Above: Scars from healed wounds

ShareX_2020-05-15_06-55-20.png
Above: Actual combat involving someone's head getting cracked

Here's a quick, if non-exhaustive, list of things I have left to do before I consider it feature complete

Finish adding treatments for each wound type/severity (mostly surgeries/triage for critical wounds)
Add second winds for bad injuries to give the victim a chance to get away
Flesh out severe & critical injuries in general
Find sprites for the bonesetter, bone gel, and anything else that might be needed
Add the medical items for treating the less severe wounds to the station
Polish code and remove any redundancies I left behind

    Quick balance pass to make sure nothing is horribly abuseable

Why It's Good For The Game

Adds a flexible new system for representing damage on carbons with injuries that can be treated in different ways. Moderate wounds from getting toolboxed or sliced with a scalpel can usually be treated by a buddy or even by yourself with the right tools, but getting flayed with a fireaxe or a laser gun emptied into your bare skin may require extra attention or even surgery in bad cases! Also makes laser guns cooler and more like 40k lasguns that can flash fry people (cool!)

This should also make spessmen more resilient and harder to kill outright, while still adding consequences and complications to getting hurt. Wounds aren't immediately fatal, but they can do things like slow down interactions, deal damage over time through infections, and generally make you more fragile until fixed. They can also give you a "second wind" on being applied that gives you a small adrenaline boost (or whatever) to help disengage and escape immediate danger.
Changelog

🆑 Ryll/Shaps
add: Introduces medical wounds, new injuries that can happen to fleshy carbons when they sustain lots of damage on a bodypart. There's quite a lot of change here, but you can read the guide at: https://tgstation13.org/wiki/Guide_to_wounds and an extended changelog is available here: https://hackmd.io/l_FI9b3tSqa_woDadewJXA
add: Introduces scars and temporal scarring! Healing a wound leaves a scar behind that can be seen by examining someone twice rapidly, and if Temporal Scarring is enabled in character prefs, surviving a round with scars will save them to be granted at roundstart another round! Let your body tell stories!
tweak: Bleeding is now fully bodypart-focused, and 95% of bleeding comes from cut wounds from sharp weapons. Gauze is applied on a limb-by-limb basis, and helps staunch bloodflow rather than totally stop it. Notably, you no longer bleed just from having 40+ brute damage on a limb.
del: Organic bodyparts are no longer disabled at maximum damage, but are easier to cause wounds to
add: O2 medkits in emergency lockers have been replaced with new emergency medkits with basic tools for diagnosing and treating wounds and basic damage
tweak: Herapin now rapidly increases bleeding on all open cuts, rather than causing bleeding by itself. The more cuts on the target, the more it will affect them.
tweak: Neckgrab table slams now hit the targeted limb rather than just the head, with a large chance to dislocate or break a bone
tweak: Sharp weapons and burning weapons can now shred zones on jumpsuits, disabling protection on that limb. Damaged clothes can be repaired with cloth.
tweak: Slaughter demons now deal less raw damage, but gain the ability to cause cut wounds, which becomes more powerful with each attack on a humanoid but resets when bloodcrawling.
/🆑
2020-06-12 23:47:33 +12:00
ShizCalev
7209ac3c93 Removes unnessacary math defines 2020-02-17 23:09:09 -05:00
81Denton
14abd06e81 Merge pull request #48779 from Fikou/patch-94
you can only slice aggressive grabs or higher now
2020-02-01 07:58:51 +01:00
Rohesie
7bef84f009 Mass-replacement of stat to machine_stat (#48758)
Living and machine stat vars are pretty different, one uses flags and other number-defines.
This should make some other mass-replacements and searches a bit easier.
2020-01-24 12:37:17 +13:00
Fikou
1660a962c5 neck slices now dont work on critical/sleeping people 2020-01-14 19:26:30 +01:00
Fikou
9c5cf98ce8 buff 2020-01-14 00:30:53 +01:00
Fikou
72bc98698d you can only slice neck grabs now 2020-01-14 00:10:05 +01:00
81Denton
f5bd6a381d Merge pull request #47052 from kingofkosmos/misc_span_fixes1
Misc span fixes
2019-10-20 18:46:54 +02:00
nemvar
fb7c09e81a Neck Slice no longer divides by zero. (#47188)
* No more division by 0

* unepic spelling error
2019-10-19 22:34:12 -04:00
kingofkosmos
6d28a175d5 Fixes a few broken spans. 2019-10-13 21:51:07 +03:00
kingofkosmos
280d416d4f Adds missing spans, missing periods and missing span endings. Also changes spans to suit the situation better. 2019-10-12 19:34:11 +03:00
Fhaxaris
c2efff7919 Fixes my horrible mistake (#47001)
speed merge dis
2019-10-10 18:23:00 -04:00
Rob Bailey
f50eb4e3d4 neckslice logging (#46987) 2019-10-09 11:10:22 -04:00
Fhaxaris
acf733db23 Adds throat slicing (#46838)
* Adds throat slicing

* Max cut time for low force objects doubled

* Adds emotes, limits to one slice at a time, fixes messages. Hopefully has no bugs
2019-10-09 01:41:36 -07:00
nemvar
dc783795db Renames is_hot and is_sharp to get_temperature and get_sharpness (#46680) 2019-09-23 14:02:59 -07:00
kingofkosmos
c3ea51908d Adds "you" to local visible_messages (#45631)
* adds "you" to some combat visible_messages.

* more you-messages and attack verbs to present tense.

* small fixes

* more additions and small fixes

* few message tweaks

* Fixes a typo and few other wordings.
2019-08-06 02:15:34 -07:00
nemvar
6755ba7488 Fixes some issues with the butchering refactor 2019-07-28 21:32:00 +02:00
nemvar
449e5d38e6 This turns butchering into something that resembles a component. (#45299)
* This turns butchering into something that resembles a component.

* Changes how the recycler works.
It no longer uses butchering in disgusting ways.

* I guess this works? It's not pretty though.

* How the fuck...
2019-07-26 23:57:37 -07:00