Vgstation13: No upper limit on rigged power cell explosion

Created on 11 Sep 2020  路  1Comment  路  Source: vgstation-coders/vgstation13

Description of issue

Blobs eating power cells causes a rigged power cell explosion.
`/obj/item/weapon/cell/proc/explode()
var/turf/T = get_turf(src.loc)
/*

  • 1000-cell explosion(T, -1, 0, 1, 1)
  • 2500-cell explosion(T, -1, 0, 1, 1)
  • 10000-cell explosion(T, -1, 1, 3, 3)
  • 15000-cell explosion(T, -1, 2, 4, 4)
  • */
    if (charge==0)
    return
    var/devastation_range = -1 //round(charge/11000)
    var/heavy_impact_range = round(sqrt(charge)/60)
    var/light_impact_range = round(sqrt(charge)/30)
    var/flash_range = light_impact_range`

This is fine and dandy but there is no upper cap.
If, for whatever reason, like bus or a really really stupid trial admin, a extremely large capacity power cell is bussed in and is consumed, you get a, impossibly large explosion that can cripple the server.

Difference between expected and actual behavior

Expected: A very large explosion
Actual: An exploded server
image

[bugfix]

Bug / Fix IT'S A FEAAAATUUUUREEEEEEEEE

Most helpful comment

lol

>All comments

lol

Was this page helpful?
0 / 5 - 0 ratings

Related issues

D3athrow-Issues picture D3athrow-Issues  路  3Comments

D3athrow-Issues picture D3athrow-Issues  路  3Comments

Arthurdentist picture Arthurdentist  路  3Comments

DamianX picture DamianX  路  3Comments

JustSumBody picture JustSumBody  路  3Comments