8a6df45aed [MIRROR] Fixes thrown reagent containers (like molotovs) fully splashing against mobs when they apparently shouldn't [MDB IGNORE] (#20052)
* Fixes thrown reagent containers (like molotovs) fully splashing against mobs when they apparently shouldn't (#74187)

## About The Pull Request
Not a mapping PR but I probably could take a crack at it anyway if I had
any good ideas but anyway -
Fun fact: throwing molotovs at people, or open reagent containers in
general (beakers, glasses) applies the full force of their contents at
their target. (This is probably not supposed to happen.)

![image](https://user-images.githubusercontent.com/31829017/227109778-11b530fc-4b91-4cf6-b6c3-8e464b0c0a0b.png)

This is because multiplying the `total_reagents` down doesn't actually
affect the reagents as stored in a list, so even if it was supposed to
splash less (because of the inherent in-universe inaccuracy of hucking
things), it... didn't!

This PR fixes this by making a separate variable, `splash_multiplier`
(which defaults to 1), multiplying it down when it hits a mob, and
passing that along to the `reagents.expose` call.

This does not affect non-thrown reagent containers.

![image](https://user-images.githubusercontent.com/31829017/227110370-b553b7e9-e19b-4c97-8014-74aa8ac9d99f.png)

## Why It's Good For The Game

Apparently, this isn't intended according to the comments; even though
it says "not all of it makes contact", the first screenshot kinda shows
that it does, which is suboptimal.

On second thought, I maybe could've made it so that the part of the
reagents that don't hit the target get applied to the floor, instead,
but that's... probably for a sequel PR (mostly applicable to stuff that
splashes on floors e.g. weldfuel (puddles))? Unless a maintainer wants
me to add that as a feature! And then make this less a fix.

Please advise.

## Changelog

🆑
fix: Thrown reagent containers (beakers, molotovs) hitting mobs no
longer fully splash their target with their contents, as this was
unintended behavior. The intended behavior was 0-50% of the splashed
reagents being ignored. Throwing stuff at floors/walls is unaffected.
/🆑

---------

Co-authored-by: Hatterhat <Hatterhat@ users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>

* Fixes thrown reagent containers (like molotovs) fully splashing against mobs when they apparently shouldn't

---------

Co-authored-by: Hatterhat <31829017+Hatterhat@users.noreply.github.com>
Co-authored-by: Hatterhat <Hatterhat@ users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
2023-03-25 01:04:21 -07:00

Skyrat 13 (/tg/station Downstream)

CI Suite Percentage of issues still open Average time to resolve an issue Coverage

resentment resentment forinfinityandbyond

This is Skyrat's downstream fork of /tg/station created in byond.

Please note that this repository contains sexually explicit content and is not suitable for those under the age of 18.

Space Station 13 is a paranoia-laden round-based roleplaying game set against the backdrop of a nonsensical, metal death trap masquerading as a space station, with charming spritework designed to represent the sci-fi setting and its dangerous undertones. Have fun, and survive!

Important note - TEST YOUR PULL REQUESTS

You are responsible for the testing of your content and providing proof of such in your pull request. You should not mark a pull request ready for review until you have actually tested it. If you require a separate client for testing, you can use a guest account by logging out of BYOND and connecting to your test server. Test merges are not for bug finding, they are for stress tests where local testing simply doesn't allow for this.

DEVELOPMENT FLOWCHART

image

Modularisation Guide

DOWNLOADING

Downloading

Running on the server

Maps and Away Missions

How to compile

On 2021-01-04 we have changed the way to compile the codebase.

Find BUILD.bat here in the root folder of tgstation, and double click it to initiate the build. It consists of multiple steps and might take around 1-5 minutes to compile.

The long way. Find bin/build.cmd in this folder, and double click it to initiate the build. It consists of multiple steps and might take around 1-5 minutes to compile. If it closes, it means it has finished its job. You can then setup the server normally by opening tgstation.dmb in DreamDaemon.

Building tgstation in DreamMaker directly is now deprecated and might produce errors, such as 'tgui.bundle.js': cannot find file.

How to compile in VSCode and other build options.

Contributors

Guides for Contributors

/tg/station HACKMD account - Design documentation here

Interested in some starting lore?

LICENSE

All code after commit 333c566b88108de218d882840e61928a9b759d8f on 2014/31/12 at 4:38 PM PST is licensed under GNU AGPL v3.

All code before commit 333c566b88108de218d882840e61928a9b759d8f on 2014/31/12 at 4:38 PM PST is licensed under GNU GPL v3. (Including tools unless their readme specifies otherwise.)

See LICENSE and GPLv3.txt for more details.

The TGS DMAPI API is licensed as a subproject under the MIT license.

See the footer of code/__DEFINES/tgs.dm and code/modules/tgs/LICENSE for the MIT license.

All assets including icons and sound are under a Creative Commons 3.0 BY-SA license unless otherwise indicated.

Languages
DM 91.5%
TypeScript 5.9%
JavaScript 1.6%
Python 0.5%
SCSS 0.2%