From 912add2a1a69f11e63ae2c37a757097313e6cfbe Mon Sep 17 00:00:00 2001 From: FearTheGabby Date: Thu, 20 Feb 2025 05:50:35 -0600 Subject: [PATCH] Adds customization for loadout wheelchairs (#20485) see changelog or video https://github.com/user-attachments/assets/533fd37d-fbe2-472a-9959-7c672f85836b --------- Co-authored-by: Gabby <59633984+feartheblackout@users.noreply.github.com> --- .../structures/stool_bed_chair_nest/stools.dm | 13 ++++- .../stool_bed_chair_nest/wheelchair.dm | 3 + .../preference_setup/loadout/items/utility.dm | 1 + .../SimpleMaroon-customwheelchairstuff.yml | 58 +++++++++++++++++++ 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/SimpleMaroon-customwheelchairstuff.yml diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 0154880de64..8bbb4b111b2 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -22,7 +22,6 @@ return user.visible_message(SPAN_NOTICE("[user] [withdraw_verb]s \the [src.name]."), SPAN_NOTICE("You [withdraw_verb] \the [src.name].")) var/obj/item/material/stool/S = new held_item(src.loc, material.name, padding_material?.name, painted_colour) // Handles all the material code so you don't have to. - TransferComponents(S) if(material_alteration & MATERIAL_ALTERATION_COLOR) // For snowflakes like wood chairs. S.color = material.icon_colour if(material_alteration & MATERIAL_ALTERATION_NAME) @@ -36,6 +35,12 @@ S.add_fingerprint(user) user.put_in_hands(S) S.update_icon() + TransferComponents(S) + if(istype(S, /obj/item/material/stool/chair/wheelchair)) + S.name = name + S.desc = desc + S.color = color + S.update_held_icon() qdel(src) /obj/structure/bed/stool/wood/New(var/newloc) @@ -235,11 +240,15 @@ // playsound(src, deploy_sound ? deploy_sound : drop_sound, DROP_SOUND_VOLUME) user.drop_from_inventory(src) var/obj/structure/bed/stool/S = new origin_type(get_turf(loc), material?.name, padding_material?.name, painted_colour) // Fuck me. - TransferComponents(S) S.dir = user.dir // Plant it where the user's facing if(blood_DNA) S.blood_DNA |= blood_DNA // Transfer blood. S.update_icon() + TransferComponents(S) + if(istype(S, /obj/structure/bed/stool/chair/office/wheelchair)) + S.name = name + S.desc = desc + S.color = color qdel(src) /obj/item/material/stool/update_icon() diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 55d41472207..76efb09eda1 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -129,6 +129,9 @@ usr.pulledby = null ..() +/obj/structure/bed/stool/chair/office/wheelchair/generate_strings() + return + /obj/item/material/stool/chair/wheelchair name = "wheelchair" desc = "A folded wheelchair that can be carried around." diff --git a/code/modules/client/preference_setup/loadout/items/utility.dm b/code/modules/client/preference_setup/loadout/items/utility.dm index 143cbb3aae4..0310ad4f9c4 100644 --- a/code/modules/client/preference_setup/loadout/items/utility.dm +++ b/code/modules/client/preference_setup/loadout/items/utility.dm @@ -121,6 +121,7 @@ display_name = "wheelchair" path = /obj/item/material/stool/chair/wheelchair cost = 4 + flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION /datum/gear/utility/business_card_holder display_name = "business card holder" diff --git a/html/changelogs/SimpleMaroon-customwheelchairstuff.yml b/html/changelogs/SimpleMaroon-customwheelchairstuff.yml new file mode 100644 index 00000000000..e419f397205 --- /dev/null +++ b/html/changelogs/SimpleMaroon-customwheelchairstuff.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: SimpleMaroon + +# 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: "Wheelchairs in the loadout can now be customized by name, description, and colorability."