mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
SPECIES NUKING 2023: Moves speed modifier to bodyparts (#76336)
## About The Pull Request As we all know, speed is stored in the legs. ## Why It's Good For The Game Potential for more medical abominations. Potential for adding augmented legs that make you speedier (?) ## Changelog 🆑 refactor: Species speed is now stored in bodyparts. Leg transplants from slower species will make you slower. /🆑 --------- Co-authored-by: san7890 <the@san7890.com> Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
This commit is contained in:
co-authored by
san7890
ATH1909
parent
fe3738ffa0
commit
57ad2d8a8e
@@ -1021,7 +1021,6 @@
|
||||
if(!new_bodypart.bodypart_disabled)
|
||||
set_usable_hands(usable_hands + 1)
|
||||
|
||||
|
||||
///Proc to hook behavior on bodypart removals. Do not directly call. You're looking for [/obj/item/bodypart/proc/drop_limb()].
|
||||
/mob/living/carbon/proc/remove_bodypart(obj/item/bodypart/old_bodypart)
|
||||
SHOULD_NOT_OVERRIDE(TRUE)
|
||||
@@ -1037,6 +1036,12 @@
|
||||
if(!old_bodypart.bodypart_disabled)
|
||||
set_usable_hands(usable_hands - 1)
|
||||
|
||||
///Updates the bodypart speed modifier based on our bodyparts.
|
||||
/mob/living/carbon/proc/update_bodypart_speed_modifier()
|
||||
var/final_modification = 0
|
||||
for(var/obj/item/bodypart/bodypart as anything in bodyparts)
|
||||
final_modification += bodypart.speed_modifier
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/bodypart, final_modification)
|
||||
|
||||
/mob/living/carbon/proc/create_internal_organs()
|
||||
for(var/obj/item/organ/internal/internal_organ in organs)
|
||||
|
||||
@@ -95,8 +95,6 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
///Replaces default appendix with a different organ.
|
||||
var/obj/item/organ/internal/appendix/mutantappendix = /obj/item/organ/internal/appendix
|
||||
|
||||
///Multiplier for the race's speed. Positive numbers make it move slower, negative numbers make it move faster.
|
||||
var/speedmod = 0
|
||||
/**
|
||||
* Percentage modifier for overall defense of the race, or less defense, if it's negative
|
||||
* THIS MODIFIES ALL DAMAGE TYPES.
|
||||
@@ -485,8 +483,6 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
for(var/i in inherent_factions)
|
||||
C.faction += i //Using +=/-= for this in case you also gain the faction from a different source.
|
||||
|
||||
C.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/species, multiplicative_slowdown = speedmod)
|
||||
|
||||
SEND_SIGNAL(C, COMSIG_SPECIES_GAIN, src, old_species)
|
||||
|
||||
properly_gained = TRUE
|
||||
@@ -525,8 +521,6 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
|
||||
clear_tail_moodlets(C)
|
||||
|
||||
C.remove_movespeed_modifier(/datum/movespeed_modifier/species)
|
||||
|
||||
SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
TRAIT_NO_UNDERWEAR,
|
||||
)
|
||||
inherent_factions = list(FACTION_MUSHROOM)
|
||||
speedmod = 1.5 //faster than golems but not by much
|
||||
|
||||
no_equip_flags = ITEM_SLOT_MASK | ITEM_SLOT_OCLOTHING | ITEM_SLOT_GLOVES | ITEM_SLOT_FEET | ITEM_SLOT_ICLOTHING
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
)
|
||||
|
||||
coldmod = 0.5 //snails only come out when its cold and wet
|
||||
speedmod = 6
|
||||
siemens_coeff = 2 //snails are mostly water
|
||||
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | RACE_SWAP
|
||||
sexes = FALSE //snails are hermaphrodites
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// 1spooky
|
||||
name = "High-Functioning Zombie"
|
||||
id = SPECIES_ZOMBIE
|
||||
sexes = 0
|
||||
sexes = FALSE
|
||||
meat = /obj/item/food/meat/slab/human/mutant/zombie
|
||||
mutanttongue = /obj/item/organ/internal/tongue/zombie
|
||||
inherent_traits = list(
|
||||
@@ -92,7 +92,6 @@
|
||||
name = "Infectious Zombie"
|
||||
id = SPECIES_ZOMBIE_INFECTIOUS
|
||||
examine_limb_id = SPECIES_ZOMBIE
|
||||
speedmod = 1.6
|
||||
damage_modifier = 20 // 120 damage to KO a zombie, which kills it
|
||||
mutanteyes = /obj/item/organ/internal/eyes/zombie
|
||||
mutantbrain = /obj/item/organ/internal/brain/zombie
|
||||
@@ -120,6 +119,15 @@
|
||||
TRAIT_STABLELIVER, // Not necessary but for consistency with above
|
||||
)
|
||||
|
||||
// Infectious zombies have slow legs
|
||||
bodypart_overrides = list(
|
||||
BODY_ZONE_HEAD = /obj/item/bodypart/head/zombie,
|
||||
BODY_ZONE_CHEST = /obj/item/bodypart/chest/zombie,
|
||||
BODY_ZONE_L_ARM = /obj/item/bodypart/arm/left/zombie,
|
||||
BODY_ZONE_R_ARM = /obj/item/bodypart/arm/right/zombie,
|
||||
BODY_ZONE_L_LEG = /obj/item/bodypart/leg/left/zombie/infectious,
|
||||
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/zombie/infectious,
|
||||
)
|
||||
/// The rate the zombies regenerate at
|
||||
var/heal_rate = 0.5
|
||||
/// The cooldown before the zombie can start regenerating
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
multiplicative_slowdown = 2
|
||||
flags = IGNORE_NOSLOW
|
||||
|
||||
/datum/movespeed_modifier/species
|
||||
/datum/movespeed_modifier/bodypart
|
||||
movetypes = ~FLYING
|
||||
variable = TRUE
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
var/list/embedded_objects = list()
|
||||
/// are we a hand? if so, which one!
|
||||
var/held_index = 0
|
||||
/// A speed modifier we apply to the owner when attached, if any. Positive numbers make it move slower, negative numbers make it move faster.
|
||||
var/speed_modifier = 0
|
||||
|
||||
// Limb disabling variables
|
||||
///Controls if the limb is disabled. TRUE means it is disabled (similar to being removed, but still present for the sake of targeted interactions).
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
//limb is out and about, it can't really be considered an implant
|
||||
bodypart_flags &= ~BODYPART_IMPLANTED
|
||||
owner.remove_bodypart(src)
|
||||
if(speed_modifier)
|
||||
owner.update_bodypart_speed_modifier()
|
||||
|
||||
for(var/datum/wound/wound as anything in wounds)
|
||||
wound.remove_wound(TRUE)
|
||||
@@ -336,6 +338,8 @@
|
||||
if(hand)
|
||||
hand.update_appearance()
|
||||
new_limb_owner.update_worn_gloves()
|
||||
if(speed_modifier)
|
||||
new_limb_owner.update_bodypart_speed_modifier()
|
||||
|
||||
if(special) //non conventional limb attachment
|
||||
for(var/datum/surgery/attach_surgery as anything in new_limb_owner.surgeries) //if we had an ongoing surgery to attach a new limb, we stop it.
|
||||
|
||||
@@ -28,11 +28,13 @@
|
||||
limb_id = SPECIES_SNAIL
|
||||
unarmed_damage_high = 0.5
|
||||
burn_modifier = 2
|
||||
speed_modifier = 3 //disgustingly slow
|
||||
|
||||
/obj/item/bodypart/leg/right/snail
|
||||
limb_id = SPECIES_SNAIL
|
||||
unarmed_damage_high = 0.5
|
||||
burn_modifier = 2
|
||||
speed_modifier = 3 //disgustingly slow
|
||||
|
||||
///ABDUCTOR
|
||||
/obj/item/bodypart/head/abductor
|
||||
@@ -194,6 +196,16 @@
|
||||
limb_id = SPECIES_ZOMBIE
|
||||
should_draw_greyscale = FALSE
|
||||
|
||||
/obj/item/bodypart/leg/left/zombie/infectious
|
||||
limb_id = SPECIES_ZOMBIE
|
||||
should_draw_greyscale = FALSE
|
||||
speed_modifier = 0.8 //braaaaains
|
||||
|
||||
/obj/item/bodypart/leg/right/zombie/infectious
|
||||
limb_id = SPECIES_ZOMBIE
|
||||
should_draw_greyscale = FALSE
|
||||
speed_modifier = 0.8 //braaaaains
|
||||
|
||||
///PODPEOPLE
|
||||
/obj/item/bodypart/head/pod
|
||||
limb_id = SPECIES_PODPERSON
|
||||
@@ -377,6 +389,7 @@
|
||||
unarmed_damage_high = 21
|
||||
unarmed_stun_threshold = 14
|
||||
burn_modifier = 1.25
|
||||
speed_modifier = 0.75 //big big fungus
|
||||
|
||||
/obj/item/bodypart/leg/right/mushroom
|
||||
limb_id = SPECIES_MUSHROOM
|
||||
@@ -384,6 +397,7 @@
|
||||
unarmed_damage_high = 21
|
||||
unarmed_stun_threshold = 14
|
||||
burn_modifier = 1.25
|
||||
speed_modifier = 0.75 //big fungus big fungus
|
||||
|
||||
//GOLEM
|
||||
/obj/item/bodypart/head/golem
|
||||
|
||||
Reference in New Issue
Block a user