From a6b4229591df88cd65f637b600a033e0bfd18678 Mon Sep 17 00:00:00 2001 From: Casper3667 Date: Sat, 31 Jul 2021 12:48:46 +0200 Subject: [PATCH] Fluff based augments (#12223) --- code/__defines/mobs.dm | 2 + .../loadout/loadout_augments.dm | 29 ++++++++ code/modules/clothing/glasses/glasses.dm | 24 +++++++ code/modules/organs/subtypes/augment.dm | 69 +++++++++++++++++-- html/changelogs/AugmentUpgrade.yml | 8 +++ 5 files changed, 126 insertions(+), 6 deletions(-) create mode 100644 html/changelogs/AugmentUpgrade.yml diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index fd919cc648a..03a204a3de1 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -166,6 +166,8 @@ #define BP_AUG_EMOTION "emotional manipulator" #define BP_AUG_ENCHANED_VISION "vision enhanced retinas" #define BP_AUG_SIGHTLIGHTS "ocular installed sightlights" +#define BP_AUG_CORRECTIVE_LENS "corrective lenses" +#define BP_AUG_GLARE_DAMPENER "glare dampeners" //Organ defines #define PROCESS_ACCURACY 10 diff --git a/code/modules/client/preference_setup/loadout/loadout_augments.dm b/code/modules/client/preference_setup/loadout/loadout_augments.dm index 29219b0baca..ae24e7665d9 100644 --- a/code/modules/client/preference_setup/loadout/loadout_augments.dm +++ b/code/modules/client/preference_setup/loadout/loadout_augments.dm @@ -131,3 +131,32 @@ path = /obj/item/organ/internal/augment/zenghu_plate whitelisted = list(SPECIES_HUMAN, SPECIES_HUMAN_OFFWORLD, SPECIES_VAURCA_WORKER, SPECIES_VAURCA_WARRIOR, SPECIES_SKRELL, SPECIES_IPC_G1, SPECIES_IPC_G2, SPECIES_IPC_XION, SPECIES_IPC_ZENGHU, SPECIES_IPC_BISHOP, SPECIES_IPC_SHELL) faction = "Zeng-Hu Pharmaceuticals" + +/datum/gear/augment/corrective_lenses + display_name = "retractable corrective lenses" + description = "A set of corrective lenses that can be deployed & retracted." + path = /obj/item/organ/internal/augment/tool/correctivelens + +/datum/gear/augment/head_fluff + display_name = "Custom head augmentation" + description = "A fluff based augmentation that can be renamed/redescribed to appear as something else for RP purposes." + path = /obj/item/organ/internal/augment/head_fluff + flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION + +/datum/gear/augment/chest_fluff + display_name = "Custom chest augmentation" + description = "A fluff based augmentation that can be renamed/redescribed to appear as something else for RP purposes." + path = /obj/item/organ/internal/augment/head_fluff/chest_fluff + flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION + +/datum/gear/augment/rhand_fluff + display_name = "Custom right hand augmentation" + description = "A fluff based augmentation that can be renamed/redescribed to appear as something else for RP purposes." + path = /obj/item/organ/internal/augment/head_fluff/rhand_fluff + flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION + +/datum/gear/augment/lhand_fluff + display_name = "Custom left hand augmentation" + description = "A fluff based augmentation that can be renamed/redescribed to appear as something else for RP purposes." + path = /obj/item/organ/internal/augment/head_fluff/lhand_fluff + flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 4efb25b4924..5d75ce3e1fa 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -408,6 +408,14 @@ BLIND // can't see anything icon_state = "circle_glasses" item_state = "circle_glasses" +/obj/item/clothing/glasses/aug/glasses + name = "corrective lenses" + desc = "Corrective lenses made for those who have trouble seeing." + icon_state = "glasses" + item_state = "glasses" + prescription = 7 + body_parts_covered = 0 + /obj/item/clothing/glasses/sunglasses name = "sunglasses" desc = "Strangely ancient technology used to help provide rudimentary eye cover." @@ -512,6 +520,22 @@ BLIND // can't see anything update_clothing_icon() usr.update_action_buttons() +/obj/item/clothing/glasses/aug/welding + name = "glare dampeners" + desc = "Protects the eyes from welders." + icon_state = "welding-g" + item_state = "welding-g" + item_flags = THICKMATERIAL + flash_protection = FLASH_PROTECTION_MAJOR + tint = TINT_HEAVY + +/obj/item/clothing/glasses/aug/throw_at() + usr.drop_from_inventory(src) + +/obj/item/clothing/glasses/aug/dropped() + loc = null + qdel(src) + /obj/item/clothing/glasses/welding/superior name = "superior welding goggles" desc = "Welding goggles made from more expensive materials, strangely smells like potatoes." diff --git a/code/modules/organs/subtypes/augment.dm b/code/modules/organs/subtypes/augment.dm index ef516007777..ed865c47021 100644 --- a/code/modules/organs/subtypes/augment.dm +++ b/code/modules/organs/subtypes/augment.dm @@ -91,7 +91,7 @@ cooldown = 10 activable = TRUE var/obj/item/augment_type - + var/aug_slot = slot_r_hand /obj/item/organ/internal/augment/tool/attack_self(var/mob/user) . = ..() @@ -99,20 +99,22 @@ if(!.) return FALSE - if(!augment_type) return FALSE if (locate(augment_type) in owner) - to_chat(owner, SPAN_WARNING("\The [src] is already enabled!")) + var/obj/slot_item = locate(augment_type) in owner + owner.drop_from_inventory(slot_item) + qdel(slot_item) + owner.visible_message(SPAN_NOTICE("\The [slot_item] slides back into \the [owner]'s [owner.organs_by_name[parent_organ]]."), SPAN_NOTICE("You retract \the [slot_item]!")) return - if(owner.get_active_hand()) - to_chat(owner, SPAN_WARNING("You must empty your active hand before enabling your [src]!")) + if (owner.get_equipped_item(aug_slot)) + to_chat(owner, SPAN_WARNING("Something is stopping you from enabling your [src]!")) return var/obj/item/M = new augment_type(owner) - owner.put_in_active_hand(M) + owner.equip_to_slot(M, aug_slot) owner.visible_message(SPAN_NOTICE("\The [M] slides out of \the [owner]'s [owner.organs_by_name[parent_organ]]."), SPAN_NOTICE("You deploy \the [M]!")) /obj/item/organ/internal/augment/tool/combitool @@ -126,6 +128,7 @@ /obj/item/organ/internal/augment/tool/combitool/left parent_organ = BP_L_HAND + aug_slot = slot_l_hand /obj/item/organ/internal/augment/tool/combitool/lighter name = "integrated lighter" @@ -137,6 +140,7 @@ /obj/item/organ/internal/augment/tool/combitool/lighter/left parent_organ = BP_L_HAND + aug_slot = slot_l_hand /obj/item/organ/internal/augment/health_scanner name = "integrated health scanner" @@ -587,3 +591,56 @@ icon_state = "zenghu_plate" on_mob_icon = 'icons/mob/human_races/augments_external.dmi' parent_organ = BP_HEAD + +/obj/item/organ/internal/augment/head_fluff + name = "head augmentation" + desc = "An augment installed inside the head of someone." + parent_organ = BP_HEAD + +/obj/item/organ/internal/augment/head_fluff/chest_fluff + name = "chest augmentation" + desc = "An augment installed inside the chest of someone." + parent_organ = BP_CHEST + +/obj/item/organ/internal/augment/head_fluff/rhand_fluff + name = "right hand augmentation" + desc = "An augment installed inside the right hand of someone." + parent_organ = BP_R_HAND + +/obj/item/organ/internal/augment/head_fluff/lhand_fluff + name = "left hand augmentation" + desc = "An augment installed inside the left hand of someone." + parent_organ = BP_L_HAND + +/obj/item/organ/internal/augment/head_fluff/die() + ..() + if (owner) + to_chat(owner, SPAN_DANGER("You sense your [name] stops functioning!")) + +/obj/item/organ/internal/augment/head_fluff/process() + ..() + if (is_broken() && !ORGAN_DEAD) + if (prob(5)) + to_chat(owner, SPAN_WARNING("You sense your [name] isn't working right!")) + +/obj/item/organ/internal/augment/head_fluff/removed() + if (owner) + to_chat(owner, SPAN_DANGER("You lose your connection with \the [name]!")) + ..() + +/obj/item/organ/internal/augment/tool/correctivelens + name = "corrective lenses" + icon_state = "augment-tool" + action_button_name = "Deploy Corrective Lenses" + action_button_icon = "augment-tool" + parent_organ = BP_EYES + organ_tag = BP_AUG_CORRECTIVE_LENS + augment_type = /obj/item/clothing/glasses/aug/glasses + aug_slot = slot_glasses + +/obj/item/organ/internal/augment/tool/correctivelens/glare_dampener + name = "glare dapmeners" + icon_state = "augment-tool" + action_button_name = "Deploy Glare Dampeners" + organ_tag = BP_AUG_GLARE_DAMPENER + augment_type = /obj/item/clothing/glasses/aug/welding \ No newline at end of file diff --git a/html/changelogs/AugmentUpgrade.yml b/html/changelogs/AugmentUpgrade.yml new file mode 100644 index 00000000000..1460b708850 --- /dev/null +++ b/html/changelogs/AugmentUpgrade.yml @@ -0,0 +1,8 @@ +author: TheGreyWolf + +delete-after: True + +changes: + - rscadd: "Corrective lenses have been added to the loadout under augments." + - rscadd: "A new series of fluff based augments have been added to the loadout. They have no mechanical effect but allows their name and description to be set. Currently they exist for the head, upper body, left hand and right hand limbs." + - tweak: "Augments deploying something now only deploys it to the slot it is attached to. They can also retract it by hitting the action button again."