diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 8c2969e8eee..74a5a8e1997 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 4565dbc25ff..e2e4fdec9bc 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 815050636af..ae00895361a 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 00000000000..d813a8d3888 --- /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 7ce24eb1163..2bb167e5cf2 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 8265eb9e807..ccd7e77f7b5 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 a0166978275..928c58ab5ff 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 e6d70a2cb54..7580faf4e99 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"