mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
## About The Pull Request Thirty files changed, one's not really changed, one's actually just a copy of a change from a different pr, because for the sake of pipe cleaners I decided to change the base turf. Probably wasn't a good idea. This one contains the full set of `/turf/` `attackby()`s(besides those meant for attacks), converted all at once because the tree of turf subtypes looks a lot more like a spire than a bush. Changes beyond conversion: I added messaging for when you're crowbarring transit tube pods out of the tubes because I genuinely wasted half an hour trying to figure out what I'd done wrong in conversion because they don't look any different so I thought it wasn't working. If you're reinforcing plating and the plating is reinforced mid-reinforcement you will no longer waste your plasteel reinforcing the reinforced plating. ## Why It's Good For The Game what are we at, ~120? I was expecting this to be a lot more drawn out, but most of them are really small. I'm gonna have to do a final pass of calls to `attackby()` once the dust settles, but the end of non-attack `attackby()`s is just a week away.
121 lines
4.0 KiB
Plaintext
121 lines
4.0 KiB
Plaintext
/obj/structure/urinal
|
|
name = "urinal"
|
|
desc = "The HU-452, an experimental urinal. Comes complete with experimental urinal cake."
|
|
icon = 'icons/obj/watercloset.dmi'
|
|
icon_state = "urinal"
|
|
density = FALSE
|
|
anchored = TRUE
|
|
/// Can you currently put an item inside
|
|
var/exposed = FALSE
|
|
/// What's in the urinal
|
|
var/obj/item/hidden_item
|
|
|
|
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/urinal, 32)
|
|
|
|
/obj/structure/urinal/Initialize(mapload)
|
|
. = ..()
|
|
if(mapload)
|
|
hidden_item = new /obj/item/food/urinalcake(src)
|
|
find_and_mount_on_atom()
|
|
|
|
/obj/structure/urinal/Exited(atom/movable/gone, direction)
|
|
. = ..()
|
|
if(gone == hidden_item)
|
|
hidden_item = null
|
|
|
|
/obj/structure/urinal/attack_hand(mob/living/user, list/modifiers)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
if(user.pulling && isliving(user.pulling))
|
|
var/mob/living/grabbed_mob = user.pulling
|
|
if(user.grab_state >= GRAB_AGGRESSIVE)
|
|
if(grabbed_mob.loc != get_turf(src))
|
|
to_chat(user, span_notice("[grabbed_mob.name] needs to be on [src]."))
|
|
return
|
|
user.changeNext_move(CLICK_CD_MELEE)
|
|
user.visible_message(span_danger("[user] slams [grabbed_mob] into [src]!"), span_danger("You slam [grabbed_mob] into [src]!"))
|
|
grabbed_mob.emote("scream")
|
|
grabbed_mob.adjust_brute_loss(8)
|
|
else
|
|
to_chat(user, span_warning("You need a tighter grip!"))
|
|
return
|
|
|
|
if(exposed)
|
|
if(hidden_item)
|
|
to_chat(user, span_notice("You fish [hidden_item] out of the drain enclosure."))
|
|
user.put_in_hands(hidden_item)
|
|
else
|
|
to_chat(user, span_warning("There is nothing in the drain holder!"))
|
|
return
|
|
return ..()
|
|
|
|
/obj/structure/urinal/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
|
if(!exposed)
|
|
return NONE
|
|
|
|
if(hidden_item)
|
|
to_chat(user, span_warning("There is already something in the drain enclosure!"))
|
|
return ITEM_INTERACT_BLOCKING
|
|
|
|
if(tool.w_class > WEIGHT_CLASS_TINY)
|
|
to_chat(user, span_warning("[tool] is too large for the drain enclosure."))
|
|
return ITEM_INTERACT_BLOCKING
|
|
|
|
if(!user.transferItemToLoc(tool, src))
|
|
to_chat(user, span_warning("[tool] is stuck to your hand, you cannot put it in the drain enclosure!"))
|
|
return ITEM_INTERACT_BLOCKING
|
|
|
|
hidden_item = tool
|
|
to_chat(user, span_notice("You place [tool] into the drain enclosure."))
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/structure/urinal/screwdriver_act(mob/living/user, obj/item/I)
|
|
if(..())
|
|
return TRUE
|
|
to_chat(user, span_notice("You start to [exposed ? "screw the cap back into place" : "unscrew the cap to the drain protector"]..."))
|
|
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, TRUE)
|
|
if(I.use_tool(src, user, 20))
|
|
user.visible_message(span_notice("[user] [exposed ? "screws the cap back into place" : "unscrew the cap to the drain protector"]!"),
|
|
span_notice("You [exposed ? "screw the cap back into place" : "unscrew the cap on the drain"]!"),
|
|
span_hear("You hear metal and squishing noises."))
|
|
exposed = !exposed
|
|
return TRUE
|
|
|
|
/obj/structure/urinal/wrench_act_secondary(mob/living/user, obj/item/tool)
|
|
tool.play_tool_sound(user)
|
|
deconstruct(TRUE)
|
|
balloon_alert(user, "removed urinal")
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/structure/urinal/atom_deconstruct(disassembled = TRUE)
|
|
new /obj/item/wallframe/urinal(loc)
|
|
hidden_item?.forceMove(drop_location())
|
|
|
|
/obj/item/wallframe/urinal
|
|
name = "urinal frame"
|
|
desc = "An unmounted urinal. Attach it to a wall to use."
|
|
icon = 'icons/obj/watercloset.dmi'
|
|
icon_state = "urinal"
|
|
result_path = /obj/structure/urinal
|
|
pixel_shift = 32
|
|
|
|
/obj/item/food/urinalcake
|
|
name = "urinal cake"
|
|
desc = "The noble urinal cake, protecting the station's pipes from the station's pee. Do not eat."
|
|
icon = 'icons/obj/watercloset.dmi'
|
|
icon_state = "urinalcake"
|
|
w_class = WEIGHT_CLASS_TINY
|
|
food_reagents = list(
|
|
/datum/reagent/chlorine = 3,
|
|
/datum/reagent/ammonia = 1,
|
|
)
|
|
foodtypes = TOXIC | GROSS
|
|
preserved_food = TRUE
|
|
|
|
/obj/item/food/urinalcake/attack_self(mob/living/user)
|
|
user.visible_message(span_notice("[user] squishes [src]!"), span_notice("You squish [src]."), "<i>You hear a squish.</i>")
|
|
icon_state = "urinalcake_squish"
|
|
addtimer(VARSET_CALLBACK(src, icon_state, "urinalcake"), 0.8 SECONDS)
|