mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2025-12-09 18:03:55 +00:00
28 lines
1.5 KiB
Plaintext
28 lines
1.5 KiB
Plaintext
/datum/component/storage/concrete/bluespace/bag_of_holding/handle_item_insertion(obj/item/W, prevent_warning = FALSE, mob/living/user)
|
|
var/atom/A = parent
|
|
if(A == W) //don't put yourself into yourself.
|
|
return
|
|
var/list/obj/item/storage/backpack/holding/matching = typecache_filter_list(W.get_all_contents(), typecacheof(/obj/item/storage/backpack/holding))
|
|
matching -= A
|
|
if(istype(W, /obj/item/storage/backpack/holding) || matching.len)
|
|
var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Abort", "Proceed")
|
|
if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user)))
|
|
return
|
|
var/turf/loccheck = get_turf(A)
|
|
if(is_reebe(loccheck.z))
|
|
user.visible_message("<span class='warning'>An unseen force knocks [user] to the ground!</span>", "<span class='big_brass'>\"I think not!\"</span>")
|
|
user.Paralyze(60)
|
|
return
|
|
to_chat(user, "<span class='danger'>The Bluespace interfaces of the two devices catastrophically malfunction!</span>")
|
|
qdel(W)
|
|
playsound(loccheck,'sound/effects/supermatter.ogg', 200, TRUE)
|
|
|
|
message_admins("[ADMIN_LOOKUPFLW(user)] detonated a bag of holding at [ADMIN_VERBOSEJMP(loccheck)].")
|
|
log_game("[key_name(user)] detonated a bag of holding at [loc_name(loccheck)].")
|
|
|
|
user.gib(TRUE, TRUE, TRUE)
|
|
new/obj/singularity/boh_tear(loccheck)
|
|
qdel(A)
|
|
return
|
|
. = ..()
|