* 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>
* Fix butchered and gibbed mobs to transfer reagents and diseases to meat (#78454)
## About The Pull Request
Fixes#78386Fixes#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>
* [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

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>
* [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>
* Fixes a bunch of callbacks that were being qdeleted, and code cleanup (#77904)
## About The Pull Request

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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* Reverts Entered() passing dir instead of old loc (#59910)
* Reverts Entered() passing dir instead of old loc
Co-authored-by: Rohesie <rohesie@gmail.com>
* 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>
* (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>
* 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>
* 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>
* 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>
* 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>
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.
/🆑
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.
* 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.
* 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...