From 7e5ec54d6768daee8953097cfa39ca2fd4c0dbd4 Mon Sep 17 00:00:00 2001 From: RustingWithYou <63625389+RustingWithYou@users.noreply.github.com> Date: Mon, 10 Jun 2024 05:18:00 +1200 Subject: [PATCH] Improves Vaurca Magboot Augment (#19137) The Vaurca integrated mag-claw augment now mimics magboot functionality (not slipping, etc) rather than deploying an entire pair of magboots onto the user. Code shamelessly copied from #18875 --- code/__DEFINES/traits.dm | 5 ++ .../objects/items/weapons/vaurca_items.dm | 19 ------ .../loadout/items/xeno/vaurca.dm | 2 +- .../mob/living/carbon/human/human_movement.dm | 5 ++ code/modules/organs/subtypes/vaurca.dm | 19 ++++-- html/changelogs/RustingWithYou - bugmode.yml | 58 +++++++++++++++++++ 6 files changed, 84 insertions(+), 24 deletions(-) create mode 100644 html/changelogs/RustingWithYou - bugmode.yml diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 08424513949..547a7fa7504 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -176,6 +176,11 @@ /// Traits given by psionics. #define TRAIT_SOURCE_PSIONICS "psionics" +/// Traits given by augments +#define TRAIT_SOURCE_AUGMENT "augment" + +/// This trait makes Check_Shoegrip return TRUE. Used for magboot-like behaviour. +#define TRAIT_SHOE_GRIP "shoe_grip" // DISABILITY TRAITS diff --git a/code/game/objects/items/weapons/vaurca_items.dm b/code/game/objects/items/weapons/vaurca_items.dm index a31b01d00fe..b3206313575 100644 --- a/code/game/objects/items/weapons/vaurca_items.dm +++ b/code/game/objects/items/weapons/vaurca_items.dm @@ -280,25 +280,6 @@ action_button_name = "Toggle the magclaws" -/obj/item/clothing/shoes/magboots/vaurca/aug - name = "integrated mag-claws" - desc = "A magnetic-grip system similar to a set of magboots integrated into a Vaurca's leg chitin." - magpulse = 1 - slowdown = 3 - action_button_name = null - item_flags = ITEM_FLAG_THICK_MATERIAL|ITEM_FLAG_AIRTIGHT|ITEM_FLAG_INJECTION_PORT|ITEM_FLAG_NO_SLIP - canremove = FALSE - -/obj/item/clothing/shoes/magboots/vaurca/aug/throw_at() - usr.drop_from_inventory(src) - -/obj/item/clothing/shoes/magboots/vaurca/aug/dropped() - . = ..() - qdel(src) - -/obj/item/clothing/shoes/magboots/vaurca/aug/negates_gravity() - return TRUE - /obj/item/clothing/suit/space/void/scout name = "scout armor" contained_sprite = 1 diff --git a/code/modules/client/preference_setup/loadout/items/xeno/vaurca.dm b/code/modules/client/preference_setup/loadout/items/xeno/vaurca.dm index 7a353b87fc7..f8ae57aa4b8 100644 --- a/code/modules/client/preference_setup/loadout/items/xeno/vaurca.dm +++ b/code/modules/client/preference_setup/loadout/items/xeno/vaurca.dm @@ -286,7 +286,7 @@ display_name = "vaurca integrated mag-claws" description = "An integrated magnetic grip system, designed for Vaurcae without easy access to magboots." cost = 2 - path = /obj/item/organ/internal/augment/tool/vaurcamag + path = /obj/item/organ/internal/augment/vaurca_mag sort_category = "Xenowear - Vaurca" whitelisted = list(SPECIES_VAURCA_WORKER, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_BULWARK) allowed_roles = list("Shaft Miner", "Engineer", "Atmospheric Technician", "Engineering Apprentice", "Xenoarchaeologist", "Engineering Personnel", "Operations Personnel", "First Responder", "Medical Personnel") diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index b7dda84e112..7dfc835c3f7 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -78,6 +78,9 @@ if(species.can_breathe_water()) tally -= T.movement_cost + if(HAS_TRAIT(src, TRAIT_SHOE_GRIP)) + tally += 1 + tally += GLOB.config.human_delay if(!isnull(facing_dir) && facing_dir != dir) @@ -119,6 +122,8 @@ /mob/living/carbon/human/Check_Shoegrip(checkSpecies = TRUE) if(shoes && (shoes.item_flags & ITEM_FLAG_NO_SLIP) && istype(shoes, /obj/item/clothing/shoes/magboots) && !lying && !buckled_to && !length(grabbed_by)) //magboots + dense_object = no floating. Doesn't work if lying. Grabbedby and buckled_to are for mob carrying, wheelchairs, roller beds, etc. return TRUE + if(HAS_TRAIT(src, TRAIT_SHOE_GRIP)) + return TRUE return FALSE /mob/living/carbon/human/set_dir(var/new_dir, ignore_facing_dir = FALSE) diff --git a/code/modules/organs/subtypes/vaurca.dm b/code/modules/organs/subtypes/vaurca.dm index d6b39d80ba2..11bf2b48a05 100644 --- a/code/modules/organs/subtypes/vaurca.dm +++ b/code/modules/organs/subtypes/vaurca.dm @@ -283,17 +283,28 @@ "wirecutters" ) -/obj/item/organ/internal/augment/tool/vaurcamag +/obj/item/organ/internal/augment/vaurca_mag name = "integrated mag-claws" desc = "An integrated magnetic grip system, designed for Vaurcae without easy access to magboots." icon_state = "suspension" item_state = "suspension" - action_button_name = "Deploy Mag-Claws" + action_button_name = "Activate Mag-Claws" action_button_icon = "magclaws" - augment_type = /obj/item/clothing/shoes/magboots/vaurca/aug parent_organ = BP_GROIN organ_tag = BP_AUG_MAGBOOT - aug_slot = slot_shoes + activable = TRUE + species_restricted = list(SPECIES_VAURCA_WORKER, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_BREEDER, SPECIES_VAURCA_BULWARK, SPECIES_VAURCA_WARFORM) + +/obj/item/organ/internal/augment/vaurca_mag/attack_self(mob/user) + if(use_check_and_message(owner)) + return + if(HAS_TRAIT(owner, TRAIT_SHOE_GRIP)) + to_chat(owner, SPAN_NOTICE("You deactivate \the [src].")) + REMOVE_TRAIT(owner, TRAIT_SHOE_GRIP, TRAIT_SOURCE_AUGMENT) + else + to_chat(owner, SPAN_NOTICE("You activate \the [src].")) + ADD_TRAIT(owner, TRAIT_SHOE_GRIP, TRAIT_SOURCE_AUGMENT) + playsound(get_turf(src), 'sound/effects/magnetclamp.ogg', 20) /obj/item/organ/internal/vaurca/preserve icon = 'icons/obj/organs/vaurca_organs.dmi' diff --git a/html/changelogs/RustingWithYou - bugmode.yml b/html/changelogs/RustingWithYou - bugmode.yml new file mode 100644 index 00000000000..dfab0b0e6aa --- /dev/null +++ b/html/changelogs/RustingWithYou - bugmode.yml @@ -0,0 +1,58 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: RustingWithYou + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - qol: "The Vaurca magboot augment now mimics magboot functionality rather than just deploying a pair of shoes."