Fixes BRPED/rigged cell exploit and allows it to booby trap BRPEDs instead (#55447)

BRPEDs can teleport rigged power cells. Through cameras. These rigged power cells will then pretty much immediately explode. This is a tad imbalanced.

Behaviour modified. Attempting to use a BRPED on a machine and having it attempt to swap over a rigged cell will cause the rigged cell to immediately go to maximum charge and explode.

Adds some logging to accompany it.
Why It's Good For The Game

Blowing things up from across the cosmos is bad.

Rigging BRPEDs to be able to explode when some poor sucker uses it to change over a power cell is cool.
This commit is contained in:
Timberpoes
2020-12-29 14:55:48 +13:00
committed by GitHub
parent 960580fda4
commit a8f683c672
3 changed files with 27 additions and 0 deletions
+4
View File
@@ -115,6 +115,10 @@
rigged = FALSE
corrupt()
return
message_admins("[ADMIN_LOOKUPFLW(usr)] has triggered a rigged/corrupted power cell explosion at [AREACOORD(T)].")
log_game("[key_name(usr)] has triggered a rigged/corrupted power cell explosion at [AREACOORD(T)].")
//explosion(T, 0, 1, 2, 2)
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
qdel(src)
+16
View File
@@ -51,6 +51,22 @@ If you create T5+ please take a pass at mech_fabricator.dm. The parts being good
alt_sound = 'sound/items/pshoom_2.ogg'
component_type = /datum/component/storage/concrete/bluespace/rped
/obj/item/storage/part_replacer/bluespace/Initialize()
. = ..()
RegisterSignal(src, COMSIG_ATOM_ENTERED, .proc/on_part_entered)
/obj/item/storage/part_replacer/bluespace/proc/on_part_entered(datum/source, obj/item/I)
if(!istype(I, /obj/item/stock_parts/cell))
return
var/obj/item/stock_parts/cell/inserted_cell = I
if(inserted_cell.rigged || inserted_cell.corrupted)
message_admins("[ADMIN_LOOKUPFLW(usr)] has inserted rigged/corrupted [inserted_cell] into [src].")
log_game("[key_name(usr)] has inserted rigged/corrupted [inserted_cell] into [src].")
usr.log_message("inserted rigged/corrupted [inserted_cell] into [src]", LOG_ATTACK)
/obj/item/storage/part_replacer/bluespace/tier1
/obj/item/storage/part_replacer/bluespace/tier1/PopulateContents()