Skip to content

Commit

Permalink
QOL Fixes for Psionic Armor (#32)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
<details>
<summary>
	About The Pull Request
</summary>
<hr>

Adds two functionalities to psionic armor:
1. Clothing that used to be replaced entirely by the power is now
dropped on the floor when using the power.
2. Equipment in the suit storage slot is now reequipped on resolution of
the power.

This change also fixes some of the grammar and spelling in the power
descriptions and updates the messages displayed in chat to reflect the
fact that the psionic moth god no longer eats the psion's clothing when
using this armor power.
	
<hr>
</details>

## Changelog
:cl:
tweak: Psionic armor powers no longer eat your clothing and reequip
anything you had in your suit slot on use.
:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

Co-authored-by: valkyria-gk <[email protected]>
  • Loading branch information
SigDoesCode and valkyria-gk authored Aug 17, 2024
1 parent 129b81b commit b678da5
Showing 1 changed file with 42 additions and 21 deletions.
63 changes: 42 additions & 21 deletions code/modules/psionics/psion_powers/armour_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,75 @@
/mob/living/carbon/human/proc/psionic_armor()
set category = "Psionic powers"
set name = "Psionic armor (4)"
set desc = "Creates a set of armor from somewhere that does not exist. Anything taken off disappears and whatever clothing you are wearing when this power is used is destroyed."
set desc = "Creates a set of armor from somewhere that does not exist. Any part disappears once removed from your body. Your current suit, headgear, gloves, and shoes will be discarded on the floor."
var/psi_point_cost = 4
var/mob/living/carbon/human/user = src
var/obj/item/organ/internal/psionic_tumor/PT = user.first_organ_by_process(BP_PSION)

if(PT && PT.pay_power_cost(psi_point_cost) && PT.check_possibility())
var/list/affected_slots = list(slot_shoes, slot_wear_suit, slot_gloves, slot_head) //This code lists slots for equipping armor, so we can drop their clothing.
playsound(usr.loc, pick('sound/mecha/lowpower.ogg','sound/effects/magic/Blind.ogg','sound/effects/phasein.ogg'), 50, 1, -3)
user.visible_message(
SPAN_DANGER("[src]'s flesh and clothing contort and shimmer, reforming into flowing, black and bronze robes!"),
SPAN_DANGER("Your flesh and clothing meld painfully, shimmering out of this reality as they are replaced with a set of armored robes!")
SPAN_DANGER("[src]'s clothes fall away as their flesh contorts and shimmers, reforming into flowing, black and bronze robes!"),
SPAN_DANGER("Your clothing falls away as your flesh shimmers painfully, easing as it is replaced by a set of armored robes!")
)
user.replace_in_slot(new /obj/item/clothing/shoes/occultgreaves, slot_shoes, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/suit/space/occultist, slot_wear_suit, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/gloves/occultgloves, slot_gloves, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/head/helmet/space/occulthood, slot_head, skip_covering_check = TRUE)
var/obj/item/suitequipment = get_equipped_item(slot_s_store) //If they hav esomething in the suit storage slot we want to reequip it afterwards.
for(var/location in affected_slots) //Loading the clothing that they're wearing so we can drop it.
var/I = get_equipped_item(location)
unEquip(I) //Drop the equipment.
user.replace_in_slot(new /obj/item/clothing/shoes/occultgreaves, slot_shoes, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/suit/space/occultist, slot_wear_suit, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/gloves/occultgloves, slot_gloves, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/head/helmet/space/occulthood, slot_head, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
if(suitequipment) //If they had something on their back previously, this will be true. Otherwise, nope.
user.equip_to_slot_if_possible(suitequipment, slot_s_store)

/mob/living/carbon/human/proc/Hpsi_armor()
set category = "Psionic powers"
set name = "Durable shell (8)"
set desc = "Creates a set of very strong armor, using your mind and the environment as the material. Each piece of armor replaces the clothes you are already wearing, and provides additional strength to your body, in exchange for your psionic abilities."
set desc = "Creates a set of very strong armor, using your mind and the environment as the material. your clothes wil be discarded on the floor. Each piece of armor provides additional strength to your body, in exchange for your psionic abilities."
var/psi_point_cost = 8
var/mob/living/carbon/human/user = src
var/obj/item/organ/internal/psionic_tumor/PT = user.first_organ_by_process(BP_PSION)
if(PT && PT.pay_power_cost(psi_point_cost) && PT.check_possibility())
var/list/affected_slots = list(slot_shoes, slot_wear_suit, slot_gloves, slot_head)
playsound(usr.loc, pick('sound/mecha/lowpower.ogg','sound/effects/magic/Blind.ogg','sound/effects/phasein.ogg'), 50, 1, -3)
user.visible_message(
SPAN_DANGER("[src]'s Flesh and clothing merge together, tiny crumbs, small objects, streams of thoughts and ideas are pulled together to them, forming on their body a solid armor woven from matter itself, held together by only one will of the psion!"),
SPAN_DANGER("Your flesh and clothes, the surrounding space and the thoughts of others are put together, forming a massive obsidian armor on your body!")
SPAN_DANGER("[src]'s clothes fall away as a shimmering aura surrounds them for a moment, fading to reveal a shiny, black suit of solid obsidian armor!"),
SPAN_DANGER("Your clothing falls away as a shimmering aura surrounds your body, solidifying into a slick, black suit of obsidian armor!")
)
user.replace_in_slot(new /obj/item/clothing/shoes/occultHgreaves, slot_shoes, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/gloves/occultHgloves, slot_gloves, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/suit/space/occulHtist, slot_wear_suit, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/head/helmet/space/occultHhood, slot_head, skip_covering_check = TRUE)
var/obj/item/suitequipment = get_equipped_item(slot_s_store)
for(var/location in affected_slots)
var/I = get_equipped_item(location)
unEquip(I)
user.replace_in_slot(new /obj/item/clothing/shoes/occultHgreaves, slot_shoes, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/gloves/occultHgloves, slot_gloves, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/suit/space/occulHtist, slot_wear_suit, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/head/helmet/space/occultHhood, slot_head, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
if(suitequipment)
user.equip_to_slot_if_possible(suitequipment, slot_s_store)

/mob/living/carbon/human/proc/Light_psi_armor()
set category = "Psionic powers"
set name = "Void robe (6)"
set desc = "When applied, it creates an ultra-light protected cloak, spurring the wearer to new adventures in the kingdom of the king of dreams! Each part of the kit enhances the psion's thinking abilities and accelerates his step."
set desc = "When applied, it creates an ultra-light protected cloak, spurring the wearer to new adventures in the kingdom of the king of dreams! Each part of the kit enhances the psion's thinking abilities and accelerates his step. your current clothing will be discarded on the floor."
var/psi_point_cost = 6
var/mob/living/carbon/human/user = src
var/obj/item/organ/internal/psionic_tumor/PT = user.first_organ_by_process(BP_PSION)
if(PT && PT.pay_power_cost(psi_point_cost) && PT.check_possibility())
var/list/affected_slots = list(slot_shoes, slot_wear_suit, slot_gloves, slot_head)
playsound(usr.loc, pick('sound/mecha/lowpower.ogg','sound/effects/magic/Blind.ogg','sound/hallucinations/i_see_you2.ogg','sound/effects/phasein.ogg'), 50, 1, 1, -3)
user.visible_message(
SPAN_DANGER("[src]'s Flesh and clothing merge together, tiny crumbs, small objects, streams of thoughts and ideas are pulled together to them, forming on their body a solid armor woven from matter itself, held together by only one will of the psion!"),
SPAN_DANGER("Your flesh and clothes, the surrounding space and the thoughts of others are put together, forming a massive obsidian armor on your body!")
SPAN_DANGER("[src]'s clothes fall away as a shimmering aura surrounds them for a moment, fading to reveal a shimmering cloak of psionic metamaterial!"),
SPAN_DANGER("Your clothing falls away as a shimmering aura surrounds your body, solidifying into a shimmering cloak of psionic metamaterial!")
)
user.replace_in_slot(new /obj/item/clothing/shoes/occultLgreaves, slot_shoes, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/gloves/occultLgloves, slot_gloves, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/suit/space/occulLtist, slot_wear_suit, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/head/helmet/space/occultLhood, slot_head, skip_covering_check = TRUE)
var/obj/item/suitequipment = get_equipped_item(slot_s_store)
for(var/location in affected_slots)
var/I = get_equipped_item(location)
unEquip(I)
user.replace_in_slot(new /obj/item/clothing/shoes/occultLgreaves, slot_shoes, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/gloves/occultLgloves, slot_gloves, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/suit/space/occulLtist, slot_wear_suit, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
user.replace_in_slot(new /obj/item/clothing/head/helmet/space/occultLhood, slot_head, drop_if_unable_to_store = TRUE, skip_covering_check = TRUE)
if(suitequipment)
user.equip_to_slot_if_possible(suitequipment, slot_s_store)

0 comments on commit b678da5

Please sign in to comment.