From d5b3bcc2998b0c3a3dbb8dab9de6c1f7d213e307 Mon Sep 17 00:00:00 2001 From: Marina <50789504+KirbyDaMaster@users.noreply.github.com> Date: Fri, 23 Sep 2022 23:39:26 -0700 Subject: [PATCH] Oops! All prosthetics! Adds -6 quirk with all prosthetic limbs + Icon Tutorial (#69743) Co-authored-by: BordListian Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> --- .../subsystem/processing/quirks.dm | 14 +++--- code/datums/quirks/negative.dm | 36 ++++++++++---- code/modules/surgery/bodyparts/helpers.dm | 6 +++ tgui/packages/tgfont/README_ICON_TUTORIAL.txt | 13 +++++ .../packages/tgfont/icons/prosthetic-full.svg | 45 ++++++++++++++++++ tgui/packages/tgfont/static/tgfont.css | 15 +++--- tgui/packages/tgfont/static/tgfont.eot | Bin 4040 -> 4220 bytes tgui/packages/tgfont/static/tgfont.woff2 | Bin 1824 -> 1924 bytes 8 files changed, 108 insertions(+), 21 deletions(-) create mode 100644 tgui/packages/tgfont/README_ICON_TUTORIAL.txt create mode 100644 tgui/packages/tgfont/icons/prosthetic-full.svg diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index f485dc347d2..9452ceb1c8e 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -18,14 +18,16 @@ PROCESSING_SUBSYSTEM_DEF(quirks) /// A list of quirks that can not be used with each other. Format: list(quirk1,quirk2),list(quirk3,quirk4) var/static/list/quirk_blacklist = list( - list("Blind","Nearsighted"), - list("Jolly","Depression","Apathetic","Hypersensitive"), - list("Ageusia","Vegetarian","Deviant Tastes", "Gamer"), - list("Ananas Affinity","Ananas Aversion", "Gamer"), - list("Alcohol Tolerance","Light Drinker"), - list("Clown Enjoyer","Mime Fan"), + list("Blind", "Nearsighted"), + list("Jolly", "Depression", "Apathetic", "Hypersensitive"), + list("Ageusia", "Vegetarian", "Deviant Tastes", "Gamer"), + list("Ananas Affinity", "Ananas Aversion", "Gamer"), + list("Alcohol Tolerance", "Light Drinker"), + list("Clown Enjoyer", "Mime Fan"), list("Bad Touch", "Friendly"), list("Extrovert", "Introvert"), + list("Prosthetic Limb", "Quadruple Amputee"), + list("Quadruple Amputee", "Paraplegic","Frail"), ) /datum/controller/subsystem/processing/quirks/Initialize() diff --git a/code/datums/quirks/negative.dm b/code/datums/quirks/negative.dm index 2fb02a5dc1f..51b59d13a9f 100644 --- a/code/datums/quirks/negative.dm +++ b/code/datums/quirks/negative.dm @@ -420,11 +420,13 @@ medical_record_text = "Patient suffers from prosopagnosia and cannot recognize faces." hardcore_value = 5 + + /datum/quirk/prosthetic_limb name = "Prosthetic Limb" desc = "An accident caused you to lose one of your limbs. Because of this, you now have a random prosthetic!" icon = "tg-prosthetic-leg" - value = -4 + value = -3 var/slot_string = "limb" medical_record_text = "During physical examination, patient was found to have a prosthetic limb." hardcore_value = 3 @@ -432,7 +434,6 @@ /datum/quirk/prosthetic_limb/add_unique() var/limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) var/mob/living/carbon/human/human_holder = quirk_holder - var/obj/item/bodypart/old_part = human_holder.get_bodypart(limb_slot) var/obj/item/bodypart/prosthetic switch(limb_slot) if(BODY_ZONE_L_ARM) @@ -447,13 +448,30 @@ if(BODY_ZONE_R_LEG) prosthetic = new/obj/item/bodypart/r_leg/robot/surplus(quirk_holder) slot_string = "right leg" - prosthetic.replace_limb(human_holder) - qdel(old_part) - human_holder.regenerate_icons() + human_holder.del_and_replace_bodypart(limb_slot, prosthetic) /datum/quirk/prosthetic_limb/post_add() - to_chat(quirk_holder, "Your [slot_string] has been replaced with a surplus prosthetic. It is fragile and will easily come apart under duress. Additionally, \ - you need to use a welding tool and cables to repair it, instead of bruise packs and ointment.") + to_chat(quirk_holder, span_boldannounce("Your [slot_string] has been replaced with a surplus prosthetic. It is fragile and will easily come apart under duress. Additionally, \ + you need to use a welding tool and cables to repair it, instead of bruise packs and ointment.")) + +/datum/quirk/quadruple_amputee + name = "Quadruple Amputee" + desc = "Oops! All Prosthetics! Due to some truly cruel cosmic punishment, all your limbs have been taken from you." + icon = "tg-prosthetic-full" + value = -6 + medical_record_text = "During physical examination, patient was found to have all prosthetic limbs." + hardcore_value = 6 + +/datum/quirk/quadruple_amputee/add_unique() + var/mob/living/carbon/human/human_holder = quirk_holder + human_holder.del_and_replace_bodypart(BODY_ZONE_L_ARM, new/obj/item/bodypart/l_arm/robot/surplus(quirk_holder)) + human_holder.del_and_replace_bodypart(BODY_ZONE_R_ARM, new/obj/item/bodypart/r_arm/robot/surplus(quirk_holder)) + human_holder.del_and_replace_bodypart(BODY_ZONE_L_LEG, new/obj/item/bodypart/l_leg/robot/surplus(quirk_holder)) + human_holder.del_and_replace_bodypart(BODY_ZONE_R_LEG, new/obj/item/bodypart/r_leg/robot/surplus(quirk_holder)) + +/datum/quirk/quadruple_amputee/post_add() + to_chat(quirk_holder, span_boldannounce("All your limbs have been replaced with surplus prosthetics. They are fragile and will easily come apart under duress. Additionally, \ + you need to use a welding tool and cables to repair them, instead of bruise packs and ointment.")) /datum/quirk/pushover name = "Pushover" @@ -547,7 +565,7 @@ for(var/word in message_split) if(prob(max(5,(nearby_people*12.5*moodmod))) && word != message_split[1]) //Minimum 1/20 chance of filler new_message += pick("uh,","erm,","um,") - if(prob(min(5,(0.05*(nearby_people*12.5)*moodmod)))) //Max 1 in 20 chance of cutoff after a succesful filler roll, for 50% odds in a 15 word sentence + if(prob(min(5,(0.05*(nearby_people*12.5)*moodmod)))) //Max 1 in 20 chance of cutoff after a successful filler roll, for 50% odds in a 15 word sentence quirker.silent = max(3, quirker.silent) to_chat(quirker, span_danger("You feel self-conscious and stop talking. You need a moment to recover!")) break @@ -569,7 +587,7 @@ new/obj/item/food/spaghetti/pastatomato(get_turf(quirker)) //now that's what I call spaghetti code else to_chat(quirk_holder, span_warning("You think that wouldn't add much to the conversation and decide not to say it.")) - if(prob(min(25,(0.25*(nearby_people*12.75)*moodmod)))) //Max 25% chance of silence stacks after succesful not talking roll + if(prob(min(25,(0.25*(nearby_people*12.75)*moodmod)))) //Max 25% chance of silence stacks after successful not talking roll to_chat(quirker, span_danger("You retreat into yourself. You really don't feel up to talking.")) quirker.silent = max(5, quirker.silent) speech_args[SPEECH_MESSAGE] = pick("Uh.","Erm.","Um.") diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm index 60be92d76d0..ca9ca0fae44 100644 --- a/code/modules/surgery/bodyparts/helpers.dm +++ b/code/modules/surgery/bodyparts/helpers.dm @@ -11,6 +11,12 @@ if(bodypart.body_zone == zone) return bodypart +///Replaces a single limb and deletes the old one if there was one +/mob/living/carbon/proc/del_and_replace_bodypart(obj/item/bodypart/new_limb, special) + var/obj/item/bodypart/old_limb = get_bodypart(new_limb.body_zone) + if(old_limb) + qdel(old_limb) + new_limb.attach_limb(src, special = special) /mob/living/carbon/has_hand_for_held_index(i) if(!i) diff --git a/tgui/packages/tgfont/README_ICON_TUTORIAL.txt b/tgui/packages/tgfont/README_ICON_TUTORIAL.txt new file mode 100644 index 00000000000..70b52e5a183 --- /dev/null +++ b/tgui/packages/tgfont/README_ICON_TUTORIAL.txt @@ -0,0 +1,13 @@ +The following is the process to implement your own icon using an svg. + +If you plan on making your own SVG, consider [Inkscape](https://inkscape.org/). It is free and pretty powerful for vector graphics. + +1. Get whatever SVG you plan on using and put it in the `tgstation\tgui\packages\tgfont\icons` folder. + +2. In VS Code, press Ctrl+Shift+B, and select "tgui: rebuild tgfont". Wait for it to comlpete. + +Now your SVG will be able to be used in the game. + +When you reference your icon that you prefix it with "tg-", otherwise it will not find it. For example, with an SVG named "prosthetic-leg.svg", you would reference it with `icon_state = "tg-prosthetic-leg"`. + +Keep your SVG as simple as possible, the engine has trouble rendering SVGs that have a lot of little disconnected parts. diff --git a/tgui/packages/tgfont/icons/prosthetic-full.svg b/tgui/packages/tgfont/icons/prosthetic-full.svg new file mode 100644 index 00000000000..21915870fe3 --- /dev/null +++ b/tgui/packages/tgfont/icons/prosthetic-full.svg @@ -0,0 +1,45 @@ + + + + + + diff --git a/tgui/packages/tgfont/static/tgfont.css b/tgui/packages/tgfont/static/tgfont.css index ad732b8fc06..992f088913c 100644 --- a/tgui/packages/tgfont/static/tgfont.css +++ b/tgui/packages/tgfont/static/tgfont.css @@ -1,7 +1,7 @@ @font-face { font-family: "tgfont"; - src: url("./tgfont.woff2?45c3c7acc69dd413375d77898d24e41e") format("woff2"), -url("./tgfont.eot?45c3c7acc69dd413375d77898d24e41e#iefix") format("embedded-opentype"); + src: url("./tgfont.woff2?b809fa4bdd4aff7084540f130e4e524b") format("woff2"), +url("./tgfont.eot?b809fa4bdd4aff7084540f130e4e524b#iefix") format("embedded-opentype"); } i[class^="tg-"]:before, i[class*=" tg-"]:before { @@ -36,15 +36,18 @@ i[class^="tg-"]:before, i[class*=" tg-"]:before { .tg-non-binary:before { content: "\f107"; } -.tg-prosthetic-leg:before { +.tg-prosthetic-full:before { content: "\f108"; } -.tg-sound-minus:before { +.tg-prosthetic-leg:before { content: "\f109"; } -.tg-sound-plus:before { +.tg-sound-minus:before { content: "\f10a"; } -.tg-syndicate-logo:before { +.tg-sound-plus:before { content: "\f10b"; } +.tg-syndicate-logo:before { + content: "\f10c"; +} diff --git a/tgui/packages/tgfont/static/tgfont.eot b/tgui/packages/tgfont/static/tgfont.eot index 09e774836e303f6b68238bf451290217441c5109..e879c327d3f1b6fa8c7922ea7d5b6ae3329a1b12 100644 GIT binary patch delta 578 zcmYLGO=wd=5dLQ0zRe~tFE5bz(RD>20L7r)9S`r&Hm9_}A z7Y`DUx`N=Tpa;QHkY0p}Cl4Nq2l3!RM8TtoRq#|=ClPU%Z+5g)(WO#ox1nqR;B_IC~tdl{jt)wzj9|J^(w2Lb)MQufC$=;b_n zKQsC(EYJonbN-T%sni;?frs0lc-~j$#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