Skip to content

Commit

Permalink
Assistants get a liver trait + Officer's sabre banes against them (tg…
Browse files Browse the repository at this point in the history
…station#75933)

## About The Pull Request

Assistants get a new liver trait, maintenance metabolism. This trait
only lets them process maintenance drugs, grey bull, and pump-up for 20%
more time and gives them a probably-positive 2 minute moodlet when
ingesting these.

The officer's sabre has gained a small amount of bloodthrist for
assistants!

Fixed liver masters being unable to inspect the liver of scientists.

## Why It's Good For The Game

> Assistants get a new liver trait, maintenance metabolism. This trait
only lets them process maintenance drugs, grey bull, and pump-up for 20%
more time and gives them a probably-positive 2 minute moodlet when
ingesting these.

This trait is pretty much entirely here for the actual
liver-identification of assistants the sabre uses, though I didn't want
to just add an empty trait so I gave it the above effects as pretty damn
harmless effects. I'm sure the maints will dislike even this so I'm open
to anything.

> The officer's sabre has gained a small amount of bloodthirst for
assistants! Or at least their livers.

I find the concept of the sabre having a bane against assistants
amusing, and it wouldn't hurt to give them something that may help
against tiders. As a smidgen of fairness, the detection is tied to the
liver - if they want to take less damage they can have it replaced,
though the captain can also help with that by disemboweling organs. The
liver being used for something that isn't reagents processing might be a
bit controversial, but like I said, I'd rather have that than have it
permanently, intrinsically tied to a job.

> Fixed liver masters being unable to inspect the liver of scientists.

Ballmer metabolism quacks like a duck, traits like a duck, and thus
should be able to be duck inspected by the duck master, since there is
no practical difference between it and other 'official' metabolisms.

## Changelog

:cl:
add: Assistants get a new liver trait, maintenance metabolism. This
trait only lets them process maintenance drugs, grey bull, and pump-up
for 20% more time and gives them a probably-positive 2 minute moodlet
when ingesting these.
add: The officer's sabre has gained a small amount of bloodthrist for
assistants!
fix: Fixed liver masters being unable to inspect the liver of
scientists.
/:cl:

---------

Co-authored-by: san7890 <[email protected]>
  • Loading branch information
carlarctg and san7890 authored Jun 11, 2023
1 parent 68b92c7 commit ee4aaeb
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 8 deletions.
7 changes: 7 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
///from base of element/bane/activate(): (item/weapon, mob/user)
#define COMSIG_LIVING_BANED "living_baned"

///from base of element/bane/activate(): (item/weapon, mob/user)
#define COMSIG_OBJECT_PRE_BANING "obj_pre_baning"
#define COMPONENT_CANCEL_BANING (1<<0)

///from base of element/bane/activate(): (item/weapon, mob/user)
#define COMSIG_OBJECT_ON_BANING "obj_on_baning"

/// from base of mob/living/updatehealth()
#define COMSIG_LIVING_HEALTH_UPDATE "living_health_update"
///from base of mob/living/death(): (gibbed)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_ROYAL_METABOLISM "royal_metabolism"
#define TRAIT_PRETENDER_ROYAL_METABOLISM "pretender_royal_metabolism"
#define TRAIT_BALLMER_SCIENTIST "ballmer_scientist"
#define TRAIT_MAINTENANCE_METABOLISM "maintenance_metabolism"

//LUNG TRAITS
/// Lungs always breathe normally when in vacuum/space.
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_ROYAL_METABOLISM" = TRAIT_ROYAL_METABOLISM,
"TRAIT_PRETENDER_ROYAL_METABOLISM" = TRAIT_PRETENDER_ROYAL_METABOLISM,
"TRAIT_BALLMER_SCIENTIST" = TRAIT_BALLMER_SCIENTIST,
"TRAIT_MAINTENANCE_METABOLISM" = TRAIT_MAINTENANCE_METABOLISM,
),
/obj/item = list(
"TRAIT_NODROP" = TRAIT_NODROP,
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/on_hit_effect.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
return

if(extra_check_callback)
if(!extra_check_callback.Invoke(user, target))
if(!extra_check_callback.Invoke(user, target, source))
return
on_hit_callback.Invoke(source, user, target, user.zone_selected)
return COMPONENT_AFTERATTACK_PROCESSED_ITEM
Expand Down
19 changes: 16 additions & 3 deletions code/datums/elements/bane.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,25 @@
qdel(target.GetComponent(/datum/component/on_hit_effect))
return ..()

/datum/element/bane/proc/check_bane(mob/living/bane_applier, atom/target)
if(!isliving(target))
/datum/element/bane/proc/check_bane(bane_applier, target, bane_weapon)
if(!check_biotype_path(bane_applier, target))
return
var/atom/movable/atom_owner = bane_weapon
if(SEND_SIGNAL(atom_owner, COMSIG_OBJECT_PRE_BANING, target) & COMPONENT_CANCEL_BANING)
return
return TRUE

/**
* Checks typepaths and the mob's biotype, returning TRUE if correct and FALSE if wrong.
* Additionally checks if combat mode is required, and if so whether it's enabled or not.
*/
/datum/element/bane/proc/check_biotype_path(mob/living/bane_applier, atom/target)
if(!isliving(target))
return FALSE
var/mob/living/living_target = target
if(bane_applier)
if(requires_combat_mode && !bane_applier.combat_mode)
return
return FALSE
var/is_correct_biotype = living_target.mob_biotypes & mob_biotypes
if(mob_biotypes && !(is_correct_biotype))
return FALSE
Expand Down Expand Up @@ -78,3 +90,4 @@
var/extra_damage = max(0, (force_boosted * damage_multiplier) + added_damage)
baned_target.apply_damage(extra_damage, applied_dam_type, hit_zone)
SEND_SIGNAL(baned_target, COMSIG_LIVING_BANED, bane_applier, baned_target) // for extra effects when baned.
SEND_SIGNAL(element_owner, COMSIG_OBJECT_ON_BANING, baned_target)
14 changes: 14 additions & 0 deletions code/datums/mood_events/drug_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@
mood_change = 6
description = "I'm sooooo stooooooooooooned..."

/datum/mood_event/maintenance_high
mood_change = 6
description = "I'm on top of the world, baby! Tide worldwide!"
timeout = 2 MINUTES

/datum/mood_event/maintenance_high/add_effects(param)
var/value = rand(-1, 6) // chance for it to suck
mood_change = value
if(value < 0)
description = "No! Don't! My gloves! Auuuuurgh!"
else
description = initial(description)


/datum/mood_event/smoked
description = "I have had a smoke recently."
mood_change = 2
Expand Down
26 changes: 25 additions & 1 deletion code/game/objects/items/melee/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,36 @@

/obj/item/melee/sabre/Initialize(mapload)
. = ..()
//fast and effective, but as a sword, it might damage the results.
AddComponent(/datum/component/butchering, \
speed = 3 SECONDS, \
effectiveness = 95, \
bonus_modifier = 5, \
)
//fast and effective, but as a sword, it might damage the results.
// The weight of authority comes down on the tider's crimes.
AddElement(/datum/element/bane, target_type = /mob/living/carbon/human, damage_multiplier = 0.35)
RegisterSignal(src, COMSIG_OBJECT_PRE_BANING, PROC_REF(attempt_bane))
RegisterSignal(src, COMSIG_OBJECT_ON_BANING, PROC_REF(bane_effects))

/**
* If the target reeks of maintenance, the blade can tear through their body with a total of 20 damage.
*/
/obj/item/melee/sabre/proc/attempt_bane(element_owner, mob/living/carbon/criminal)
SIGNAL_HANDLER
var/obj/item/organ/internal/liver/liver = criminal.get_organ_slot(ORGAN_SLOT_LIVER)
if(isnull(liver) || !HAS_TRAIT(liver, TRAIT_MAINTENANCE_METABOLISM))
return COMPONENT_CANCEL_BANING

/**
* Assistants should fear this weapon.
*/
/obj/item/melee/sabre/proc/bane_effects(element_owner, mob/living/carbon/human/baned_target)
SIGNAL_HANDLER
baned_target.visible_message(
span_warning("[src] tears through [baned_target] with unnatural ease!"),
span_userdanger("As [src] tears into your body, you feel the weight of authority collapse into your wounds!"),
)
INVOKE_ASYNC(baned_target, TYPE_PROC_REF(/mob/living/carbon/human, emote), "scream")

/obj/item/melee/sabre/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(attack_type == PROJECTILE_ATTACK)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/jobs/job_types/assistant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Assistant
paycheck_department = ACCOUNT_CIV
display_order = JOB_DISPLAY_ORDER_ASSISTANT

liver_traits = list(TRAIT_MAINTENANCE_METABOLISM)

department_for_prefs = /datum/job_department/assistant

family_heirlooms = list(/obj/item/storage/toolbox/mechanical/old/heirloom, /obj/item/clothing/gloves/cut/heirloom)
Expand Down
8 changes: 6 additions & 2 deletions code/modules/reagents/chemistry/reagents/drink_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,13 @@
desc = "Surprisingly it isn't grey."
icon_state = "grey_bull_glass"

/datum/reagent/consumable/grey_bull/on_mob_metabolize(mob/living/affected_mob)
/datum/reagent/consumable/grey_bull/on_mob_metabolize(mob/living/carbon/affected_atom)
..()
ADD_TRAIT(affected_mob, TRAIT_SHOCKIMMUNE, type)
ADD_TRAIT(affected_atom, TRAIT_SHOCKIMMUNE, type)
var/obj/item/organ/internal/liver/liver = affected_atom.get_organ_slot(ORGAN_SLOT_LIVER)
if(HAS_TRAIT(liver, TRAIT_MAINTENANCE_METABOLISM))
affected_atom.add_mood_event("maintenance_fun", /datum/mood_event/maintenance_high)
metabolization_rate *= 0.8

/datum/reagent/consumable/grey_bull/on_mob_end_metabolize(mob/living/affected_mob)
REMOVE_TRAIT(affected_mob, TRAIT_SHOCKIMMUNE, type)
Expand Down
12 changes: 11 additions & 1 deletion code/modules/reagents/chemistry/reagents/drug_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,13 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 6) //2.6 per 2 seconds

/datum/reagent/drug/pumpup/on_mob_metabolize(mob/living/L)
/datum/reagent/drug/pumpup/on_mob_metabolize(mob/living/carbon/L)
..()
ADD_TRAIT(L, TRAIT_BATON_RESISTANCE, type)
var/obj/item/organ/internal/liver/liver = L.get_organ_slot(ORGAN_SLOT_LIVER)
if(HAS_TRAIT(liver, TRAIT_MAINTENANCE_METABOLISM))
L.add_mood_event("maintenance_fun", /datum/mood_event/maintenance_high)
metabolization_rate *= 0.8

/datum/reagent/drug/pumpup/on_mob_end_metabolize(mob/living/L)
REMOVE_TRAIT(L, TRAIT_BATON_RESISTANCE, type)
Expand Down Expand Up @@ -364,6 +368,12 @@
name = "Maintenance Drugs"
chemical_flags = NONE

/datum/reagent/drug/pumpup/on_mob_metabolize(mob/living/carbon/L)
var/obj/item/organ/internal/liver/liver = L.get_organ_slot(ORGAN_SLOT_LIVER)
if(HAS_TRAIT(liver, TRAIT_MAINTENANCE_METABOLISM))
L.add_mood_event("maintenance_fun", /datum/mood_event/maintenance_high)
metabolization_rate *= 0.8

/datum/reagent/drug/maint/powder
name = "Maintenance Powder"
description = "An unknown powder that you most likely gotten from an assistant, a bored chemist... or cooked yourself. It is a refined form of tar that enhances your mental ability, making you learn stuff a lot faster."
Expand Down
4 changes: 4 additions & 0 deletions code/modules/surgery/organs/liver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
. += "Marks of stress and a faint whiff of medicinal alcohol, imply that this is the liver of a <em>medical worker</em>."
if(HAS_TRAIT(src, TRAIT_ENGINEER_METABOLISM))
. += "Signs of radiation exposure and space adaption, implies that this is the liver of an <em>engineer</em>."
if(HAS_TRAIT(src, TRAIT_BALLMER_SCIENTIST))
. += "Strange glowing residues, sprinklings of congealed solid plasma, and what seem to be tumors indicate this is the radiated liver of a <em>scientist</em>."
if(HAS_TRAIT(src, TRAIT_MAINTENANCE_METABOLISM))
. += "A half-digested rat's tail (somehow), disgusting sludge, and the faint smell of Grey Bull imply this is what remains of an <em>assistant</em>'s liver."

// royal trumps pretender royal
if(HAS_TRAIT(src, TRAIT_ROYAL_METABOLISM))
Expand Down

0 comments on commit ee4aaeb

Please sign in to comment.