Skip to content

Commit

Permalink
[MIRROR] [NO GBP]Cells will only consider 0.1% of their charge when s…
Browse files Browse the repository at this point in the history
…hocking a user. (#2801)

* [NO GBP]Cells will only consider 0.1% of their charge when shocking a user. (#82456)

## About The Pull Request
Makes cells only consider 0.1% of their charge when calculating the
damage for shocking someone. This makes the minimum damage 20, and goes
up to 22 (previous behaviour, even though that's a shockingly small
difference) with a 50 MJ cell, which is the highest capacity crew can
get. This makes it inversely scale with the standard cell charge define,
so if that gets changed, cells will use a different composition of their
charge to consider.

## Why It's Good For The Game

Airlocks instantly critting people when shocked regardless of what's in
the grid wasn't previous behaviour.

* [NO GBP]Cells will only consider 0.1% of their charge when shocking a user.

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Pickle-Coding <[email protected]>
  • Loading branch information
3 people authored Apr 10, 2024
1 parent bf94e8e commit 1760106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/power/cell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
SSexplosions.high_mov_atom += src

/obj/item/stock_parts/cell/proc/get_electrocute_damage()
return ELECTROCUTE_DAMAGE(charge)
return ELECTROCUTE_DAMAGE(charge / max(0.001 * STANDARD_CELL_CHARGE, 1)) // Wouldn't want it to consider more energy than whatever is actually in the cell if for some strange reason someone set the STANDARD_CELL_CHARGE to below 1kJ.

/obj/item/stock_parts/cell/get_part_rating()
return maxcharge * 10 + charge
Expand Down

0 comments on commit 1760106

Please sign in to comment.