From c5b77fcf9e53f7cbe1f198feb8333e703c2c0d05 Mon Sep 17 00:00:00 2001 From: MagmaRam Date: Thu, 1 Dec 2016 22:22:46 -0600 Subject: [PATCH 1/4] Adds an implant that allows humans to speak EAL. It's available in the loadout for 2 points. --- code/game/jobs/job_controller.dm | 4 ++ code/game/objects/items.dm | 9 +++++ .../items/weapons/implants/implantcase.dm | 20 ++++++++++ .../items/weapons/implants/implantlanguage.dm | 37 +++++++++++++++++++ .../loadout/loadout_utility.dm | 9 ++++- code/modules/mob/language/station.dm | 7 +++- code/modules/mob/living/carbon/human/human.dm | 9 +++++ polaris.dme | 1 + 8 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 code/game/objects/items/weapons/implants/implantlanguage.dm diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 8c2969e8ee..74a5a8e199 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -351,6 +351,10 @@ var/global/datum/controller/occupations/job_master H << "Your current species, job or whitelist status does not permit you to spawn with [thing]!" continue + if(G.slot == "implant") + H.implant_loadout(G) + continue + if(G.slot && !(G.slot in custom_equip_slots)) // This is a miserable way to fix the loadout overwrite bug, but the alternative requires // adding an arg to a bunch of different procs. Will look into it after this merge. ~ Z diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4565dbc25f..e2e4fdec9b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -456,6 +456,15 @@ var/list/global/slot_flags_enumeration = list( user << "You're going to need to remove the eye covering first." return + //this attack can whiff just like any other + var/accuracy_penalty = 0 + if(user.eye_blind) + accuracy_penalty += 75 + if(user.eye_blurry) + accuracy_penalty += 30 + if(user.confused) + accuracy_penalty += 45 + if(!M.has_eyes()) user << "You cannot locate any eyes on [M]!" return diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 815050636a..ae00895361 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -159,3 +159,23 @@ src.imp = new /obj/item/weapon/implant/health( src ) ..() return + +/obj/item/weapon/implantcase/language + name = "glass case - 'GalCom'" + desc = "A case containing a GalCom language implant." + icon_state = "implantcase-b" + +/obj/item/weapon/implantcase/language/New() + src.imp = new /obj/item/weapon/implant/language( src ) + ..() + return + +/obj/item/weapon/implantcase/language/eal + name = "glass case - 'EAL'" + desc = "A case containing an Encoded Audio Language implant." + icon_state = "implantcase-b" + +/obj/item/weapon/implantcase/language/eal/New() + src.imp = new /obj/item/weapon/implant/language/eal( src ) + ..() + return diff --git a/code/game/objects/items/weapons/implants/implantlanguage.dm b/code/game/objects/items/weapons/implants/implantlanguage.dm new file mode 100644 index 0000000000..d813a8d388 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implantlanguage.dm @@ -0,0 +1,37 @@ +//These allow someone to speak a language they are otherwise physically incapable of speaking or hearing +//They don't, at the moment, grant knowledge of the language +//The can_speak_special checks should check for the presence of the implants. + +/obj/item/weapon/implant/language + name = "GalCom language implant" + desc = "An implant allowing someone to speak and hear the range of frequencies used in Galactic Common, as well as produce any phonemes that they usually cannot. Only helps with hearing and producing sounds, not understanding them." + +/obj/item/weapon/implant/language/get_data() + var/dat = {" +Implant Specifications:
+Name: Vey-Med L-1 Galactic Common Implant
+Life: 5 years
+Important Notes: Affects hearing and speech.
+
+Implant Details:
+Function: Allows a being otherwise incapable to both hear the frequencies Galactic Common is generally spoken at, as well as to produce the phonemes of the language.
+Special Features: None.
+Integrity: Implant will function for expected life, barring physical damage."} + return dat + +/obj/item/weapon/implant/language/eal + name = "EAL language implant" + desc = "An implant allowing an organic to both hear and speak Encoded Audio Language accurately. Only helps with hearing and producing sounds, not understanding them." + +/obj/item/weapon/implant/language/get_data() + var/dat = {" +Implant Specifications:
+Name: Vey-Med L-2 Encoded Audio Language Implant
+Life: 5 years
+Important Notes: Affects hearing and speech.
+
+Implant Details:
+Function: Allows an organic to accurately process and speak Encoded Audio Language.
+Special Features: None.
+Integrity: Implant will function for expected life, barring physical damage."} + return dat \ No newline at end of file diff --git a/code/modules/client/preference_setup/loadout/loadout_utility.dm b/code/modules/client/preference_setup/loadout/loadout_utility.dm index 7ce24eb116..2bb167e5cf 100644 --- a/code/modules/client/preference_setup/loadout/loadout_utility.dm +++ b/code/modules/client/preference_setup/loadout/loadout_utility.dm @@ -49,4 +49,11 @@ /datum/gear/utility/maglight display_name = "flashlight, maglight" path = /obj/item/device/flashlight/maglight - cost = 2 \ No newline at end of file + cost = 2 + +/datum/gear/utility/implant //This does nothing if you don't actually know EAL. + display_name = "implant, language, EAL" + path = /obj/item/weapon/implant/language/eal + cost = 2 + slot = "implant" + var/implant_type = "EAL" diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index 8265eb9e80..ccd7e77f7b 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -116,7 +116,12 @@ space_chance = 10 /datum/language/machine/can_speak_special(var/mob/speaker) - return speaker.isSynthetic() + var/obj/item/I + for(I in speaker.contents) //this is ugly but I can't make the pretty way work + if(istype(I, /obj/item/weapon/implant/language/eal)) + return 1 + + return (speaker.isSynthetic()) /datum/language/machine/get_random_name() if(prob(70)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a016697827..928c58ab5f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -155,6 +155,15 @@ update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) if(update) UpdateDamageIcon() +/mob/living/carbon/human/proc/implant_loadout(var/datum/gear/G = new/datum/gear/utility/implant) + var/obj/item/weapon/implant/I = new G.path(src) + I.imp_in = src + I.implanted = 1 + var/obj/item/organ/external/affected = src.organs_by_name[BP_HEAD] + affected.implants += I + I.part = affected + I.implanted(src) + /mob/living/carbon/human/proc/implant_loyalty(override = FALSE) // Won't override by default. if(!config.use_loyalty_implants && !override) return // Nuh-uh. diff --git a/polaris.dme b/polaris.dme index e6d70a2cb5..7580faf4e9 100644 --- a/polaris.dme +++ b/polaris.dme @@ -879,6 +879,7 @@ #include "code\game\objects\items\weapons\implants\implantchair.dm" #include "code\game\objects\items\weapons\implants\implanter.dm" #include "code\game\objects\items\weapons\implants\implantfreedom.dm" +#include "code\game\objects\items\weapons\implants\implantlanguage.dm" #include "code\game\objects\items\weapons\implants\implantpad.dm" #include "code\game\objects\items\weapons\implants\implantuplink.dm" #include "code\game\objects\items\weapons\material\ashtray.dm" From 4620d00806f97cfa8214623e344c7c3f002b323a Mon Sep 17 00:00:00 2001 From: MagmaRam Date: Thu, 1 Dec 2016 22:26:18 -0600 Subject: [PATCH 2/4] ha ha whoops changelogs --- html/changelogs/MagmaRam - Implant.yml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 html/changelogs/MagmaRam - Implant.yml diff --git a/html/changelogs/MagmaRam - Implant.yml b/html/changelogs/MagmaRam - Implant.yml new file mode 100644 index 0000000000..51c44d87c5 --- /dev/null +++ b/html/changelogs/MagmaRam - Implant.yml @@ -0,0 +1,36 @@ +################################ +# 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 +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: MagmaRam + +# 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, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added a nice implant that allows humans to speak EAL." From d382cec40690d66c4254493a5077011e8ed006a2 Mon Sep 17 00:00:00 2001 From: MagmaRam Date: Thu, 1 Dec 2016 22:42:53 -0600 Subject: [PATCH 3/4] Left a thing in by accident. --- code/game/objects/items.dm | 9 --------- 1 file changed, 9 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index e2e4fdec9b..4565dbc25f 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -456,15 +456,6 @@ var/list/global/slot_flags_enumeration = list( user << "You're going to need to remove the eye covering first." return - //this attack can whiff just like any other - var/accuracy_penalty = 0 - if(user.eye_blind) - accuracy_penalty += 75 - if(user.eye_blurry) - accuracy_penalty += 30 - if(user.confused) - accuracy_penalty += 45 - if(!M.has_eyes()) user << "You cannot locate any eyes on [M]!" return From 95aa0d152d2610a061512f9abaf22a559ccbb743 Mon Sep 17 00:00:00 2001 From: MagmaRam Date: Tue, 6 Dec 2016 20:16:42 -0600 Subject: [PATCH 4/4] Finally got around to implementing Zuhayr's suggestion. --- code/modules/mob/language/station.dm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index ccd7e77f7b..77cb8f1ad5 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -116,12 +116,9 @@ space_chance = 10 /datum/language/machine/can_speak_special(var/mob/speaker) - var/obj/item/I - for(I in speaker.contents) //this is ugly but I can't make the pretty way work - if(istype(I, /obj/item/weapon/implant/language/eal)) - return 1 - - return (speaker.isSynthetic()) + var/obj/item/weapon/implant/language/eal/beep = locate() in speaker + return ((beep && beep.implanted) || speaker.isSynthetic()) + //thank you sweet zuhayr /datum/language/machine/get_random_name() if(prob(70))