Porting updates related to material datums. (#12317)

* Porting updates related to material datums.

* art_type

* oh oh
This commit is contained in:
Ghom
2020-05-25 23:21:00 +02:00
committed by GitHub
parent e11908a357
commit 85186a9714
64 changed files with 2542 additions and 208 deletions
+3
View File
@@ -51,6 +51,7 @@
icon = 'icons/obj/contraband.dmi'
plane = ABOVE_WALL_PLANE
anchored = TRUE
buildable_sign = FALSE //Cannot be unwrenched from a wall.
var/ruined = FALSE
var/random_basetype
var/never_random = FALSE // used for the 'random' subclasses.
@@ -69,6 +70,8 @@
name = "poster - [name]"
desc = "A large piece of space-resistant printed paper. [desc]"
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 300)), 0)
/obj/structure/sign/poster/proc/randomise(base_type)
var/list/poster_types = subtypesof(base_type)
var/list/approved_types = list()
@@ -5,6 +5,7 @@
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one?
var/beauty = 0
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
. = ..()
@@ -26,6 +27,8 @@
if(LAZYLEN(diseases_to_add))
AddComponent(/datum/component/infective, diseases_to_add)
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, beauty)), 0)
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
if(mergeable_decal)
qdel(C)
@@ -3,6 +3,7 @@
name = "xeno blood"
desc = "It's green and acidic. It looks like... <i>blood?</i>"
color = BLOOD_COLOR_XENO
beauty = -250
/obj/effect/decal/cleanable/blood/splatter/xeno
color = BLOOD_COLOR_XENO
@@ -7,6 +7,7 @@
blood_state = BLOOD_STATE_BLOOD
bloodiness = BLOOD_AMOUNT_PER_DECAL
color = BLOOD_COLOR_HUMAN //default so we don't have white splotches everywhere.
beauty = -100
/obj/effect/decal/cleanable/blood/replace_decal(obj/effect/decal/cleanable/blood/C)
if (C.blood_DNA)
@@ -45,12 +46,14 @@
icon_state = "tracks"
desc = "They look like tracks left by wheels."
random_icon_states = null
beauty = -50
/obj/effect/decal/cleanable/trail_holder //not a child of blood on purpose
name = "blood"
icon_state = "ltrails_1"
desc = "Your instincts say you shouldn't be following these."
random_icon_states = null
beauty = -50
var/list/existing_dirs = list()
/obj/effect/decal/cleanable/trail_holder/update_icon()
@@ -3,6 +3,7 @@
desc = "Someone should clean that up."
icon = 'icons/obj/objects.dmi'
icon_state = "shards"
beauty = -50
/obj/effect/decal/cleanable/ash
name = "ashes"
@@ -10,6 +11,7 @@
icon = 'icons/obj/objects.dmi'
icon_state = "ash"
mergeable_decal = FALSE
beauty = -50
/obj/effect/decal/cleanable/ash/Initialize()
. = ..()
@@ -24,6 +26,7 @@
/obj/effect/decal/cleanable/ash/large
name = "large pile of ashes"
icon_state = "big_ash"
beauty = -100
/obj/effect/decal/cleanable/ash/large/Initialize()
. = ..()
@@ -34,6 +37,7 @@
desc = "Back to sand."
icon = 'icons/obj/shards.dmi'
icon_state = "tiny"
beauty = -100
/obj/effect/decal/cleanable/glass/Initialize()
. = ..()
@@ -52,6 +56,7 @@
canSmoothWith = list(/obj/effect/decal/cleanable/dirt, /turf/closed/wall, /obj/structure/falsewall)
smooth = SMOOTH_FALSE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
beauty = -75
/obj/effect/decal/cleanable/dirt/Initialize()
. = ..()
@@ -72,6 +77,10 @@
desc = "It's still good. Four second rule!"
icon_state = "flour"
/obj/effect/decal/cleanable/dirt/dust
name = "dust"
desc = "A thin layer of dust coating the floor."
/obj/effect/decal/cleanable/greenglow/ecto
name = "ectoplasmic puddle"
desc = "You know who to call."
@@ -80,8 +89,11 @@
/obj/effect/decal/cleanable/greenglow
name = "glowing goo"
desc = "Jeez. I hope that's not for lunch."
light_power = 1
light_range = 1
light_color = LIGHT_COLOR_GREEN
icon_state = "greenglow"
beauty = -300
/obj/effect/decal/cleanable/greenglow/Initialize(mapload)
. = ..()
@@ -97,6 +109,7 @@
layer = WALL_OBJ_LAYER
icon_state = "cobweb1"
resistance_flags = FLAMMABLE
beauty = -100
/obj/effect/decal/cleanable/cobweb/cobweb2
icon_state = "cobweb2"
@@ -108,10 +121,12 @@
icon = 'icons/effects/effects.dmi'
icon_state = "molten"
mergeable_decal = FALSE
beauty = -150
/obj/effect/decal/cleanable/molten_object/large
name = "big gooey grey mass"
icon_state = "big_molten"
beauty = -300
//Vomit (sorry)
/obj/effect/decal/cleanable/vomit
@@ -120,6 +135,7 @@
icon = 'icons/effects/blood.dmi'
icon_state = "vomit_1"
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
beauty = -150
/obj/effect/decal/cleanable/vomit/attack_hand(mob/user)
. = ..()
@@ -152,6 +168,7 @@
gender = NEUTER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
beauty = -100
/obj/effect/decal/cleanable/plant_smudge
name = "plant smudge"
@@ -10,6 +10,7 @@
blood_state = BLOOD_STATE_OIL
bloodiness = BLOOD_AMOUNT_PER_DECAL
mergeable_decal = FALSE
beauty = -50
/obj/effect/decal/cleanable/robot_debris/Initialize(mapload, list/datum/disease/diseases)
. = ..()
@@ -50,6 +51,7 @@
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
blood_state = BLOOD_STATE_OIL
bloodiness = BLOOD_AMOUNT_PER_DECAL
beauty = -100
/obj/effect/decal/cleanable/oil/Initialize()
. = ..()
@@ -58,6 +60,7 @@
/obj/effect/decal/cleanable/oil/streak
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
beauty = -50
/obj/effect/decal/cleanable/oil/slippery
+3 -2
View File
@@ -104,10 +104,10 @@
desc = "An occult looking dagger that is cold to the touch. Somehow, the flawless orb on the pommel is made entirely of liquid blood."
icon = 'icons/obj/ice_moon/artifacts.dmi'
icon_state = "bloodletter"
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_NORMAL
/// Bleed stacks applied when an organic mob target is hit
var/bleed_stacks_per_hit = 3
/obj/item/kitchen/knife/bloodletter/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!isliving(target) || !proximity_flag)
@@ -198,6 +198,7 @@
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 1.5)
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
custom_price = 200
+1 -1
View File
@@ -274,7 +274,7 @@ obj/item/shield/riot/bullet_proof
item_state = "buckler"
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
custom_materials = null
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 10)
resistance_flags = FLAMMABLE
repair_material = /obj/item/stack/sheet/mineral/wood
block_chance = 30
@@ -279,11 +279,13 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
icon_state = "sheet-wood"
item_state = "sheet-wood"
icon = 'icons/obj/stack_objects.dmi'
custom_materials = list(/datum/material/wood=MINERAL_MATERIAL_AMOUNT)
sheettype = "wood"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/mineral/wood
novariants = TRUE
material_type = /datum/material/wood
grind_results = list(/datum/reagent/carbon = 20)
/obj/item/stack/sheet/mineral/wood/attackby(obj/item/W, mob/user, params) // NOTE: sheet_types.dm is where the WOOD stack lives. Maybe move this over there.
+7 -5
View File
@@ -14,13 +14,15 @@
var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not
var/datum/effect_system/trail_follow/ion/ion_trail
/obj/item/tank/jetpack/New()
/obj/item/tank/jetpack/Initialize()
..()
ion_trail = new
ion_trail.set_up(src)
/obj/item/tank/jetpack/populate_gas()
if(gas_type)
air_contents.gases[gas_type] = ((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
ion_trail = new
ion_trail.set_up(src)
/obj/item/tank/jetpack/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_jetpack))
@@ -188,8 +190,8 @@
var/obj/item/tank/internals/tank = null
var/mob/living/carbon/human/cur_user
/obj/item/tank/jetpack/suit/New()
..()
/obj/item/tank/jetpack/suit/Initialize()
. = ..()
STOP_PROCESSING(SSobj, src)
temp_air_contents = air_contents
+23 -26
View File
@@ -12,15 +12,13 @@
*/
/obj/item/tank/internals/oxygen
name = "oxygen tank"
desc = "A tank of oxygen."
desc = "A tank of oxygen, this one is blue."
icon_state = "oxygen"
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/oxygen/New()
..()
/obj/item/tank/internals/oxygen/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -35,6 +33,8 @@
icon_state = "oxygen_fr"
dog_fashion = null
/obj/item/tank/internals/oxygen/empty/populate_gas()
return
/*
* Anesthetic
@@ -46,11 +46,9 @@
item_state = "an_tank"
force = 10
/obj/item/tank/internals/anesthetic/New()
..()
/obj/item/tank/internals/anesthetic/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrous_oxide] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
* Air
@@ -63,11 +61,9 @@
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/air/New()
..()
/obj/item/tank/internals/air/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrogen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
@@ -82,10 +78,8 @@
force = 8
/obj/item/tank/internals/plasma/New()
..()
/obj/item/tank/internals/plasma/populate_gas()
air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/flamethrower))
@@ -100,10 +94,8 @@
else
return ..()
/obj/item/tank/internals/plasma/full/New()
..() // Plasma asserted in parent
/obj/item/tank/internals/plasma/full/populate_gas()
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/*
@@ -118,13 +110,10 @@
force = 10
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/internals/plasmaman/New()
..()
/obj/item/tank/internals/plasmaman/populate_gas()
air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/full/New()
..() // Plasma asserted in parent
/obj/item/tank/internals/plasmaman/full/populate_gas()
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -137,12 +126,12 @@
volume = 6
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/tank/internals/plasmaman/belt/full/New()
..() // Plasma asserted in parent
/obj/item/tank/internals/plasmaman/belt/full/populate_gas()
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/belt/empty/populate_gas()
return
/*
* Emergency Oxygen
@@ -159,17 +148,25 @@
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
/obj/item/tank/internals/emergency_oxygen/New()
..()
/obj/item/tank/internals/emergency_oxygen/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/emergency_oxygen/empty/populate_gas()
return
/obj/item/tank/internals/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
icon_state = "emergency_engi"
volume = 6
/obj/item/tank/internals/emergency_oxygen/engi/empty/populate_gas()
return
/obj/item/tank/internals/emergency_oxygen/double
name = "double emergency oxygen tank"
icon_state = "emergency_double"
volume = 10
/obj/item/tank/internals/emergency_oxygen/double/empty/populate_gas()
return
+9 -4
View File
@@ -60,14 +60,19 @@
H.update_action_buttons_icon()
/obj/item/tank/New()
..()
/obj/item/tank/Initialize()
. = ..()
air_contents = new(volume) //liters
air_contents.temperature = T20C
populate_gas()
START_PROCESSING(SSobj, src)
/obj/item/tank/proc/populate_gas()
return
/obj/item/tank/Destroy()
if(air_contents)
qdel(air_contents)
@@ -78,9 +83,9 @@
/obj/item/tank/examine(mob/user)
var/obj/icon = src
. = ..()
if (istype(src.loc, /obj/item/assembly))
if(istype(src.loc, /obj/item/assembly))
icon = src.loc
if(!in_range(src, user))
if(!in_range(src, user) && !isobserver(user))
if (icon == src)
. += "<span class='notice'>If you want any more information you'll need to get closer.</span>"
return
+5 -12
View File
@@ -477,20 +477,12 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
throw_speed = 5
throw_range = 2
attack_verb = list("busted")
var/impressiveness = 45
/obj/item/statuebust/attack_self(mob/living/user)
add_fingerprint(user)
user.examinate(src)
/obj/item/statuebust/examine(mob/living/user)
/obj/item/statuebust/Initialize()
. = ..()
if(.)
return
if (!isliving(user))
return
user.visible_message("[user] stops to admire [src].", \
"<span class='notice'>You take in [src], admiring its fine craftsmanship.</span>")
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artgood", /datum/mood_event/artgood)
AddElement(/datum/element/art, impressiveness)
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 1000)), 0)
/obj/item/tailclub
name = "tail club"
@@ -566,6 +558,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
force = 10
throwforce = 12
attack_verb = list("beat", "smacked")
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 3.5)
w_class = WEIGHT_CLASS_BULKY
var/homerun_ready = 0
var/homerun_able = 0
+1 -1
View File
@@ -240,7 +240,7 @@
/obj/structure/sign/painting/Initialize(mapload, dir, building)
. = ..()
SSpersistence.painting_frames += src
AddComponent(/datum/component/art, 20)
AddElement(/datum/element/art, 20)
if(dir)
setDir(dir)
if(building)
@@ -261,6 +261,11 @@ LINEN BINS
var/list/sheets = list()
var/obj/item/hidden = null
/obj/structure/bedsheetbin/empty
amount = 0
icon_state = "linenbin-empty"
anchored = FALSE
/obj/structure/bedsheetbin/examine(mob/user)
. = ..()
if(amount < 1)
+1
View File
@@ -303,6 +303,7 @@
/obj/item/twohanded/required/kirbyplants/Initialize()
. = ..()
AddElement(/datum/element/tactical)
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 500)), 0)
/obj/item/twohanded/required/kirbyplants/random
icon = 'icons/obj/flora/_flora.dmi'
@@ -36,6 +36,7 @@
"<span class='notice'>You unfasten [src].</span>")
var/obj/item/sign_backing/SB = new (get_turf(user))
SB.icon_state = icon_state
SB.set_custom_materials(custom_materials) //This is here so picture frames and wooden things don't get messed up.
SB.sign_path = type
SB.setDir(dir)
qdel(src)
@@ -46,3 +46,4 @@
name = "Mr. Deempisi portrait"
desc = "Under the painting a plaque reads: 'While the meat grinder may not have spared you, fear not. Not one part of you has gone to waste... You were delicious.'"
icon_state = "monkey_painting"
custom_materials = list(/datum/material/wood = 2000) //The same as /obj/structure/sign/picture_frame
@@ -73,3 +73,8 @@
name = "\improper ENGINEERING SAFETY"
desc = "A sign detailing the various safety protocols when working on-site to ensure a safe shift."
icon_state = "safety"
/obj/structure/sign/warning/explosives
name = "\improper HIGH EXPLOSIVES sign"
desc = "A warning sign which reads 'HIGH EXPLOSIVES'."
icon_state = "explosives"
+6 -23
View File
@@ -11,6 +11,12 @@
var/impressiveness = 15
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/structure/statue/Initialize()
. = ..()
AddElement(/datum/element/art, impressiveness)
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, impressiveness * 75)), 0)
/obj/structure/statue/attackby(obj/item/W, mob/living/user, params)
add_fingerprint(user)
if(!(flags_1 & NODECONSTRUCT_1))
@@ -29,29 +35,6 @@
return
return ..()
/obj/structure/statue/attack_hand(mob/living/user)
. = ..()
if(.)
return
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
if(!do_after(user, 20, target = src))
return
user.visible_message("[user] rubs some dust off [src].", \
"<span class='notice'>You take in [src], rubbing some dust off its surface.</span>")
if(!ishuman(user)) // only humans have the capacity to appreciate art
return
var/totalimpressiveness = (impressiveness *(obj_integrity/max_integrity))
switch(totalimpressiveness)
if(GREAT_ART to 100)
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artgreat", /datum/mood_event/artgreat)
if (GOOD_ART to GREAT_ART)
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artgood", /datum/mood_event/artgood)
if (BAD_ART to GOOD_ART)
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artok", /datum/mood_event/artok)
if (0 to BAD_ART)
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artbad", /datum/mood_event/artbad)
/obj/structure/statue/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(material_drop_type)
+53 -4
View File
@@ -11,6 +11,8 @@
var/cistern = 0 //if the cistern bit is open
var/w_items = 0 //the combined w_class of all the items in the cistern
var/mob/living/swirlie = null //the mob being given a swirlie
var/buildstacktype = /obj/item/stack/sheet/metal //they're metal now, shut up
var/buildstackamount = 1
/obj/structure/toilet/Initialize()
. = ..()
@@ -72,7 +74,18 @@
/obj/structure/toilet/update_icon_state()
icon_state = "toilet[open][cistern]"
/obj/structure/toilet/deconstruct()
if(!(flags_1 & NODECONSTRUCT_1))
if(buildstacktype)
new buildstacktype(loc,buildstackamount)
else
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(loc, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
..()
/obj/structure/toilet/attackby(obj/item/I, mob/living/user, params)
add_fingerprint(user)
if(istype(I, /obj/item/crowbar))
to_chat(user, "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...</span>")
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
@@ -80,7 +93,9 @@
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "<span class='italics'>You hear grinding porcelain.</span>")
cistern = !cistern
update_icon()
else if(I.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
I.play_tool_sound(src)
deconstruct()
else if(cistern)
if(user.a_intent != INTENT_HARM)
if(I.w_class > WEIGHT_CLASS_NORMAL)
@@ -95,6 +110,10 @@
w_items += I.w_class
to_chat(user, "<span class='notice'>You carefully place [I] into the cistern.</span>")
if(istype(I, /obj/item/reagent_containers/food/snacks/cube))
var/obj/item/reagent_containers/food/snacks/cube/cube = I
cube.Expand()
return
else if(istype(I, /obj/item/reagent_containers))
if (!open)
return
@@ -130,6 +149,11 @@
/obj/structure/toilet/secret/prison
secret_type = /obj/effect/spawner/lootdrop/prison_loot_toilet
/obj/structure/toilet/greyscale
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
buildstacktype = null
/obj/structure/urinal
name = "urinal"
desc = "The HU-452, an experimental urinal. Comes complete with experimental urinal cake."
@@ -459,6 +483,8 @@
anchored = TRUE
var/busy = FALSE //Something's being washed at the moment
var/dispensedreagent = /datum/reagent/water // for whenever plumbing happens
var/buildstacktype = /obj/item/stack/sheet/metal
var/buildstackamount = 1
/obj/structure/sink/attack_hand(mob/living/user)
. = ..()
@@ -537,6 +563,11 @@
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
return
if(O.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
O.play_tool_sound(src)
deconstruct()
return
if(istype(O, /obj/item/stack/medical/gauze))
var/obj/item/stack/medical/gauze/G = O
new /obj/item/reagent_containers/rag(src.loc)
@@ -568,9 +599,18 @@
else
return ..()
/obj/structure/sink/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 3)
qdel(src)
/obj/structure/sink/deconstruct()
if(!(flags_1 & NODECONSTRUCT_1))
drop_materials()
..()
/obj/structure/sink/proc/drop_materials()
if(buildstacktype)
new buildstacktype(loc,buildstackamount)
else
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(loc, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
/obj/structure/sink/kitchen
name = "kitchen sink"
@@ -655,6 +695,11 @@
icon_state = "puddle"
resistance_flags = UNACIDABLE
/obj/structure/sink/greyscale
icon_state = "sink_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
buildstacktype = null
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/structure/sink/puddle/attack_hand(mob/M)
icon_state = "puddle-splash"
@@ -669,6 +714,10 @@
/obj/structure/sink/puddle/deconstruct(disassembled = TRUE)
qdel(src)
/obj/structure/sink/greyscale
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
buildstacktype = null
//Shower Curtains//
//Defines used are pre-existing in layers.dm//