mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
[MIRROR] Fixes BRPED/rigged cell exploit and allows it to booby trap BRPEDs instead (#2357)
* 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. * Fixes BRPED/rigged cell exploit and allows it to booby trap BRPEDs instead Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
@@ -613,6 +613,13 @@
|
||||
break
|
||||
for(var/obj/item/B in W.contents)
|
||||
if(istype(B, P) && istype(A, P))
|
||||
// If it's a corrupt or rigged cell, attempting to send it through Bluespace could have unforeseen consequences.
|
||||
if(istype(B, /obj/item/stock_parts/cell) && W.works_from_distance)
|
||||
var/obj/item/stock_parts/cell/checked_cell = B
|
||||
// If it's rigged or corrupted, max the charge. Then explode it.
|
||||
if(checked_cell.rigged || checked_cell.corrupted)
|
||||
checked_cell.charge = checked_cell.maxcharge
|
||||
checked_cell.explode()
|
||||
if(B.get_part_rating() > A.get_part_rating())
|
||||
if(istype(B,/obj/item/stack)) //conveniently this will mean A is also a stack and I will kill the first person to prove me wrong
|
||||
var/obj/item/stack/SA = A
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user