mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 17:14:47 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
118 lines
4.5 KiB
Plaintext
118 lines
4.5 KiB
Plaintext
/obj/structure/toiletbong
|
|
name = "toilet bong"
|
|
desc = "A repurposed toilet with re-arranged piping and an attached flamethrower. Why would anyone build this?"
|
|
icon = 'icons/obj/watercloset.dmi'
|
|
icon_state = "toiletbong"
|
|
base_icon_state = "toiletbong"
|
|
density = FALSE
|
|
anchored = TRUE
|
|
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.05, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.8)
|
|
var/smokeradius = 1
|
|
var/mutable_appearance/weed_overlay
|
|
|
|
/obj/structure/toiletbong/Initialize(mapload)
|
|
. = ..()
|
|
AddElement(/datum/element/simple_rotation, post_rotation_proccall = PROC_REF(post_rotation))
|
|
create_storage(storage_type = /datum/storage/toiletbong)
|
|
|
|
weed_overlay = mutable_appearance('icons/obj/watercloset.dmi', "[base_icon_state]_overlay")
|
|
START_PROCESSING(SSobj, src)
|
|
|
|
/obj/structure/toiletbong/on_craft_completion(list/components, datum/crafting_recipe/current_recipe, atom/crafter)
|
|
var/obj/structure/toilet/toilet = locate(/obj/structure/toilet) in components
|
|
if(toilet)
|
|
for(var/obj/item/cistern_item in toilet.contents)
|
|
cistern_item.forceMove(crafter.drop_location())
|
|
to_chat(crafter, span_warning("[cistern_item] falls out of the toilet!"))
|
|
setDir(toilet.dir)
|
|
forceMove(toilet.loc)
|
|
|
|
crafter.visible_message(
|
|
span_notice("[crafter] attaches the flamethrower to the repurposed toilet."),
|
|
span_notice("You attach the flamethrower to the repurposed toilet."),
|
|
)
|
|
return ..()
|
|
|
|
/obj/structure/toiletbong/update_overlays()
|
|
. = ..()
|
|
if (LAZYLEN(contents))
|
|
. += weed_overlay
|
|
|
|
/obj/structure/toiletbong/attack_hand(mob/living/carbon/user)
|
|
. = ..()
|
|
if (!anchored)
|
|
user.balloon_alert(user, "secure it first!")
|
|
return
|
|
if (!LAZYLEN(contents))
|
|
user.balloon_alert(user, "it's empty!")
|
|
return
|
|
user.visible_message(span_boldnotice("[user] takes a huge drag on the [src]."))
|
|
if (!do_after(user, 2 SECONDS, target = src))
|
|
return
|
|
var/turf/toiletbong_location = loc
|
|
toiletbong_location.hotspot_expose(1000, 5)
|
|
for (var/obj/item/item in contents)
|
|
if (item.resistance_flags & INDESTRUCTIBLE)
|
|
user.balloon_alert(user, "[item.name] is blocking the pipes!")
|
|
continue
|
|
playsound(src, 'sound/items/modsuit/flamethrower.ogg', 50)
|
|
|
|
var/smoke_amount = DIAMOND_AREA(smokeradius)
|
|
do_chem_smoke(amount = smoke_amount, holder = src, location = loc, carry = item.reagents, carry_limit = 20, smoke_type = /datum/effect_system/fluid_spread/smoke/chem/smoke_machine)
|
|
if (prob(5) && !(obj_flags & EMAGGED))
|
|
if(user.get_liked_foodtypes() & GORE)
|
|
user.balloon_alert(user, "a hidden treat!")
|
|
user.visible_message(span_danger("[user] fishes a mouse out of the pipes."))
|
|
else
|
|
to_chat(user, span_userdanger("There was something disgusting in the pipes!"))
|
|
user.visible_message(span_danger("[user] spits out a mouse."))
|
|
user.adjust_disgust(50)
|
|
user.vomit(VOMIT_CATEGORY_DEFAULT)
|
|
var/mob/living/spawned_mob = new /mob/living/basic/mouse(get_turf(user))
|
|
spawned_mob.add_faction("[REF(user)]")
|
|
if(prob(50))
|
|
for(var/j in 1 to rand(1, 3))
|
|
step(spawned_mob, pick(NORTH,SOUTH,EAST,WEST))
|
|
qdel(item)
|
|
if(!(obj_flags & EMAGGED))
|
|
break
|
|
update_appearance(UPDATE_ICON)
|
|
|
|
/obj/structure/toiletbong/wrench_act(mob/living/user, obj/item/tool)
|
|
default_unfasten_wrench(user, tool)
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
///Called in the simple rotation's post_rotation callback, playing a sound cue to players.
|
|
/obj/structure/toiletbong/proc/post_rotation(mob/user, degrees)
|
|
playsound(src, 'sound/items/deconstruct.ogg', 50)
|
|
|
|
/obj/structure/toiletbong/crowbar_act(mob/living/user, obj/item/tool)
|
|
if(anchored)
|
|
return FALSE
|
|
tool.play_tool_sound(src)
|
|
to_chat(user, span_notice("You begin taking apart the [src]."))
|
|
if (!do_after(user, 10 SECONDS, target = src))
|
|
return FALSE
|
|
new /obj/item/flamethrower(get_turf(src))
|
|
var/obj/item/tank/internals/plasma/ptank = new /obj/item/tank/internals/plasma(get_turf(src))
|
|
ptank.air_contents.set_gas(/datum/gas/plasma, 0)
|
|
drop_custom_materials()
|
|
qdel(src)
|
|
return TRUE
|
|
|
|
/obj/structure/toiletbong/emag_act(mob/user, obj/item/card/emag/emag_card)
|
|
if(obj_flags & EMAGGED)
|
|
return FALSE
|
|
obj_flags |= EMAGGED
|
|
smokeradius = 2
|
|
playsound(src, 'sound/effects/fish_splash.ogg', 50)
|
|
balloon_alert(user, "toilet broke")
|
|
if (emag_card)
|
|
to_chat(user, span_boldwarning("The [emag_card] falls into the toilet. You fish it back out. Looks like you broke the toilet."))
|
|
return TRUE
|
|
|
|
/obj/structure/toiletbong/attackby(obj/item/attacking_item, mob/user, list/modifiers, list/attack_modifiers)
|
|
if(istype(attacking_item, /obj/item/card/emag))
|
|
return
|
|
return ..()
|