mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Replaces the mood component with a mood datum (#68592)
About The Pull Request Mood was abusing signals and get component pretty badly, so I redid it as a datum to stop this. Why It's Good For The CODEBASE Better code pratices, also gives admins easier tools to manage mood Changelog cl admin: Added two new procs into the VV dropdown menu to add and remove mood events from living mobs. /cl
This commit is contained in:
@@ -217,7 +217,7 @@
|
||||
if (!istype(M, /mob/living/carbon/human))
|
||||
return
|
||||
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "dying", /datum/mood_event/deaths_door)
|
||||
M.add_mood_event("dying", /datum/mood_event/deaths_door)
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if (H.dna)
|
||||
@@ -242,7 +242,7 @@
|
||||
M.regenerate_icons()
|
||||
M.pixel_y -= -GUILLOTINE_HEAD_OFFSET // Move their body back
|
||||
M.layer -= GUILLOTINE_LAYER_DIFF
|
||||
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "dying")
|
||||
M.clear_mood_event("dying")
|
||||
..()
|
||||
|
||||
/obj/structure/guillotine/can_be_unfasten_wrench(mob/user, silent)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
playsound(loc, pick(hit_sounds), 25, TRUE, -1)
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "exercise", /datum/mood_event/exercise)
|
||||
L.add_mood_event("exercise", /datum/mood_event/exercise)
|
||||
L.apply_status_effect(/datum/status_effect/exercised)
|
||||
|
||||
/obj/structure/weightmachine
|
||||
@@ -64,7 +64,7 @@
|
||||
update_appearance()
|
||||
user.pixel_y = user.base_pixel_y
|
||||
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "exercise", /datum/mood_event/exercise)
|
||||
user.add_mood_event("exercise", /datum/mood_event/exercise)
|
||||
to_chat(user, finishmessage)
|
||||
user.apply_status_effect(/datum/status_effect/exercised)
|
||||
|
||||
|
||||
@@ -238,10 +238,11 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16))
|
||||
|
||||
/obj/machinery/shower/proc/wash_atom(atom/target)
|
||||
target.wash(CLEAN_RAD | CLEAN_WASH)
|
||||
SEND_SIGNAL(target, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower)
|
||||
reagents.expose(target, (TOUCH), SHOWER_EXPOSURE_MULTIPLIER * SHOWER_SPRAY_VOLUME / max(reagents.total_volume, SHOWER_SPRAY_VOLUME))
|
||||
if(isliving(target))
|
||||
check_heat(target)
|
||||
var/mob/living/living_target = target
|
||||
check_heat(living_target)
|
||||
living_target.add_mood_event("shower", /datum/mood_event/nice_shower)
|
||||
|
||||
/**
|
||||
* Toggle whether shower is actually on and outputting water.
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
pushed_mob.visible_message(span_danger("[user] slams [pushed_mob] onto \the [src]!"), \
|
||||
span_userdanger("[user] slams you onto \the [src]!"))
|
||||
log_combat(user, pushed_mob, "tabled", null, "onto [src]")
|
||||
SEND_SIGNAL(pushed_mob, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
|
||||
pushed_mob.add_mood_event("table", /datum/mood_event/table)
|
||||
|
||||
/obj/structure/table/proc/tablelimbsmash(mob/living/user, mob/living/pushed_mob)
|
||||
pushed_mob.Knockdown(30)
|
||||
@@ -181,7 +181,7 @@
|
||||
pushed_mob.visible_message(span_danger("[user] smashes [pushed_mob]'s [banged_limb.name] against \the [src]!"),
|
||||
span_userdanger("[user] smashes your [banged_limb.name] against \the [src]"))
|
||||
log_combat(user, pushed_mob, "head slammed", null, "against [src]")
|
||||
SEND_SIGNAL(pushed_mob, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table_limbsmash, banged_limb)
|
||||
pushed_mob.add_mood_event("table", /datum/mood_event/table_limbsmash, banged_limb)
|
||||
|
||||
/obj/structure/table/screwdriver_act_secondary(mob/living/user, obj/item/tool)
|
||||
if(flags_1 & NODECONSTRUCT_1 || !deconstruction_ready)
|
||||
|
||||
Reference in New Issue
Block a user