Porting updates related to material datums. (#12317)
* Porting updates related to material datums. * art_type * oh oh
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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//
|
||||
|
||||
|
||||
Reference in New Issue
Block a user