Commit Graph

20 Commits

Author SHA1 Message Date
SmArtKar
de70de4d7c [NO GBP] Fixes oil ignition, sanity checks blood DNA and adds some logging to it (#92221)
## About The Pull Request

Oil blood will no longer try to ignite twice when hit with a welder,
runtiming on the second try.
Also added crashes when ``add_blood_DNA`` is passed non-list or lists
with null assoc values, as both are invalid and cause crashes, because I
need to hunt down a stupid bug.

## Changelog
🆑
fix: Trying to ignite oil with a welding tool no longer runtimes due to
it trying to get ignited twice
/🆑
2025-07-25 20:22:41 -06:00
Bloop
2bae025bfe Audits wash/cleaning signals + refactors wash() to ensure no needless mob updates occur (#91259)
## About The Pull Request

This has the potential to create a lot of needless mob updates which is
not great. Now should only update a mob's clothing if it was actually
washed.

This PR

1) ensures that all wash() procs return a bitflag.
2) ensures that `wash()` proccalls which result in expensive operations
like icon updates only do so when it is necessary

## Why It's Good For The Game

Updating mob sprites is expensive, and doing it when nothing has been
changed is bad.

## Changelog

Nothing really player facing
2025-06-02 18:54:53 +00:00
SmArtKar
b4061f1800 [MDB IGNORE] Blood Refactor Chapter 2: Collector's Edition (#91054)
## About The Pull Request

Refactors most of blood handling code untouched by #90593 and completely
rewrites all blood decals, components and reagents.

- Blood types now have behavioral flags which allow them to control
where they leave decals/DNA/viruses. Oil no longer transfers DNA and
viruses with it, while podpeople water-blood doesn't leave visible
decals on turfs and items, but still can be picked up by DNA scanners.
- Multiple blood types have received unique handling - liquid
electricity blood now glows in the dark, oil trails are flammable and
lube ones are slippery. Oil blood can be restored with fuel, lube with
silicon and slime with stable plasma (as normal plasma already passively
regenerates their blood), instead of everything using iron. Saline
solution only supplements on iron-based blood and won't do anything to
help with bloodloss for species who rely on different blood types.
(Roundstart this applies only to Ethereals)
- All blood logic has been moved away from the blood reagent itself into
a blood element that is assigned to the blood reagent by default, and to
any reagent that's drawn from a mob as their "blood" (in
``transfer_blood_to``). This means that blood you draw from lizards will
be green and have lizard's blood description instead of mentioning red
blood cells, Ethereal "blood" will actually contain their DNA and genes,
etc.
- Refactored all blood decals. Blood states are no more, everything is
now handled via blood DNA. Credits to MrMelbert and Maplestation, as a
significant amount of code has been taken from
https://github.com/MrMelbert/MapleStationCode/pull/436 and many of his
followup PRs. Oil and xenomorph splatters are now subtypes of blood,
blood drying is now animated, blood trails now curve and can be
diagonal.
- Rewrote bloodysoles and bloody_spreader components, credits to Melbert
again for the former, while latter now makes more sense with its
interactions. Bloody soles no longer share blood DNA with your hands.
- Ported Melbert's bloody footprint sprites and bot-blood-spreading
functionality.
- Removed all species-side reagent interactions, instead they're handled
by said species' livers. (This previously included exotic blood
handling, thus the removal)
- Slightly optimized human rendering by removing inbetween overlay
holders for clothing when they're not needed.
- Blood-transmitted diseases will now get added to many more decals than
before.
- Cleaned up and partially refactored replica pods, fixed an issue where
monkeys/manipulators were unable to harvest mindless pods.
- Exotic bloodtype on species now automatically assigns their blood
reagent, without the need to assign them separately.
- Clown mobs now bleed (with colorful reagent instead of blood during
april fools), and so do vatbeasts (lizard blood)
- Implemented generic procs for handling bleeding checks, all sorts of
scanners now also correctly call your blood for what it is.
- Podpeople's guts are now lime-green like their organs, instead of
being weirdly greyish like their water-blood. (Their bleeding overlays
are still grey, as they're bleeding water)
- Slimepeople now can bleed. Their jelly is pale purple in color, but
their wound overlays copy their body color.
- Injecting/spraying/splashing/etc mob with a reagent preserves its
data, so you could theoretically recycle fine wines from someone's
bloodstream
- Fixed burdened chaplain's sect never actually giving a blessing when
applying effects, and giving a blessing when nothing can be healed.
Inverted check strikes again.

- Closes #91039 

#### Examples

A lot of blood here has dried, visually the blood colors are almost
exactly the same as before either of the blood refactors.


![dreamseeker_BSP7FE9pRB](https://github.com/user-attachments/assets/45711fa0-ae65-4ec2-9e89-753fa7dd876f)

![dreamseeker_zyv9ssh5VN](https://github.com/user-attachments/assets/7b112854-b7e3-4bfe-b78b-199a55b5b051)
2025-05-31 19:38:07 -05:00
SmArtKar
2ff025b97a Fixes transparent_protection being used incorrectly almost everywhere (#90894)
## About The Pull Request

``transparent_protection`` is a set of cover flags which are supposed to
be used for things that can be seen, but cannot be accessed. Replaced
the argument in ``check_obscured_slots`` with a separate
``check_covered_slots`` proc for clarity.

Closes #90827

Also went a bit down a rabbit hole and fixed some UI issues with the
strip menu, as I found out that covered slots also counted as obscured.
Covered, but not obscured slots are now semi-transparent, images are
pixel-perfect, and action buttons no longer are offset. Also slots with
items in them don't have the background, akin to how inventory slots
function in-game.
2025-05-08 21:52:31 -05:00
Bloop
3d01e86e29 There will be (colorful) blood: datumizes bloodtypes, greyscales blood sprites, and fixes a lot of inconsistencies with gibs and forensic data (#90593)
## About The Pull Request


This PR:

- Converts all of the blood types into their own datums, which can be
set up to have their own colors, descriptions, and other fun unique
properties. For example, the clown blood that is constantly randomizing
itself.

- Converts all the blood decals into greyscale, which in turn eliminates
the need for separate xeno sprites. They both use the same ones now.

- Audit of blood splatters/gibs/bodyparts/organs to make sure that they
are getting the correct forensic data applied to them.

- For the admins: Adds a clown blood smite.

My primary goal with was to make the appearance of the new sprites look
almost indistinguishable to the original ones.

I consider this a "first pass", as in there are still some further
refactors I would like to do on the backend side, but am satisfied with
it enough to push it forward as a first step towards a better blood
system! I didn't want to do too much at once because of A) fatigue and
B) easier to test things to make sure I'm not breaking something
important this way.

This has been test-merged on Nova for over a week now and has been going
great, so I finally got around to upstreaming the bones to TG. Although
I did test it a bit you may want to TM it just in case I missed some
things when copying it over.
2025-04-28 00:57:59 -05:00
tonty
d8450b4933 Camera eyes have been lightly refactored (among other things...) (#87805)
## About The Pull Request

* A generic /mob/eye/camera type has been made, containing everything
needed to interface with a cameranet
* /mob/eye/ai_eye has been refactored into a generic /mob/eye/camera
instance
* Advanced cameras no longer inherit from AI eyes, splitting off
behaviour
* Camera code has been somewhat cleaned up
* Probably some more stuff I'm forgetting right now

## Big man Southport:

![image](https://github.com/user-attachments/assets/de6e6ff0-ca99-4636-bdec-5e0b2d6b8037)

## Changelog

🆑
code: made /proc/getviewsize() pure

refactor: mob/eye/ai_eye has been restructured, now inheriting from a
generic mob/eye/camera type
refactor: advanced cameras and their subtypes are now
mob/eye/camera/remote subtypes
code: the cameranet no longer expects the user to be an AI eye
code: remote camera eyes have had their initialization streamlined
code: remote cameras handle assigning and unassigning users by
themselves now
code: remote cameras now use weakrefs instead of hard referencing owners
and origins
code: also the sentient disease is_define was removed (we don't have
those anymore)
fix: AI eyes no longer assign real names to themselves, fixing their
orbit name
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-11-21 12:55:38 +01:00
tonty
d5daa9c9b8 [NO GBP] Renames mob/camera to mob/eye and makes everything follow suit (#87684)
## Why It's Good For The Game

Clarity and consistency regarding DM's systems. 
Internally, `eye` is used for anything that controls the client's view.

![image](https://github.com/user-attachments/assets/7d1291e1-7a6a-4736-a14b-97834e89846f)
How `eye` is used in DM is consistent with how we use the term, so I
figured this would add clarity.

Being named mob/camera also makes it unclear exactly what it's doing.
The name implies that it would function similar to how mob/camera/ai_eye
does, but most of the time it's only used as... an eye.

My ulterior reason for this PR is that I want to clean up
mob/camera/ai_eye and it's subtypes after this.
## Changelog

🆑
server: mob/camera has been renamed to mob/eye, which may break
downstreams
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-11-09 10:57:45 +00:00
Bloop
908a68f3cb Fixes forensics hard del (#81880)
## About The Pull Request

Should fix this CI error.


![firefox_JiarBI7EY5](https://github.com/tgstation/tgstation/assets/13398309/b456900c-e97c-4184-8615-98752ee6349a)

`parent` used to be a weakref but since it's not any longer (as of
#81751) we need to manage the ref more carefully.

The forensic datum should be getting `QDEL_NULL`'d in `atom/Destroy()`
but I think what was likely happening was somehow, something was adding
a forensics datum again after the atom was qdeleted. This should
hopefully prevent that from happening.

## Why It's Good For The Game

Less CI errors

## Changelog

Nothing player facing
2024-03-08 20:06:30 +01:00
MrMelbert
96cfd92a4a Removes weakref in forensics datum (#81751)
## About The Pull Request

This doesn't need to use weakrefs, it's a fairly easy to manage
relationship, when the atom goes the forensics goes
2024-03-01 13:54:16 -07:00
Bloop
bf56a7a1ba Fixes CI runtime/race condition with forensics (#81610)
## About The Pull Request

Just a quick fix for the following CI runtime, and additionally passes
through the rest of this file's weakref instances for any other
potential bugs.


![image](https://github.com/tgstation/tgstation/assets/13398309/a58be18a-21e4-40b2-92e0-1a961108c939)

## Why It's Good For The Game

Bugfix

## Changelog

Nothing player facing

---------

Co-authored-by: san7890 <the@san7890.com>
2024-02-22 13:32:08 +01:00
MrMelbert
115fda380d Half fixes organ blood dna not updating (#81584)
## About The Pull Request

Organs have this mechanic where they store the first mob who owned it's
DNA

Anyways it was broken from the organ nullspace refactor because they
intended a block of code that shouldn't have been indented

But this only *half* fixes the issue, you see a problem here?


![image](https://github.com/tgstation/tgstation/assets/51863163/886dd926-3242-4305-825b-a715d6848281)

Yeah there's an order of operation thing going on here because you get
your organs before you get your species bloodtype
This only affects species with weird blood types (like lizards)
I'm not fixing it in this PR because it was certainly broken before and
needs a bit more unwinding somewhere

## Changelog

🆑 Melbert
fix: Organs have the blood DNA of their owns on them again
/🆑
2024-02-20 20:21:54 -07:00
Bloop
f34174414d Cleans up some extra args in Destroy() (#80642)
## About The Pull Request

After https://github.com/tgstation/tgstation/pull/80628, these shouldn't
be needed anymore right?

## Why It's Good For The Game

Cleans up some vestigial code

## Changelog
EDIT: Not player-facing.
2023-12-30 03:54:07 +01:00
Tim
d4d5e8251c Fix organs having no DNA and become bloody when violently removed (#78519)
## About The Pull Request
Fixes #75585

Organs now spawn with DNA that can be scanned by a forensic scanner.
Robotic organs have no DNA and organic organs with no prior owner spawn
with synthetic DNA. If the syntenic DNA organ is inserted into someone,
the organ inherits the owners DNA. This override can only happen once
and only if the organ has never been used.

Any organ removed is covered in blood, unless it's surgically removed. I
had to give the `NO_BLOOD_ON_ITEM` to hearts since the icon was
glitching out with blood decals on it. It also appears that moth wings
(and maybe normal ones?) do not inherit blood decals naturally despite
being covered in blood. No idea why, but that's out of scope for this
PR.

## Why It's Good For The Game
Forensics scanning is now more robust. 

## Changelog
🆑
fix: Fix organs having no DNA and become bloody when violently removed. 
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-10-02 17:29:56 +01:00
John Willard
b5975bd915 Unit tests now catch decals in walls/space (#75189)
## About The Pull Request

Unit tests will now fail if there's a decal in a wall or open space
turf. Open space turf could be limiting to mappers but I don't think it
makes sense for decals (like dirt, glass shards, etc) to be floating
around in space in the exact same spot.

If there's a decal you want to put in space, decals have a
``turf_loc_check`` var that will bypass this.

**Important note: This is not changing existing behavior. Decals already
delete themselves when they spawn in these incorrect locations, we're
just avoiding them from spawning in the first place.**

### Changes I made

- Ash flora are now lava immune, rivers spawn after flora does, so I
decided that it would be easiest (and more flavorful) to have them be
lava-immune rather than to not have them spawn at all.
- Decals can now be spawned in non-turf locations. This is currently
done by mail, which can give you bones as part of the mail. Currently it
will just delete itself instead.
- Trading Card button is now on the same tile as their display, which
now uses an offset. Before it would spawn it on the tile next to it,
which could be a wall in some instances.
- Mirrors now have floating movement type. They ARE floating since
they're attached to the wall, and it prevents them from burning up due
to lava in the Pride ruin.
- I also added a broken mirror subtype because I thought the icon_state
check was terrible.
- Bubblegum called ``DestroySurroundings`` several times on the same
thing, I hopefully fixed some of that. Their charge ability also
registered ``COMSIG_MOB_STATCHANGE`` despite ``/datum/action`` doing it
by default, so I fixed that too.

## Why It's Good For The Game

Decals in walls is already a bad idea, but currently all it does is
delete it on Initialize. It would be better if we ensured they wouldn't
spawn in the first place.

## Changelog

🆑
fix: Lava will no longer burn 6 of the mirrors in pride ruin
fix: Lava will no longer burn plants that spawn in them.
/🆑
2023-06-15 16:39:22 -07:00
Tim
8d67f614b5 Fix blood overlays on energy daggers (#72624)
## About The Pull Request
Fixes #72338 (again)

Energy blades had blood splatters on them and it looked very funky.  


![dreamseeker_wtugxswIzj](https://user-images.githubusercontent.com/5195984/211640855-f7c3e3fa-8a41-4bca-acc9-75a4c6397b4b.png)

Items now have a `NO_BLOOD_ON_ITEM` flag for to ignore the blood
overlay.

## Why It's Good For The Game


![dreamseeker_dOgOlhLEoU](https://user-images.githubusercontent.com/5195984/211640899-ab577045-9324-456a-ac6a-2cce8119e749.png)

## Changelog
🆑
fix: Fix blood overlays on energy daggers
code: Add `NO_BLOOD_ON_ITEM` bitfield for items
/🆑

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2023-01-13 04:31:53 +00:00
MrMelbert
ada883356a Fixes a bad istype src in forensics code (#72296)
## About The Pull Request

`src` is a forensics datum, it'll never be an item

## Why It's Good For The Game

Code works as expected

## Changelog

🆑 Melbert
fix: Did you know items have a 1.2x chance of getting fibers attached?
Well it's been broken, now it's fixed
/🆑

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2022-12-28 10:58:33 -07:00
tralezab
a592e157be Legitimizes BOMBGERs. Add grenades to burgers and assistants will still eat it. (#71552)
## About The Pull Request

Here's the changes to custom food:
- Can now accept grenades
- If you add something larger than the custom food, the custom food
becomes that size
- Biting down on food with grenades in them triggers the grenades

## Why It's Good For The Game

We're trying so hard to remove getting around this whole bombger thing
but wait it's actually based as hell. Why don't we just cut the fat of
what doesn't work (getting around sanity checks with deep frying) and
legitimize what does?

## Changelog
🆑
add: You can add grenades to food
add: Grenades explode when accidentally bitten into
balance: Adding something large to custom food will make it, too, also
large
/🆑
2022-12-01 20:03:39 +00:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
Kapu1178
2eccf3cea0 Cleans up update_icons, makes the update_icon_updates_onmob element bespoke, updates CODEOWNERS (#69179)
* I just realised this is all one commit.

* hail marry

* fix.

* FIXES IT FOR REAL

* Update code/datums/elements/update_icon_updates_onmob.dm
2022-08-16 13:50:21 -04:00
Seth Scherer
a3add37618 Refactors the forensics component into a datum (#66809)
About The Pull Request

This was doing things component really shouldn't be doing, and now all
of its behaviour is contained onto a datum, as it should've been the
whole time
Why It's Good For The CODEBASE

some things just really shouldn't be components, this was made back when DCS was first implemented and just thrown in because it was the new hot thing i guess, but datumized forensics makes far more sense, AND doesn't use GetComponent

TODO:

    More thorough testing to make sure nothing broke

Changelog

🆑
refactor: Turned the forensics component into a datum.
/🆑
2022-05-16 16:33:59 +12:00