Skip to content

Commit

Permalink
[MIRROR] Toilet and urinal updates (flushing dead fish included) (#2788
Browse files Browse the repository at this point in the history
…) (#3592)

* Toilet and urinal updates (flushing dead fish included) (#83490)

## About The Pull Request

I split the water closets file into a folder for all the different
structures and also did a few other things
1. Remakes tgstation/tgstation#81914
2. Reworks toilets, it’s now Alt Click to open/close the cover, left
click takes things out of the toilet and cistern, right click flushes
3. You can now put dead fish in the toilet to flush it
4. Adds context tips to toilets. 

## Why It's Good For The Game

When I was a 7 year old boy, I had a friend goldfish named Jeremy. He
was my greatest friend until one day when my brother told me it’s for
babies and flushed him alive down the toilet, and I’ve never seen it
again.

Closes tgstation/tgstation#81903
Lets you flush down people’s fish in the toilet, and re-experience their
loss.

This was inspired by my lawyer fish PR, to add things more on the
non-fishing side of fish.

## Changelog

:cl:
add: You can now flush toilets. You can also put fish in the toilet. And
flush them.
fix: Urinals can no longer be used to delete items.
fix: Urinals no longer grant infinite urinal cakes. 
/:cl:

---------




* Toilet and urinal updates (flushing dead fish included)

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: John Willard <[email protected]>
Co-authored-by: Jacquerel <[email protected]>
Co-authored-by: GoldenAlpharex <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
6 people authored Jun 2, 2024
1 parent 6304d08 commit ee625c4
Show file tree
Hide file tree
Showing 14 changed files with 1,020 additions and 882 deletions.
4 changes: 2 additions & 2 deletions _maps/map_files/IceBoxStation/IceBoxStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -21086,7 +21086,7 @@
/area/station/command/meeting_room)
"gnR" = (
/obj/structure/toilet/greyscale{
cistern = 1;
cistern_open = 1;
dir = 1
},
/obj/machinery/light/small/directional/south,
Expand Down Expand Up @@ -54761,7 +54761,7 @@
/area/station/engineering/storage_shared)
"qrq" = (
/obj/structure/toilet/greyscale{
cistern = 1;
cistern_open = 1;
dir = 1
},
/obj/effect/spawner/random/entertainment/cigar,
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/Mining/Lavaland.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5489,7 +5489,7 @@
/area/mine/lounge)
"Hz" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/toilet/secret{
/obj/structure/toilet{
dir = 4
},
/obj/effect/mob_spawn/corpse/human/skeleton,
Expand Down
16 changes: 16 additions & 0 deletions code/game/objects/items/clown_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,22 @@
M.emote("flip")
COOLDOWN_START(src, golden_horn_cooldown, 1 SECONDS)

/obj/item/bikehorn/rubberducky/plasticducky
name = "plastic ducky"
desc = "It's a cheap plastic knockoff of a loveable bathtime toy."
custom_materials = list(/datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT)

/obj/item/bikehorn/rubberducky
name = "rubber ducky"
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl
icon = 'icons/obj/watercloset.dmi'
icon_state = "rubberducky"
inhand_icon_state = "rubberducky"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
worn_icon_state = "duck"
sound_file = 'sound/effects/quack.ogg'

//canned laughter
/obj/item/reagent_containers/cup/soda_cans/canned_laughter
name = "Canned Laughter"
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
icon_state = ""
GLOB.cameranet.updateVisibility(src)

/obj/structure/Destroy()
/obj/structure/Destroy(force)
GLOB.cameranet.updateVisibility(src)
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
QUEUE_SMOOTH_NEIGHBORS(src)
Expand Down
156 changes: 156 additions & 0 deletions code/game/objects/structures/curtains.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
/**
* Shower Curtains
*/
/obj/structure/curtain
name = "curtain"
desc = "Contains less than 1% mercury."
icon = 'icons/obj/watercloset.dmi'
icon_state = "bathroom-open"
color = "#ACD1E9" //Default color, didn't bother hardcoding other colors, mappers can and should easily change it.
alpha = 200 //Mappers can also just set this to 255 if they want curtains that can't be seen through
layer = SIGN_LAYER
anchored = TRUE
opacity = FALSE
density = FALSE
/// used in making the icon state
var/icon_type = "bathroom"
var/open = TRUE
/// if it can be seen through when closed
var/opaque_closed = FALSE

/obj/structure/curtain/Initialize(mapload)
// see-through curtains should let emissives shine through
if(!opaque_closed)
blocks_emissive = EMISSIVE_BLOCK_NONE
return ..()

/obj/structure/curtain/proc/toggle()
open = !open
if(open)
layer = SIGN_LAYER
set_opacity(FALSE)
else
layer = WALL_OBJ_LAYER
if(opaque_closed)
set_opacity(TRUE)

update_appearance()

/obj/structure/curtain/update_icon_state()
icon_state = "[icon_type]-[open ? "open" : "closed"]"
return ..()

/obj/structure/curtain/attackby(obj/item/W, mob/user)
if (istype(W, /obj/item/toy/crayon))
color = input(user,"","Choose Color",color) as color
else
return ..()

/obj/structure/curtain/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 5 SECONDS)
return TRUE

/obj/structure/curtain/wirecutter_act(mob/living/user, obj/item/I)
..()
if(anchored)
return TRUE

user.visible_message(span_warning("[user] cuts apart [src]."),
span_notice("You start to cut apart [src]."), span_hear("You hear cutting."))
if(I.use_tool(src, user, 50, volume=100) && !anchored)
to_chat(user, span_notice("You cut apart [src]."))
deconstruct()

return TRUE


/obj/structure/curtain/attack_hand(mob/user, list/modifiers)
. = ..()
if(.)
return
playsound(loc, 'sound/effects/curtain.ogg', 50, TRUE)
toggle()

/obj/structure/curtain/atom_deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/cloth (loc, 2)
new /obj/item/stack/sheet/plastic (loc, 2)
new /obj/item/stack/rods (loc, 1)

/obj/structure/curtain/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src.loc, 'sound/weapons/slash.ogg', 80, TRUE)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE)
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 80, TRUE)

/obj/structure/curtain/bounty
icon_type = "bounty"
icon_state = "bounty-open"
color = null
alpha = 255
opaque_closed = TRUE

/obj/structure/curtain/bounty/start_closed
icon_state = "bounty-closed"

/obj/structure/curtain/bounty/start_closed/Initialize(mapload)
. = ..()
if(open)
toggle()

/obj/structure/curtain/cloth
color = null
alpha = 255
opaque_closed = TRUE

/obj/structure/curtain/cloth/atom_deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/cloth (loc, 4)
new /obj/item/stack/rods (loc, 1)

/obj/structure/curtain/cloth/fancy
icon_type = "cur_fancy"
icon_state = "cur_fancy-open"

/obj/structure/curtain/cloth/fancy/mechanical
var/id = null

/obj/structure/curtain/cloth/fancy/mechanical/Destroy()
GLOB.curtains -= src
return ..()

/obj/structure/curtain/cloth/fancy/mechanical/Initialize(mapload)
. = ..()
GLOB.curtains += src

/obj/structure/curtain/cloth/fancy/mechanical/connect_to_shuttle(mapload, obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
id = "[port.shuttle_id]_[id]"

/obj/structure/curtain/cloth/fancy/mechanical/proc/open()
icon_state = "[icon_type]-open"
layer = SIGN_LAYER
SET_PLANE_IMPLICIT(src, GAME_PLANE)
set_density(FALSE)
open = TRUE
set_opacity(FALSE)

/obj/structure/curtain/cloth/fancy/mechanical/proc/close()
icon_state = "[icon_type]-closed"
layer = WALL_OBJ_LAYER
set_density(TRUE)
open = FALSE
if(opaque_closed)
set_opacity(TRUE)

/obj/structure/curtain/cloth/fancy/mechanical/attack_hand(mob/user, list/modifiers)
return

/obj/structure/curtain/cloth/fancy/mechanical/start_closed
icon_state = "cur_fancy-closed"

/obj/structure/curtain/cloth/fancy/mechanical/start_closed/Initialize(mapload)
. = ..()
close()
Loading

0 comments on commit ee625c4

Please sign in to comment.