mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Moves species brutemod and burnmod to be handled by bodyparts (#76060)
## About The Pull Request Title. Brute modifier and burn modifier are now handled by bodyparts. Cold modifier and heat modifier are still handled by species, though mmmmmaybe I'll make a PR addressing those later, yes? ## Why It's Good For The Game Medical abominations will have even more consistent behavior! Also bloating the species datum less is kinda good. ## Changelog 🆑 refactor: Species brute and burn damage modifiers are now handled by bodyparts, instead of being universal. Go ham at the surgical bay. /🆑
This commit is contained in:
@@ -9,16 +9,18 @@
|
||||
var/can_process = FALSE
|
||||
var/mod_type = BIOWARE_GENERIC
|
||||
|
||||
/datum/bioware/New(mob/living/carbon/human/_owner)
|
||||
owner = _owner
|
||||
for(var/datum/bioware/bioware as anything in owner.bioware)
|
||||
/datum/bioware/New(mob/living/carbon/human/new_owner)
|
||||
owner = new_owner
|
||||
for(var/datum/bioware/bioware as anything in owner.biowares)
|
||||
if(bioware.mod_type == mod_type)
|
||||
qdel(src)
|
||||
return
|
||||
owner.bioware += src
|
||||
LAZYADD(owner.biowares, src)
|
||||
on_gain()
|
||||
|
||||
/datum/bioware/Destroy()
|
||||
if(owner)
|
||||
LAZYREMOVE(owner.biowares, src)
|
||||
owner = null
|
||||
if(active)
|
||||
on_lose()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
return FALSE
|
||||
if(!istype(target))
|
||||
return FALSE
|
||||
for(var/datum/bioware/bioware as anything in target.bioware)
|
||||
for(var/datum/bioware/bioware as anything in target.biowares)
|
||||
if(bioware.mod_type == bioware_target)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -88,10 +88,15 @@
|
||||
///Gradually increases while burning when at full damage, destroys the limb when at 100
|
||||
var/cremation_progress = 0
|
||||
|
||||
//Multiplicative damage modifiers
|
||||
/// Brute damage gets multiplied by this on receive_damage()
|
||||
var/brute_modifier = 1
|
||||
/// Burn damage gets multiplied by this on receive_damage()
|
||||
var/burn_modifier = 1
|
||||
// Damage reduction variables for damage handled on the limb level. Handled after worn armor.
|
||||
///Amount subtracted from brute damage inflicted on the limb.
|
||||
/// Amount subtracted from brute damage inflicted on the limb.
|
||||
var/brute_reduction = 0
|
||||
///Amount subtracted from burn damage inflicted on the limb.
|
||||
/// Amount subtracted from burn damage inflicted on the limb.
|
||||
var/burn_reduction = 0
|
||||
|
||||
//Coloring and proper item icon update
|
||||
@@ -437,8 +442,8 @@
|
||||
return FALSE
|
||||
|
||||
var/dmg_multi = CONFIG_GET(number/damage_multiplier) * hit_percent
|
||||
brute = round(max(brute * dmg_multi, 0),DAMAGE_PRECISION)
|
||||
burn = round(max(burn * dmg_multi, 0),DAMAGE_PRECISION)
|
||||
brute = round(max(brute * dmg_multi * brute_modifier, 0), DAMAGE_PRECISION)
|
||||
burn = round(max(burn * dmg_multi * burn_modifier, 0), DAMAGE_PRECISION)
|
||||
brute = max(0, brute - brute_reduction)
|
||||
burn = max(0, burn - burn_reduction)
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
attack_type = BURN // bish buzz
|
||||
unarmed_attack_sound = 'sound/weapons/etherealhit.ogg'
|
||||
unarmed_miss_sound = 'sound/weapons/etherealmiss.ogg'
|
||||
brute_modifier = 1.25 //ethereal are weak to brute damage
|
||||
|
||||
/obj/item/bodypart/head/ethereal/update_limb(dropping_limb, is_creating)
|
||||
. = ..()
|
||||
@@ -19,6 +20,7 @@
|
||||
limb_id = SPECIES_ETHEREAL
|
||||
is_dimorphic = FALSE
|
||||
dmg_overlay_type = null
|
||||
brute_modifier = 1.25 //ethereal are weak to brute damage
|
||||
|
||||
/obj/item/bodypart/chest/ethereal/update_limb(dropping_limb, is_creating)
|
||||
. = ..()
|
||||
@@ -35,6 +37,7 @@
|
||||
unarmed_attack_verb = "burn"
|
||||
unarmed_attack_sound = 'sound/weapons/etherealhit.ogg'
|
||||
unarmed_miss_sound = 'sound/weapons/etherealmiss.ogg'
|
||||
brute_modifier = 1.25 //ethereal are weak to brute damage
|
||||
|
||||
/obj/item/bodypart/arm/left/ethereal/update_limb(dropping_limb, is_creating)
|
||||
. = ..()
|
||||
@@ -51,6 +54,7 @@
|
||||
unarmed_attack_verb = "burn"
|
||||
unarmed_attack_sound = 'sound/weapons/etherealhit.ogg'
|
||||
unarmed_miss_sound = 'sound/weapons/etherealmiss.ogg'
|
||||
brute_modifier = 1.25 //ethereal are weak to brute damages
|
||||
|
||||
/obj/item/bodypart/arm/right/ethereal/update_limb(dropping_limb, is_creating)
|
||||
. = ..()
|
||||
@@ -59,7 +63,6 @@
|
||||
var/datum/species/ethereal/eth_holder = potato_oc.dna.species
|
||||
species_color = eth_holder.current_color
|
||||
|
||||
|
||||
/obj/item/bodypart/leg/left/ethereal
|
||||
icon_greyscale = 'icons/mob/species/ethereal/bodyparts.dmi'
|
||||
limb_id = SPECIES_ETHEREAL
|
||||
@@ -67,6 +70,7 @@
|
||||
attack_type = BURN // bish buzz
|
||||
unarmed_attack_sound = 'sound/weapons/etherealhit.ogg'
|
||||
unarmed_miss_sound = 'sound/weapons/etherealmiss.ogg'
|
||||
brute_modifier = 1.25 //ethereal are weak to brute damage
|
||||
|
||||
/obj/item/bodypart/leg/left/ethereal/update_limb(dropping_limb, is_creating)
|
||||
. = ..()
|
||||
@@ -82,6 +86,7 @@
|
||||
attack_type = BURN // bish buzz
|
||||
unarmed_attack_sound = 'sound/weapons/etherealhit.ogg'
|
||||
unarmed_miss_sound = 'sound/weapons/etherealmiss.ogg'
|
||||
brute_modifier = 1.25 //ethereal are weak to brute damage
|
||||
|
||||
/obj/item/bodypart/leg/right/ethereal/update_limb(dropping_limb, is_creating)
|
||||
. = ..()
|
||||
|
||||
@@ -2,29 +2,36 @@
|
||||
/obj/item/bodypart/head/snail
|
||||
limb_id = SPECIES_SNAIL
|
||||
is_dimorphic = FALSE
|
||||
burn_modifier = 2
|
||||
|
||||
/obj/item/bodypart/chest/snail
|
||||
limb_id = SPECIES_SNAIL
|
||||
is_dimorphic = FALSE
|
||||
burn_modifier = 2
|
||||
|
||||
/obj/item/bodypart/arm/left/snail
|
||||
limb_id = SPECIES_SNAIL
|
||||
unarmed_attack_verb = "slap"
|
||||
unarmed_attack_effect = ATTACK_EFFECT_DISARM
|
||||
unarmed_damage_high = 0.5 //snails are soft and squishy
|
||||
burn_modifier = 2
|
||||
|
||||
/obj/item/bodypart/arm/right/snail
|
||||
limb_id = SPECIES_SNAIL
|
||||
unarmed_attack_verb = "slap"
|
||||
unarmed_attack_effect = ATTACK_EFFECT_DISARM
|
||||
unarmed_damage_high = 0.5
|
||||
burn_modifier = 2
|
||||
|
||||
/obj/item/bodypart/leg/left/snail
|
||||
limb_id = SPECIES_SNAIL
|
||||
unarmed_damage_high = 0.5
|
||||
burn_modifier = 2
|
||||
|
||||
/obj/item/bodypart/leg/right/snail
|
||||
limb_id = SPECIES_SNAIL
|
||||
unarmed_damage_high = 0.5
|
||||
burn_modifier = 2
|
||||
|
||||
///ABDUCTOR
|
||||
/obj/item/bodypart/head/abductor
|
||||
@@ -67,32 +74,38 @@
|
||||
limb_id = SPECIES_JELLYPERSON
|
||||
is_dimorphic = TRUE
|
||||
dmg_overlay_type = null
|
||||
burn_modifier = 0.5 // = 1/2x generic burn damage
|
||||
|
||||
/obj/item/bodypart/chest/jelly
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_JELLYPERSON
|
||||
is_dimorphic = TRUE
|
||||
dmg_overlay_type = null
|
||||
burn_modifier = 0.5 // = 1/2x generic burn damage
|
||||
|
||||
/obj/item/bodypart/arm/left/jelly
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_JELLYPERSON
|
||||
dmg_overlay_type = null
|
||||
burn_modifier = 0.5 // = 1/2x generic burn damage
|
||||
|
||||
/obj/item/bodypart/arm/right/jelly
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_JELLYPERSON
|
||||
dmg_overlay_type = null
|
||||
burn_modifier = 0.5 // = 1/2x generic burn damage
|
||||
|
||||
/obj/item/bodypart/leg/left/jelly
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_JELLYPERSON
|
||||
dmg_overlay_type = null
|
||||
burn_modifier = 0.5 // = 1/2x generic burn damage
|
||||
|
||||
/obj/item/bodypart/leg/right/jelly
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_JELLYPERSON
|
||||
dmg_overlay_type = null
|
||||
burn_modifier = 0.5 // = 1/2x generic burn damage
|
||||
|
||||
///SLIME
|
||||
/obj/item/bodypart/head/slime
|
||||
@@ -179,10 +192,12 @@
|
||||
/obj/item/bodypart/head/pod
|
||||
limb_id = SPECIES_PODPERSON
|
||||
is_dimorphic = TRUE
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/chest/pod
|
||||
limb_id = SPECIES_PODPERSON
|
||||
is_dimorphic = TRUE
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/arm/left/pod
|
||||
limb_id = SPECIES_PODPERSON
|
||||
@@ -190,6 +205,7 @@
|
||||
unarmed_attack_effect = ATTACK_EFFECT_CLAW
|
||||
unarmed_attack_sound = 'sound/weapons/slice.ogg'
|
||||
unarmed_miss_sound = 'sound/weapons/slashmiss.ogg'
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/arm/right/pod
|
||||
limb_id = SPECIES_PODPERSON
|
||||
@@ -197,12 +213,15 @@
|
||||
unarmed_attack_effect = ATTACK_EFFECT_CLAW
|
||||
unarmed_attack_sound = 'sound/weapons/slice.ogg'
|
||||
unarmed_miss_sound = 'sound/weapons/slashmiss.ogg'
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/leg/left/pod
|
||||
limb_id = SPECIES_PODPERSON
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/leg/right/pod
|
||||
limb_id = SPECIES_PODPERSON
|
||||
burn_modifier = 1.25
|
||||
|
||||
///FLY
|
||||
/obj/item/bodypart/head/fly
|
||||
@@ -237,32 +256,38 @@
|
||||
limb_id = SPECIES_SHADOW
|
||||
is_dimorphic = FALSE
|
||||
should_draw_greyscale = FALSE
|
||||
burn_modifier = 1.5
|
||||
|
||||
/obj/item/bodypart/chest/shadow
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_SHADOW
|
||||
is_dimorphic = FALSE
|
||||
should_draw_greyscale = FALSE
|
||||
burn_modifier = 1.5
|
||||
|
||||
/obj/item/bodypart/arm/left/shadow
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_SHADOW
|
||||
should_draw_greyscale = FALSE
|
||||
burn_modifier = 1.5
|
||||
|
||||
/obj/item/bodypart/arm/right/shadow
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_SHADOW
|
||||
should_draw_greyscale = FALSE
|
||||
burn_modifier = 1.5
|
||||
|
||||
/obj/item/bodypart/leg/left/shadow
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_SHADOW
|
||||
should_draw_greyscale = FALSE
|
||||
burn_modifier = 1.5
|
||||
|
||||
/obj/item/bodypart/leg/right/shadow
|
||||
biological_state = BIO_INORGANIC
|
||||
limb_id = SPECIES_SHADOW
|
||||
should_draw_greyscale = FALSE
|
||||
burn_modifier = 1.5
|
||||
|
||||
/obj/item/bodypart/arm/left/shadow/nightmare
|
||||
bodypart_traits = list(TRAIT_CHUNKYFINGERS)
|
||||
@@ -313,36 +338,43 @@
|
||||
/obj/item/bodypart/head/mushroom
|
||||
limb_id = SPECIES_MUSHROOM
|
||||
is_dimorphic = TRUE
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/chest/mushroom
|
||||
limb_id = SPECIES_MUSHROOM
|
||||
is_dimorphic = TRUE
|
||||
bodypart_traits = list(TRAIT_NO_JUMPSUIT)
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/arm/left/mushroom
|
||||
limb_id = SPECIES_MUSHROOM
|
||||
unarmed_damage_low = 6
|
||||
unarmed_damage_high = 14
|
||||
unarmed_stun_threshold = 14
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/arm/right/mushroom
|
||||
limb_id = SPECIES_MUSHROOM
|
||||
unarmed_damage_low = 6
|
||||
unarmed_damage_high = 14
|
||||
unarmed_stun_threshold = 14
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/leg/left/mushroom
|
||||
limb_id = SPECIES_MUSHROOM
|
||||
unarmed_damage_low = 9
|
||||
unarmed_damage_high = 21
|
||||
unarmed_stun_threshold = 14
|
||||
burn_modifier = 1.25
|
||||
|
||||
/obj/item/bodypart/leg/right/mushroom
|
||||
limb_id = SPECIES_MUSHROOM
|
||||
unarmed_damage_low = 9
|
||||
unarmed_damage_high = 21
|
||||
unarmed_stun_threshold = 14
|
||||
burn_modifier = 1.25
|
||||
|
||||
//GOLEM
|
||||
/obj/item/bodypart/head/golem
|
||||
icon = 'icons/mob/species/golems.dmi'
|
||||
icon_static = 'icons/mob/species/golems.dmi'
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
is_dimorphic = FALSE
|
||||
should_draw_greyscale = FALSE
|
||||
dmg_overlay_type = null
|
||||
brute_modifier = 1.5 //Plasmemes are weak
|
||||
burn_modifier = 1.5 //Plasmemes are weak
|
||||
|
||||
/obj/item/bodypart/chest/plasmaman
|
||||
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
|
||||
@@ -17,6 +19,8 @@
|
||||
is_dimorphic = FALSE
|
||||
should_draw_greyscale = FALSE
|
||||
dmg_overlay_type = null
|
||||
brute_modifier = 1.5 //Plasmemes are weak
|
||||
burn_modifier = 1.5 //Plasmemes are weak
|
||||
|
||||
/obj/item/bodypart/arm/left/plasmaman
|
||||
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
|
||||
@@ -26,6 +30,8 @@
|
||||
limb_id = SPECIES_PLASMAMAN
|
||||
should_draw_greyscale = FALSE
|
||||
dmg_overlay_type = null
|
||||
brute_modifier = 1.5 //Plasmemes are weak
|
||||
burn_modifier = 1.5 //Plasmemes are weak
|
||||
|
||||
/obj/item/bodypart/arm/right/plasmaman
|
||||
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
|
||||
@@ -35,6 +41,8 @@
|
||||
limb_id = SPECIES_PLASMAMAN
|
||||
should_draw_greyscale = FALSE
|
||||
dmg_overlay_type = null
|
||||
brute_modifier = 1.5 //Plasmemes are weak
|
||||
burn_modifier = 1.5 //Plasmemes are weak
|
||||
|
||||
/obj/item/bodypart/leg/left/plasmaman
|
||||
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
|
||||
@@ -44,6 +52,8 @@
|
||||
limb_id = SPECIES_PLASMAMAN
|
||||
should_draw_greyscale = FALSE
|
||||
dmg_overlay_type = null
|
||||
brute_modifier = 1.5 //Plasmemes are weak
|
||||
burn_modifier = 1.5 //Plasmemes are weak
|
||||
|
||||
/obj/item/bodypart/leg/right/plasmaman
|
||||
icon = 'icons/mob/species/plasmaman/bodyparts.dmi'
|
||||
@@ -53,3 +63,5 @@
|
||||
limb_id = SPECIES_PLASMAMAN
|
||||
should_draw_greyscale = FALSE
|
||||
dmg_overlay_type = null
|
||||
brute_modifier = 1.5 //Plasmemes are weak
|
||||
burn_modifier = 1.5 //Plasmemes are weak
|
||||
|
||||
@@ -15,25 +15,20 @@
|
||||
/obj/item/organ/internal/stomach/golem/on_insert(mob/living/carbon/organ_owner, special)
|
||||
. = ..()
|
||||
RegisterSignal(owner, COMSIG_CARBON_ATTEMPT_EAT, PROC_REF(try_eating))
|
||||
if (!ishuman(organ_owner))
|
||||
if(!ishuman(organ_owner))
|
||||
return
|
||||
if (organ_owner.flags_1 & INITIALIZED_1)
|
||||
setup_physiology(organ_owner)
|
||||
else
|
||||
RegisterSignal(owner, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE, PROC_REF(setup_physiology))
|
||||
setup_physiology(organ_owner)
|
||||
|
||||
/// Physiology doesn't exist yet if this is added on initialisation of a golem, so we need to wait until it does
|
||||
/obj/item/organ/internal/stomach/golem/proc/setup_physiology(mob/living/carbon/human/human_owner)
|
||||
SIGNAL_HANDLER
|
||||
human_owner.physiology?.hunger_mod *= hunger_mod
|
||||
UnregisterSignal(human_owner, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE)
|
||||
|
||||
/obj/item/organ/internal/stomach/golem/on_remove(mob/living/carbon/organ_owner, special)
|
||||
. = ..()
|
||||
UnregisterSignal(organ_owner, COMSIG_CARBON_ATTEMPT_EAT)
|
||||
organ_owner.remove_movespeed_modifier(/datum/movespeed_modifier/golem_hunger)
|
||||
organ_owner.remove_status_effect(/datum/status_effect/golem_statued)
|
||||
if (!ishuman(organ_owner))
|
||||
if(!ishuman(organ_owner))
|
||||
return
|
||||
var/mob/living/carbon/human/human_owner = organ_owner
|
||||
human_owner.physiology?.hunger_mod /= hunger_mod
|
||||
@@ -41,7 +36,7 @@
|
||||
/// Reject food, rocks only
|
||||
/obj/item/organ/internal/stomach/golem/proc/try_eating(mob/living/carbon/source, atom/eating)
|
||||
SIGNAL_HANDLER
|
||||
if (istype(eating, /obj/item/food/golem_food))
|
||||
if(istype(eating, /obj/item/food/golem_food))
|
||||
return
|
||||
source.balloon_alert(source, "minerals only!")
|
||||
return COMSIG_CARBON_BLOCK_EAT
|
||||
|
||||
Reference in New Issue
Block a user