Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion code/__DEFINES/{yogs_defines}/components.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define COMSIG_ALT_CLICK_ON "alt_click_on" //from base of mob/AltClickOn(): (atom/A)
#define COMSIG_ATOM_POINTED_AT "atom_pointed_at" //from base of atom/pointed_at(): (mob/user)
#define COMSIG_PROCESS_MOVE "process_move" //from base of client/Move(): (num/direction)
#define COMSIG_PROCESS_MOVE "process_move" //from base of client/Move(): (num/direction)
#define COMSIG_STORAGE_INSERTED "storage_inserted" //from base of /datum/component/storage/handle_item_insertion(): (obj/item/I, mob/M)
#define COMSIG_STORAGE_REMOVED "storage_removed" //from base of /datum/component/storage/remove_from_storage(): (atom/movable/AM, atom/new_location)
2 changes: 1 addition & 1 deletion config/private_default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ENABLE_LOCALHOST_RANK
TICK_LIMIT_MC_INIT 500

## Should SQL be enabled? Uncomment to enable
SQL_ENABLED
#SQL_ENABLED

## Should discord based MFA be enabled for admins? Uncomment to enable
#MFA_ENABLED
Expand Down
2 changes: 2 additions & 0 deletions yogstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3306,6 +3306,8 @@
#include "yogstation\code\game\objects\structures\ladders.dm"
#include "yogstation\code\game\objects\structures\table_frames.dm"
#include "yogstation\code\game\objects\structures\tables_racks.dm"
#include "yogstation\code\game\objects\structures\toilet_bong.dm"
#include "yogstation\code\game\objects\structures\watercloset.dm"
#include "yogstation\code\game\objects\structures\window.dm"
#include "yogstation\code\game\objects\structures\bar_stuff\bar_stuff.dm"
#include "yogstation\code\game\objects\structures\beds_chairs\chair.dm"
Expand Down
10 changes: 10 additions & 0 deletions yogstation/code/datums/components/storage/storage.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/datum/component/storage/handle_item_insertion(obj/item/I, prevent_warning = FALSE, mob/M, datum/component/storage/remote)
. = ..()
if (.)
SEND_SIGNAL(parent, COMSIG_STORAGE_INSERTED, I, M)

/datum/component/storage/remove_from_storage(atom/movable/AM, atom/new_location)
. = ..()
if (.)
SEND_SIGNAL(parent, COMSIG_STORAGE_REMOVED, AM, new_location)

/datum/component/storage/RemoveComponent() // hey TG you dropped this
UnregisterSignal(parent, COMSIG_CONTAINS_STORAGE)
UnregisterSignal(parent, COMSIG_IS_STORAGE_LOCKED)
Expand Down
55 changes: 55 additions & 0 deletions yogstation/code/game/objects/structures/toilet_bong.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/obj/structure/toilet_bong
name = "toilet bong"
desc = "It's a toilet that's been fitted into a bong. It is used for exactly what you think it's for."
icon = 'yogstation/icons/obj/watercloset.dmi'
icon_state = "toiletbong"
density = FALSE
anchored = TRUE
var/mutable_appearance/weed_overlay

/obj/structure/toilet_bong/Initialize()
. = ..()
weed_overlay = mutable_appearance('yogstation/icons/obj/watercloset.dmi', "weed")
START_PROCESSING(SSobj, src)

/obj/structure/toilet_bong/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = AddComponent(/datum/component/storage/concrete)
STR.attack_hand_interact = FALSE
STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/grown/cannabis, /obj/item/reagent_containers/food/snacks/grown/tobacco))
STR.max_w_class = WEIGHT_CLASS_SMALL
STR.max_combined_w_class = WEIGHT_CLASS_SMALL * 24
STR.max_items = 24
RegisterSignal(STR, COMSIG_STORAGE_INSERTED, .proc/update_icon)
RegisterSignal(STR, COMSIG_STORAGE_REMOVED, .proc/update_icon)

/obj/structure/toilet_bong/update_icon()
. = ..()
cut_overlays()
if (LAZYLEN(contents))
add_overlay(weed_overlay)

/obj/structure/toilet_bong/attack_hand(mob/user)
. = ..()
if (!LAZYLEN(contents))
to_chat(user, span_warning("[src] is empty!"))
return
if (do_after(user, 2 SECONDS, target = src))
var/obj/item/reagent_containers/boof = contents[1]
user.visible_message(span_boldnotice("[user] takes a huge rip from [src]!"), span_boldnotice("You take a huge rip from [src]!"))
var/smoke_spread = 1
if (prob(15))
user.visible_message(span_danger("[user] coughs while using [src], filling the area with smoke!"), span_userdanger("You cough while using [src], filling the area with smoke!"))
smoke_spread = 5
var/turf/location = get_turf(user)
var/datum/effect_system/smoke_spread/chem/smoke = new
smoke.attach(location)
smoke.set_up(boof.reagents, smoke_spread, location, silent = TRUE)
smoke.start()
qdel(boof)
update_icon()

// It's a bong powered by a **flamethrower**, it's definitely an open flame!!
/obj/structure/toilet_bong/process()
var/turf/location = get_turf(src)
location.hotspot_expose(700,2)
18 changes: 18 additions & 0 deletions yogstation/code/game/objects/structures/watercloset.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/obj/structure/toilet/attackby(obj/item/I, mob/living/user, params)
if (istype(I, /obj/item/flamethrower))
if (!user.is_holding_item_of_type(/obj/item/crowbar))
to_chat(user, span_warning("You need a crowbar to retrofit this toilet into a bong!"))
return
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
user.visible_message(span_notice("[user] begins to attach [I] to [src]..."), span_notice("You begin attaching [I] to [src]..."))
if (!do_after(user, 5 SECONDS, target = src))
return
for (var/obj/item/cistern_item in contents)
cistern_item.forceMove(loc)
visible_message(span_warning("[cistern_item] falls out of [src]!"))
var/obj/structure/toilet_bong/bong = new(loc)
bong.dir = dir
qdel(I)
qdel(src)
else
return ..()
Binary file added yogstation/icons/obj/watercloset.dmi
Binary file not shown.