diff --git a/aurorastation.dme b/aurorastation.dme index 870caeb77df..89d7a4ec88a 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -547,6 +547,7 @@ #include "code\datums\components\skills\service\cooking_skill_component.dm" #include "code\datums\components\skills\service\entertaining_skill_component.dm" #include "code\datums\components\skills\service\gardening_skill_component.dm" +#include "code\datums\components\skills\service\ministry_skill_component.dm" #include "code\datums\components\synthetic_endoskeleton\synthetic_endoskeleton.dm" #include "code\datums\components\tools\tool_quality.dm" #include "code\datums\components\turf_click\turf_hand.dm" diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index bf4a98969b9..033a7025362 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -29,6 +29,7 @@ #define TOOL_COMPONENT /datum/component/tool_quality_container #define CAROUSING_SKILL_COMPONENT /datum/component/skill/carousing #define TENACITY_SKILL_COMPONENT /datum/component/skill/tenacity +#define MINISTRY_SKILL_COMPONENT /datum/component/skill/ministry /** * Trinary-Boolean helper that either returns null, or the skill level of a given skill component(which can be zero). diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 6573f2eec63..3db45dab5e9 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -41,6 +41,8 @@ #define COMSIG_MOB_ZONE_SEL_CHANGE "mob_zone_sel_change" ///from base of /mob/Login(): () #define COMSIG_MOB_LOGIN "mob_login" +/// Sent at the end of /mob/LateLogin() after the client is fully initialized. +#define COMSIG_MOB_AFTER_LOGIN "mob_after_login" ///from base of /mob/Logout(): () #define COMSIG_MOB_LOGOUT "mob_logout" /// from mob/get_status_tab_items(): (list/items) @@ -130,3 +132,11 @@ // Surgery Signals /// Signal raised against the surgeon attempting to perform a surgery to query their components for any rate mods. #define COMSIG_GET_SURGERY_SUCCESS_MODIFIERS "get_surgery_success_modifiers" + +/// Signal raised against a character attempting to give a ministry moodlet to someone. +#define COMSIG_GET_MINISTRY_MODIFIERS "get_ministry_modifiers" +/// Signal raised against the recipient of the Ministry skill action, allowing effects to interrupt the received moodlet. +#define COMSIG_RECEIVE_MINISTRY_MODIFIERS "receive_ministry_modifiers" + +/// Signal raised against a character attempting to deliver a speech. +#define COMSIG_GET_LEADERSHIP_MODIFIERS "get_leadership_modifiers" diff --git a/code/_onclick/hud/action.dm b/code/_onclick/hud/action.dm index 928e2889317..69e323792aa 100644 --- a/code/_onclick/hud/action.dm +++ b/code/_onclick/hud/action.dm @@ -3,6 +3,7 @@ #define AB_INNATE 3 #define AB_GENERIC 4 #define AB_ITEM_USE_ICON 5 +#define AB_CALL_SELF 6 #define AB_CHECK_RESTRAINED 1 #define AB_CHECK_STUNNED 2 @@ -90,6 +91,9 @@ if(AB_GENERIC) if(target && procname) call(target,procname)(usr) + if(AB_CALL_SELF) + if (procname) + call(src, procname)() return /datum/action/proc/Activate() @@ -337,6 +341,7 @@ #undef AB_INNATE #undef AB_GENERIC #undef AB_ITEM_USE_ICON +#undef AB_CALL_SELF #undef AB_CHECK_RESTRAINED #undef AB_CHECK_STUNNED diff --git a/code/datums/components/psionics/psiblock_drugs.dm b/code/datums/components/psionics/psiblock_drugs.dm index d8bfadcc99c..5d94738764b 100644 --- a/code/datums/components/psionics/psiblock_drugs.dm +++ b/code/datums/components/psionics/psiblock_drugs.dm @@ -26,6 +26,9 @@ RegisterSignal(parent, COMSIG_PSI_CHECK_SENSITIVITY, PROC_REF(modify_sensitivity), override = TRUE) RegisterSignal(parent, COMSIG_PSI_MIND_POWER, PROC_REF(cancel_power), override = TRUE) + RegisterSignal(parent, COMSIG_GET_MINISTRY_MODIFIERS, PROC_REF(modify_ministry_empathy), override = TRUE) + RegisterSignal(parent, COMSIG_RECEIVE_MINISTRY_MODIFIERS, PROC_REF(modify_ministry_receiving), override = TRUE) + RegisterSignal(parent, COMSIG_GET_LEADERSHIP_MODIFIERS, PROC_REF(modify_leadership_empathy), override = TRUE) /datum/component/timed_life/psiblock_drugs/Destroy() owner = null @@ -39,6 +42,9 @@ UnregisterSignal(parent, COMSIG_PSI_CHECK_SENSITIVITY) UnregisterSignal(parent, COMSIG_PSI_MIND_POWER) + UnregisterSignal(parent, COMSIG_GET_MINISTRY_MODIFIERS) + UnregisterSignal(parent, COMSIG_RECEIVE_MINISTRY_MODIFIERS) + UnregisterSignal(parent, COMSIG_GET_LEADERSHIP_MODIFIERS) return ..() /datum/component/timed_life/psiblock_drugs/proc/modify_sensitivity(parent, effective_sensitivity) @@ -51,6 +57,31 @@ if (prob(telepathy_cancel_probability)) *cancelled = TRUE +/datum/component/timed_life/psiblock_drugs/proc/modify_ministry_empathy(minister, ministree, moodlet_value) + SIGNAL_HANDLER + if (!(*moodlet_value)) + return + + to_chat(minister, SPAN_BAD("Why should you care how [ministree] feels?")) + *moodlet_value = 0 + +/datum/component/timed_life/psiblock_drugs/proc/modify_ministry_receiving(ministree, minister, moodlet_value) + SIGNAL_HANDLER + if (!(*moodlet_value)) + return + + to_chat(ministree, SPAN_BAD("You feel nothing from [minister]'s words.")) + *moodlet_value = 0 + +/datum/component/timed_life/psiblock_drugs/proc/modify_leadership_empathy(leader, moodlet_value) + SIGNAL_HANDLER + if (!(*moodlet_value)) + return + + to_chat(leader, SPAN_BAD("Why should you care about how others feel?")) + *moodlet_value = 0 + + /datum/component/timed_life/psiblock_drugs/process(seconds_per_tick) . = ..() diff --git a/code/datums/components/skills/combat/leadership_skill_component.dm b/code/datums/components/skills/combat/leadership_skill_component.dm index e995b06e520..6ec370d09c6 100644 --- a/code/datums/components/skills/combat/leadership_skill_component.dm +++ b/code/datums/components/skills/combat/leadership_skill_component.dm @@ -1,6 +1,165 @@ +#define GET_SPEECH_TYPE(owner) alert(owner.client, "What type of chat message would you like to use for your inspirational speech?", "Say Type", "Say", "Whisper", "Emote") +#define GET_SPEECH_TEXT(owner) tgui_input_text(owner, "Write what you wish to say for your speech.", "Deliver Speech") + +/datum/moodlet/leadership + moodlet_descriptor = SPAN_GOOD("Listened to an encouraging speech") + initial_descriptor = SPAN_GOOD("You have received a morale modifier from hearing words of encouragement.") + duration = 15 MINUTES + +/datum/action/leadership + name = "Deliver Speech" + action_type = 6 + procname = "queue_click" + button_icon = 'icons/hud/action_buttons/skills.dmi' + button_icon_state = "leadership" + +/datum/action/leadership/proc/queue_click() + if (!owner) + return + + to_chat(owner, SPAN_NOTICE("You prepare yourself to give a speech. Left click on yourself to target those who can hear you in an area. Left click on another person to instead give them directed words of encouragement. Targeting a single person will give a stronger morale modifier.")) + RegisterSignal(owner, COMSIG_MOB_CLICKON, PROC_REF(get_target), override = TRUE) + +/datum/action/leadership/proc/get_target(owner, atom/target, modifiers) + SIGNAL_HANDLER + // Both forms of deliver speech will immediately return control to the caller without blocking. + // Unfortunately StrongDMM is apparently incapable of reading that. + if (owner == target) + UNLINT(deliver_speech_area(owner)) + else + UNLINT(deliver_speech_target(owner, target)) + UnregisterSignal(owner, COMSIG_MOB_CLICKON) + return COMSIG_MOB_CANCEL_CLICKON + +/datum/action/leadership/proc/deliver_speech_area(mob/owner) + set waitfor = FALSE // Immediately return control to the caller. + if (!istype(owner)) + return + + owner.visible_message(SPAN_NOTICE("[owner] prepares to deliver a speech.")) + var/speech_text = GET_SPEECH_TEXT(owner) + if (!speech_text) + owner.visible_message(SPAN_NOTICE("[owner] has stopped speaking.")) + return + + owner.say(speech_text) + var/datum/component/skill/leadership/leadership_skill = owner.GetComponent(LEADERSHIP_SKILL_COMPONENT) + if (!leadership_skill) + return + + var/moodlet_value = leadership_skill.moodlet_value_per_rank * (leadership_skill.skill_level - 1) + SEND_SIGNAL(owner, COMSIG_GET_LEADERSHIP_MODIFIERS, &moodlet_value) + if (!moodlet_value) + return + + var/list/listening = get_hearers_in_view(world.view, owner) + if (!listening) + return + listening -= owner + + for (var/mob/player_mob in listening) + var/datum/component/morale/receiver_morale = player_mob.GetComponent(MORALE_COMPONENT) + if (!receiver_morale) + continue + + if (astype(receiver_morale.moodlets[/datum/moodlet/leadership], /datum/moodlet)?.get_morale_modifier() >= moodlet_value) + receiver_morale.load_moodlet(/datum/moodlet/leadership)?.refresh_moodlet() + continue // Don't overwrite stronger moodlets. + + var/datum/moodlet/speech = receiver_morale.load_moodlet(/datum/moodlet/leadership, moodlet_value) + speech.refresh_moodlet() + speech.moodlet_descriptor += " from [owner.name]." + +/datum/action/leadership/proc/deliver_speech_target(mob/owner, mob/target) + set waitfor = FALSE // Immediately return control to the caller. + if (!istype(owner) || !istype(target)) + return + + if (!target.client) + to_chat(owner, SPAN_NOTICE("[target] cannot hear your speech.")) + return + + owner.visible_message(SPAN_NOTICE("[owner] prepares to deliver a speech.")) + var/speech_type = GET_SPEECH_TYPE(owner) + var/speech_text = GET_SPEECH_TEXT(owner) + if (!speech_text) + owner.visible_message(SPAN_NOTICE("[owner] has stopped speaking.")) + return + + switch(speech_type) + if ("Say") + if (get_dist(owner, target) >= 7) + to_chat(owner, SPAN_NOTICE("You must be closer to [target] to give them words of encouragement")) + return + owner.say(speech_text) + if ("Whisper") + if (get_dist(owner, target) >= 2) + to_chat(owner, SPAN_NOTICE("You must be adjacent to [target] to whisper them words of encouragement")) + return + owner.whisper(speech_text) + if ("Emote") + if (get_dist(owner, target) >= 7) + to_chat(owner, SPAN_NOTICE("You must be closer to [target] to give them words of encouragement")) + owner.emote(speech_text) + + var/datum/component/skill/leadership/leadership_skill = owner.GetComponent(LEADERSHIP_SKILL_COMPONENT) + if (!leadership_skill) + return + + var/moodlet_value = leadership_skill.moodlet_value_per_rank * (leadership_skill.skill_level - 1) * leadership_skill.single_target_bonus_mod + SEND_SIGNAL(owner, COMSIG_GET_LEADERSHIP_MODIFIERS, &moodlet_value) + if (!moodlet_value) + return + + var/datum/component/morale/target_morale = target.GetComponent(MORALE_COMPONENT) + if (!target_morale) + return + + if (astype(target_morale.moodlets[/datum/moodlet/leadership], /datum/moodlet)?.get_morale_modifier() >= moodlet_value) + target_morale.load_moodlet(/datum/moodlet/leadership)?.refresh_moodlet() + return // Don't overwrite stronger moodlets. + + var/datum/moodlet/speech = target_morale.load_moodlet(/datum/moodlet/leadership, moodlet_value) + speech.refresh_moodlet() + speech.moodlet_descriptor += " from [owner.name]." + /** - * Component used for the Leadership Skill. This is not currently implemented, and will be handled in a separate PR to avoid scope creep. - * The way this will be intended to work is that having the component grants access to an "Inspire" action. Activating it will prompt the user to select a person, then prompt them to "Say something inspiring!". + * Component used for the Leadership Skill. + * The way this works is that having the component grants access to an "Inspire" action. Activating it will prompt the user to select a person, then prompt them to "Say something inspiring!". * If the target can "Hear" the inspirational speech, they gain a morale bonus which scales with the actor's Leadership Skill. */ /datum/component/skill/leadership + /// The action icon stored for this ability. + var/datum/action/leadership/leadership_action + + /// The value of the moodlet provided by this ability. + var/moodlet_value_per_rank = 10.0 / 3.0 + + /// Moodlet value multiplier for single target speeches. + var/single_target_bonus_mod = 1.5 + +/datum/component/skill/leadership/Initialize(level) + . = ..() + if (!parent) + return + + leadership_action = new /datum/action/leadership() + leadership_action.SetTarget(leadership_action) + leadership_action.Grant(parent) + + RegisterSignal(parent, COMSIG_MOB_AFTER_LOGIN, PROC_REF(setup_action_button), override = TRUE) + +/datum/component/skill/leadership/Destroy(force) + if (!parent) + return ..() + + UnregisterSignal(parent, COMSIG_MOB_AFTER_LOGIN) + leadership_action?.Remove(parent) + QDEL_NULL(leadership_action) + return ..() + +/datum/component/skill/leadership/proc/setup_action_button() + astype(parent, /mob)?.update_action_buttons() + +#undef GET_SPEECH_TYPE +#undef GET_SPEECH_TEXT diff --git a/code/datums/components/skills/service/ministry_skill_component.dm b/code/datums/components/skills/service/ministry_skill_component.dm new file mode 100644 index 00000000000..1aeea1b2729 --- /dev/null +++ b/code/datums/components/skills/service/ministry_skill_component.dm @@ -0,0 +1,132 @@ +/// Moodlet used for the Ministry skill. +/datum/moodlet/ministry_blessing + moodlet_descriptor = SPAN_GOOD("Received a blessing.") + initial_descriptor = SPAN_GOOD("You have received a morale modifier from hearing a blessing.") + +/// Action bar object used by the Ministry skill. +/datum/action/ministry + name = "Offer Blessing" + action_type = 6 + procname = "queue_click" + button_icon = 'icons/hud/action_buttons/skills.dmi' + button_icon_state = "ministry" + +/datum/action/ministry/proc/queue_click() + if (!owner) + return + + to_chat(owner, SPAN_NOTICE("You prepare yourself to offer a blessing to another. Left click on an adjacent character to offer them it.")) + RegisterSignal(owner, COMSIG_MOB_CLICKON, PROC_REF(get_target), override = TRUE) + +/datum/action/ministry/Destroy() + if (!owner) + return ..() + + UnregisterSignal(owner, COMSIG_MOB_CLICKON) + return ..() + +/datum/action/ministry/proc/get_target(owner, atom/target, modifiers) + SIGNAL_HANDLER + if (owner == target) + to_chat(owner, SPAN_NOTICE("You cannot offer a blessing to yourself.")) + return COMSIG_MOB_CANCEL_CLICKON + + if (!astype(target, /mob)?.client) + to_chat(owner, SPAN_NOTICE("[target] cannot receive a blessing.")) + return COMSIG_MOB_CANCEL_CLICKON + + if (get_dist(owner, target) >= 2) + to_chat(owner, SPAN_NOTICE("You must be adjacent to [target] to offer them a blessing.")) + return COMSIG_MOB_CANCEL_CLICKON + + // StrongDMM for whatever ungodly reason can't tell that this proc won't block the caller. + UNLINT(try_give_blessing(target)) + UnregisterSignal(owner, COMSIG_MOB_CLICKON) + return COMSIG_MOB_CANCEL_CLICKON + +/datum/action/ministry/proc/try_give_blessing(mob/target) + set waitfor = FALSE + switch(alert(target.client, "Would you like to accept a blessing from [owner]? You will need to remain close to them while they speak it", "Accept Blessing", "Yes", "No")) + if ("Yes") + var/blessing_type = alert(owner.client, "What type of chat message would you like to use for your blessing?", "Say Type", "Say", "Whisper", "Emote") + var/blessing_text = tgui_input_text(owner, "Write what you wish to say as a blessing for [target].", "Offer Blessing") + if (!blessing_text) + to_chat(owner, SPAN_NOTICE("You have stopped speaking.")) + to_chat(target, SPAN_NOTICE("[owner] has stopped speaking.")) + return + + if (get_dist(owner, target) >= 2) + to_chat(owner, SPAN_NOTICE("[target] is too far away to receive a blessing.")) + to_chat(target, SPAN_NOTICE("[owner] tried to offer a blessing, but you were too far away to receive it.")) + return + + switch(blessing_type) + if ("Say") + owner.say(blessing_text) + if ("Whisper") + owner.whisper(blessing_text) + if ("Emote") + owner.emote(blessing_text) + + var/datum/component/skill/ministry/ministry_skill = owner.GetComponent(MINISTRY_SKILL_COMPONENT) + if (!ministry_skill) + return + + var/datum/component/morale/target_morale = target.GetComponent(MORALE_COMPONENT) + if (!target_morale) + return + + var/moodlet_value = ministry_skill.moodlet_value_per_rank * (ministry_skill.skill_level - 1) + if (astype(owner, /mob/living/carbon/human)?.religion == astype(target, /mob/living/carbon/human)?.religion) + moodlet_value *= ministry_skill.same_religion_bonus_mod + + + SEND_SIGNAL(owner, COMSIG_GET_MINISTRY_MODIFIERS, target, &moodlet_value) + SEND_SIGNAL(target, COMSIG_RECEIVE_MINISTRY_MODIFIERS, owner, &moodlet_value) + if (!moodlet_value) + return + + if (astype(target_morale.moodlets[/datum/moodlet/ministry_blessing], /datum/moodlet)?.get_morale_modifier() >= moodlet_value) + target_morale.load_moodlet(/datum/moodlet/ministry_blessing)?.refresh_moodlet() + return // Don't overwrite stronger moodlets. + + var/datum/moodlet/blessing = target_morale.load_moodlet(/datum/moodlet/ministry_blessing, moodlet_value) + blessing.refresh_moodlet() + blessing.moodlet_descriptor += " from [owner.name]." + + if ("No") + to_chat(owner, SPAN_NOTICE("[target] has refused your blessing.")) + return + +/datum/component/skill/ministry + /// The action icon stored for this ability. + var/datum/action/ministry/ministry_action + + /// The value of the moodlet provided by this ability. + var/moodlet_value_per_rank = 10.0 / 3.0 + + /// The moodlet value multiplier for a target having the same religion as the performer. + var/same_religion_bonus_mod = 1.5 + +/datum/component/skill/ministry/Initialize(level) + . = ..() + if (!parent) + return + + ministry_action = new /datum/action/ministry() + ministry_action.SetTarget(ministry_action) + ministry_action.Grant(parent) + + RegisterSignal(parent, COMSIG_MOB_AFTER_LOGIN, PROC_REF(setup_action_button), override = TRUE) + +/datum/component/skill/ministry/Destroy(force) + if (!parent) + return ..() + + UnregisterSignal(parent, COMSIG_MOB_AFTER_LOGIN) + ministry_action?.Remove(parent) + QDEL_NULL(ministry_action) + return ..() + +/datum/component/skill/ministry/proc/setup_action_button() + astype(parent, /mob)?.update_action_buttons() diff --git a/code/datums/skills/combat/combat.dm b/code/datums/skills/combat/combat.dm index 128b3648cbc..9c8c2712880 100644 --- a/code/datums/skills/combat/combat.dm +++ b/code/datums/skills/combat/combat.dm @@ -69,14 +69,26 @@ + " - Firearms you shoot have a 30 degree spread-angle decrease, making them somewhat more accurate. This generally doesn't apply to weapons fired in semi-auto, but will make burst and automatic fire more manageable." \ ) -// Temporarily commented because this is a little too complicated to catch in the initial release. -// /singleton/skill/leadership -// name = "Leadership" -// description = "Leadership skill grants access to a unique 'Inspire' action, which lets you say something inspiring and give the target a positive moodlet." -// category = /singleton/skill_category/combat -// subcategory = SKILL_SUBCATEGORY_SUPPORT -// required = TRUE -// component_type = LEADERSHIP_SKILL_COMPONENT +/singleton/skill/leadership + name = "Leadership" + description = "Leadership represents a characters skill with inspiring others. Having ranks in this skill grants access to the \"Deliver Speech\" action. Which can be used to give a morale modifier either in an area, or to a single person. " \ + + "Additional ranks increase the morale modifier provided." + maximum_level = SKILL_LEVEL_PROFESSIONAL + category = /singleton/skill_category/combat + subcategory = SKILL_SUBCATEGORY_SUPPORT + component_type = LEADERSHIP_SKILL_COMPONENT + skill_level_descriptions = alist( + SKILL_LEVEL_UNFAMILIAR = "You have no skill with motivational speeches.", + SKILL_LEVEL_FAMILIAR = "You gain the \"Deliver Speech\" ability, which provides a small morale bonus.", + SKILL_LEVEL_TRAINED = "You gain the \"Deliver Speech\" ability, which provides a modest morale bonus.", + SKILL_LEVEL_PROFESSIONAL = "You gain the \"Deliver Speech\" ability, which provides a moderate morale bonus." + ) + skill_cost_map = alist( + SKILL_LEVEL_UNFAMILIAR = 0, + SKILL_LEVEL_FAMILIAR = 1, + SKILL_LEVEL_TRAINED = 2, + SKILL_LEVEL_PROFESSIONAL = 4 + ) /singleton/skill/tenacity name = "Tenacity" diff --git a/code/datums/skills/everyday/service.dm b/code/datums/skills/everyday/service.dm index 632310d886e..d67d27518c4 100644 --- a/code/datums/skills/everyday/service.dm +++ b/code/datums/skills/everyday/service.dm @@ -57,3 +57,18 @@ SKILL_LEVEL_TRAINED = "Your liver is 10% more effective at filtering drugs and alcohol.", SKILL_LEVEL_PROFESSIONAL = "Your liver is 15% more effective at filtering drugs and alcohol." ) + +/singleton/skill/ministry + name = "Ministry" + description = "Represents a characters training in religious counseling. Having ranks in this skill unlocks the \"Offer Blessing\" ability, which offers a small morale modifier to an adjacent character. " \ + + "Additional ranks increase the morale modifier, which is empowered further if the recipient shares a religion with you." + maximum_level = SKILL_LEVEL_PROFESSIONAL + category = /singleton/skill_category/everyday + subcategory = SKILL_SUBCATEGORY_SERVICE + component_type = MINISTRY_SKILL_COMPONENT + skill_level_descriptions = alist( + SKILL_LEVEL_UNFAMILIAR = "You have no training in religious counseling.", + SKILL_LEVEL_FAMILIAR = "You gain the \"Offer Blessing\" ability, which provides a small morale bonus to a recipient.", + SKILL_LEVEL_TRAINED = "You gain the \"Offer Blessing\" ability, which provides a modest morale bonus to a recipient.", + SKILL_LEVEL_PROFESSIONAL = "You gain the \"Offer Blessing\" ability, which provides a moderate morale bonus to a recipient." + ) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 7c622122eb4..1c03b4b14f7 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -119,3 +119,5 @@ for(var/atom/movable/screen/movable/spell_master/spell_master in spell_masters) spell_master.toggle_open(1) client.screen -= spell_master + + SEND_SIGNAL(src, COMSIG_MOB_AFTER_LOGIN) diff --git a/code/modules/organs/subtypes/augment/augments/mind_blanker.dm b/code/modules/organs/subtypes/augment/augments/mind_blanker.dm index de0a2c4dd14..d431215c6fb 100644 --- a/code/modules/organs/subtypes/augment/augments/mind_blanker.dm +++ b/code/modules/organs/subtypes/augment/augments/mind_blanker.dm @@ -14,6 +14,9 @@ RegisterSignal(owner, COMSIG_PSI_MIND_POWER, PROC_REF(cancel_power), override = TRUE) RegisterSignal(owner, COMSIG_PSI_CHECK_SENSITIVITY, PROC_REF(modify_sensitivity), override = TRUE) + RegisterSignal(owner, COMSIG_GET_MINISTRY_MODIFIERS, PROC_REF(modify_ministry_empathy), override = TRUE) + RegisterSignal(owner, COMSIG_RECEIVE_MINISTRY_MODIFIERS, PROC_REF(modify_ministry_receiving), override = TRUE) + RegisterSignal(owner, COMSIG_GET_LEADERSHIP_MODIFIERS, PROC_REF(modify_leadership_empathy), override = TRUE) /obj/item/organ/internal/augment/bioaug/mind_blanker/replaced() . = ..() @@ -22,6 +25,9 @@ RegisterSignal(owner, COMSIG_PSI_MIND_POWER, PROC_REF(cancel_power), override = TRUE) RegisterSignal(owner, COMSIG_PSI_CHECK_SENSITIVITY, PROC_REF(modify_sensitivity), override = TRUE) + RegisterSignal(owner, COMSIG_GET_MINISTRY_MODIFIERS, PROC_REF(modify_ministry_empathy), override = TRUE) + RegisterSignal(owner, COMSIG_RECEIVE_MINISTRY_MODIFIERS, PROC_REF(modify_ministry_receiving), override = TRUE) + RegisterSignal(owner, COMSIG_GET_LEADERSHIP_MODIFIERS, PROC_REF(modify_leadership_empathy), override = TRUE) /obj/item/organ/internal/augment/bioaug/mind_blanker/removed() if(!owner) @@ -29,9 +35,12 @@ UnregisterSignal(owner, COMSIG_PSI_MIND_POWER) UnregisterSignal(owner, COMSIG_PSI_CHECK_SENSITIVITY) + UnregisterSignal(owner, COMSIG_GET_MINISTRY_MODIFIERS) + UnregisterSignal(owner, COMSIG_RECEIVE_MINISTRY_MODIFIERS) + UnregisterSignal(owner, COMSIG_GET_LEADERSHIP_MODIFIERS) return ..() -/obj/item/organ/internal/augment/bioaug/mind_blanker/proc/cancel_power(var/implantee, var/caster, var/cancelled, var/cancel_return, var/wide_field) +/obj/item/organ/internal/augment/bioaug/mind_blanker/proc/cancel_power(implantee, caster, cancelled, cancel_return, wide_field) SIGNAL_HANDLER if(is_broken()) return @@ -42,13 +51,37 @@ to_chat(implantee, SPAN_DANGER("Your mind wriggles as it repulses an outside thought.")) -/obj/item/organ/internal/augment/bioaug/mind_blanker/proc/modify_sensitivity(var/implantee, var/effective_sensitivity) +/obj/item/organ/internal/augment/bioaug/mind_blanker/proc/modify_sensitivity(implantee, effective_sensitivity) SIGNAL_HANDLER if(is_broken()) return *effective_sensitivity += sensitivity_modifier +/obj/item/organ/internal/augment/bioaug/mind_blanker/proc/modify_ministry_empathy(minister, ministree, moodlet_value) + SIGNAL_HANDLER + if (!(*moodlet_value)) + return + + to_chat(minister, SPAN_BAD("Why should you care how [ministree] feels?")) + *moodlet_value = 0 + +/obj/item/organ/internal/augment/bioaug/mind_blanker/proc/modify_ministry_receiving(ministree, minister, moodlet_value) + SIGNAL_HANDLER + if (!(*moodlet_value)) + return + + to_chat(ministree, SPAN_BAD("You feel nothing from [minister]'s words.")) + *moodlet_value = 0 + +/obj/item/organ/internal/augment/bioaug/mind_blanker/proc/modify_leadership_empathy(leader, moodlet_value) + SIGNAL_HANDLER + if (!(*moodlet_value)) + return + + to_chat(leader, SPAN_BAD("Why should you care about how others feel?")) + *moodlet_value = 0 + /obj/item/organ/internal/augment/bioaug/mind_blanker_lethal name = "lethal mind blanker" desc = "A small, discrete organ attached near the base of the brainstem." \ @@ -82,7 +115,7 @@ UnregisterSignal(owner, COMSIG_PSI_MIND_POWER) UnregisterSignal(owner, COMSIG_PSI_CHECK_SENSITIVITY) -/obj/item/organ/internal/augment/bioaug/mind_blanker_lethal/proc/cancel_power_lethal(var/mob/living/carbon/human/implantee, var/caster, var/cancelled, var/cancel_return, var/wide_field) +/obj/item/organ/internal/augment/bioaug/mind_blanker_lethal/proc/cancel_power_lethal(mob/living/carbon/human/implantee, caster, cancelled, cancel_return, wide_field) SIGNAL_HANDLER if(is_broken()) return @@ -98,7 +131,7 @@ victim.confused += 20 *cancel_return = SPAN_DANGER("Agony lances through my brain as their mind clamps down upon me!") -/obj/item/organ/internal/augment/bioaug/mind_blanker_lethal/proc/modify_sensitivity(var/implantee, var/effective_sensitivity) +/obj/item/organ/internal/augment/bioaug/mind_blanker_lethal/proc/modify_sensitivity(implantee, effective_sensitivity) SIGNAL_HANDLER if(is_broken()) return diff --git a/html/changelogs/hellfirejag-ministry-skill.yml b/html/changelogs/hellfirejag-ministry-skill.yml new file mode 100644 index 00000000000..f27adbd9f03 --- /dev/null +++ b/html/changelogs/hellfirejag-ministry-skill.yml @@ -0,0 +1,5 @@ +author: Hellfirejag +delete-after: True +changes: + - rscadd: "Added a new skill called Ministry." + - rscadd: "Added a new skill called Leadership." diff --git a/icons/hud/action_buttons/skills.dmi b/icons/hud/action_buttons/skills.dmi new file mode 100644 index 00000000000..a897d9d2281 Binary files /dev/null and b/icons/hud/action_buttons/skills.dmi differ