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
-56
View File
@@ -1,56 +0,0 @@
#define BAD_ART 12.5
#define GOOD_ART 25
#define GREAT_ART 50
/datum/component/art
var/impressiveness = 0
/datum/component/art/Initialize(impress)
impressiveness = impress
if(isobj(parent))
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_obj_examine)
else
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_other_examine)
if(isstructure(parent))
RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, .proc/on_attack_hand)
if(isitem(parent))
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/apply_moodlet)
/datum/component/art/proc/apply_moodlet(mob/M, impress)
M.visible_message("<span class='notice'>[M] stops and looks intently at [parent].</span>", \
"<span class='notice'>You stop to take in [parent].</span>")
switch(impress)
if (0 to BAD_ART)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artbad", /datum/mood_event/artbad)
if (BAD_ART to GOOD_ART)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artok", /datum/mood_event/artok)
if (GOOD_ART to GREAT_ART)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artgood", /datum/mood_event/artgood)
if(GREAT_ART to INFINITY)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artgreat", /datum/mood_event/artgreat)
/datum/component/art/proc/on_other_examine(datum/source, mob/M)
apply_moodlet(M, impressiveness)
/datum/component/art/proc/on_obj_examine(datum/source, mob/M)
var/obj/O = parent
apply_moodlet(M, impressiveness *(O.obj_integrity/O.max_integrity))
/datum/component/art/proc/on_attack_hand(datum/source, mob/M)
to_chat(M, "<span class='notice'>You start examining [parent]...</span>")
if(!do_after(M, 20, target = parent))
return
on_obj_examine(source, M)
/datum/component/art/rev
/datum/component/art/rev/apply_moodlet(mob/M, impress)
M.visible_message("<span class='notice'>[M] stops to inspect [parent].</span>", \
"<span class='notice'>You take in [parent], inspecting the fine craftsmanship of the proletariat.</span>")
if(M.mind && M.mind.has_antag_datum(/datum/antagonist/rev))
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artgreat", /datum/mood_event/artgreat)
else
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artbad", /datum/mood_event/artbad)
@@ -12,6 +12,7 @@
/obj/item/weaponcrafting/stock
name = "rifle stock"
desc = "A classic rifle stock that doubles as a grip, roughly carved out of wood."
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 6)
icon_state = "riflestock"
/obj/item/weaponcrafting/durathread_string
@@ -116,4 +116,41 @@
always_availible = FALSE
reqs = list(/obj/item/stack/rods = 1,
/obj/item/stack/sheet/mineral/sandstone = 4)
category = CAT_PRIMAL
category = CAT_PRIMAL
/datum/crafting_recipe/rib
name = "Collosal Rib"
always_availible = FALSE
reqs = list(
/obj/item/stack/sheet/bone = 10,
/datum/reagent/oil = 5)
result = /obj/structure/statue/bone/rib
subcategory = CAT_PRIMAL
/datum/crafting_recipe/skull
name = "Skull Carving"
always_availible = FALSE
reqs = list(
/obj/item/stack/sheet/bone = 6,
/datum/reagent/oil = 5)
result = /obj/structure/statue/bone/skull
category = CAT_PRIMAL
/datum/crafting_recipe/halfskull
name = "Cracked Skull Carving"
always_availible = FALSE
reqs = list(
/obj/item/stack/sheet/bone = 3,
/datum/reagent/oil = 5)
result = /obj/structure/statue/bone/skull/half
category = CAT_PRIMAL
/datum/crafting_recipe/boneshovel
name = "Serrated Bone Shovel"
always_availible = FALSE
reqs = list(
/obj/item/stack/sheet/bone = 4,
/datum/reagent/oil = 5,
/obj/item/shovel/spade = 1)
result = /obj/item/shovel/serrated
category = CAT_PRIMAL
+22
View File
@@ -321,6 +321,28 @@
if(0 to NUTRITION_LEVEL_STARVING)
add_event(null, "nutrition", /datum/mood_event/starving)
/datum/component/mood/proc/update_beauty(area/A)
if(A.outdoors) //if we're outside, we don't care.
clear_event(null, "area_beauty")
return FALSE
if(HAS_TRAIT(parent, TRAIT_SNOB))
switch(A.beauty)
if(-INFINITY to BEAUTY_LEVEL_HORRID)
add_event(null, "area_beauty", /datum/mood_event/horridroom)
return
if(BEAUTY_LEVEL_HORRID to BEAUTY_LEVEL_BAD)
add_event(null, "area_beauty", /datum/mood_event/badroom)
return
switch(A.beauty)
if(-INFINITY to BEAUTY_LEVEL_DECENT)
clear_event(null, "area_beauty")
if(BEAUTY_LEVEL_DECENT to BEAUTY_LEVEL_GOOD)
add_event(null, "area_beauty", /datum/mood_event/decentroom)
if(BEAUTY_LEVEL_GOOD to BEAUTY_LEVEL_GREAT)
add_event(null, "area_beauty", /datum/mood_event/goodroom)
if(BEAUTY_LEVEL_GREAT to INFINITY)
add_event(null, "area_beauty", /datum/mood_event/greatroom)
///Called when parent is revived.
/datum/component/mood/proc/on_revive(datum/source, full_heal)
START_PROCESSING(SSdcs, src)