[MIRROR] Oops! All prosthetics! Adds -6 quirk with all prosthetic limbs + Icon Tutorial [MDB IGNORE] (#16398)

* Oops! All prosthetics! Adds -6 quirk with all prosthetic limbs + Icon Tutorial

* Update code/controllers/subsystem/processing/quirks.dm

Co-authored-by: Marina <50789504+KirbyDaMaster@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-09-25 23:54:33 +02:00
committed by GitHub
parent 55833dee04
commit 24cb4bef1a
8 changed files with 108 additions and 21 deletions

View File

@@ -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"),
//SKYRAT EDIT ADDITION BEGIN
list("Nerve Stapled", "Pacifist"),
list("Nerve Stapled", "Nearsighted"),

View File

@@ -422,11 +422,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
@@ -434,7 +436,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)
@@ -449,13 +450,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, "<span class='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.</span>")
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"
@@ -536,7 +554,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
@@ -558,7 +576,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 <i>really</i> don't feel up to talking."))
quirker.silent = max(5, quirker.silent)
speech_args[SPEECH_MESSAGE] = pick("Uh.","Erm.","Um.")

View File

@@ -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)

View File

@@ -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.

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.1"
id="Layer_1"
x="0px"
y="0px"
viewBox="0 0 500 500"
style="enable-background:new 0 0 500 500;"
xml:space="preserve"
sodipodi:docname="prosthetic-full.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs6565" /><sodipodi:namedview
id="namedview6563"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="0.3915"
inkscape:cx="-39.591315"
inkscape:cy="367.81609"
inkscape:window-width="1842"
inkscape:window-height="963"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1"
style="display:inline"><path
id="rect7608"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:50;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:20;stroke-dasharray:none;stroke-dashoffset:0;paint-order:normal"
d="M 250 -574.71289 A 222.22223 222.22223 0 0 0 27.777344 -352.49023 A 222.22223 222.22223 0 0 0 250 -130.26758 A 222.22223 222.22223 0 0 0 472.22266 -352.49023 A 222.22223 222.22223 0 0 0 250 -574.71289 z M -219.49805 -45.976562 C -244.0017 -45.976562 -263.72852 -26.249743 -263.72852 -1.7460938 L -263.72852 78.375 C -263.72852 102.87865 -244.0017 122.60547 -219.49805 122.60547 L -1.5039062 122.60547 L -1.5039062 544.23047 L -1.5039062 547.26367 L -1.5039062 711.83594 C -1.5039062 736.33959 18.222914 756.06641 42.726562 756.06641 L 161.16211 756.06641 C 185.66576 756.06641 205.39258 736.33959 205.39258 711.83594 L 205.39258 591.49414 L 293.10352 591.49414 L 293.10352 711.83594 C 293.10352 736.33959 312.83034 756.06641 337.33398 756.06641 L 455.76953 756.06641 C 480.27318 756.06641 500 736.33959 500 711.83594 L 500 547.26367 L 500 544.23047 L 500 122.60547 L 719.49805 122.60547 C 744.0017 122.60547 763.72852 102.87865 763.72852 78.375 L 763.72852 -1.7460938 C 763.72852 -26.249743 744.0017 -45.976562 719.49805 -45.976562 L -219.49805 -45.976562 z " /></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -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";
}