From 4885482d2bb8dec397fc45b6e309bb4b099962d9 Mon Sep 17 00:00:00 2001 From: Yoshax Date: Tue, 15 Nov 2016 21:55:01 +0000 Subject: [PATCH 1/2] Moves the brain into the same place as the other organ files --- .../internal/brain.dm} | 244 +++++++++--------- .../modules/organs/internal/organ_internal.dm | 2 +- polaris.dme | 2 +- 3 files changed, 124 insertions(+), 124 deletions(-) rename code/modules/{mob/living/carbon/brain/brain_item.dm => organs/internal/brain.dm} (96%) diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/organs/internal/brain.dm similarity index 96% rename from code/modules/mob/living/carbon/brain/brain_item.dm rename to code/modules/organs/internal/brain.dm index 973e55a48b..edc6f6e47f 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/organs/internal/brain.dm @@ -1,122 +1,122 @@ -/obj/item/organ/internal/brain - name = "brain" - health = 400 //They need to live awhile longer than other organs. Is this even used by organ code anymore? - desc = "A piece of juicy meat found in a person's head." - organ_tag = "brain" - parent_organ = BP_HEAD - vital = 1 - icon_state = "brain2" - force = 1.0 - w_class = ITEMSIZE_SMALL - throwforce = 1.0 - throw_speed = 3 - throw_range = 5 - origin_tech = list(TECH_BIO = 3) - attack_verb = list("attacked", "slapped", "whacked") - var/mob/living/carbon/brain/brainmob = null - -/obj/item/organ/internal/brain/robotize() - replace_self_with(/obj/item/organ/internal/mmi_holder/posibrain) - -/obj/item/organ/internal/brain/mechassist() - replace_self_with(/obj/item/organ/internal/mmi_holder) - -/obj/item/organ/internal/brain/digitize() - replace_self_with(/obj/item/organ/internal/mmi_holder/robot) - -/obj/item/organ/internal/brain/proc/replace_self_with(replace_path) - var/mob/living/carbon/human/tmp_owner = owner - qdel(src) - if(tmp_owner) - tmp_owner.internal_organs_by_name[organ_tag] = new replace_path(tmp_owner, 1) - tmp_owner = null - -/obj/item/organ/internal/pariah_brain - name = "brain remnants" - desc = "Did someone tread on this? It looks useless for cloning or cyborgification." - organ_tag = "brain" - parent_organ = BP_HEAD - icon = 'icons/mob/alien.dmi' - icon_state = "chitin" - vital = 1 - -/obj/item/organ/internal/brain/xeno - name = "thinkpan" - desc = "It looks kind of like an enormous wad of purple bubblegum." - icon = 'icons/mob/alien.dmi' - icon_state = "chitin" - -/obj/item/organ/internal/brain/New() - ..() - health = config.default_brain_health - spawn(5) - if(brainmob && brainmob.client) - brainmob.client.screen.len = null //clear the hud - -/obj/item/organ/internal/brain/Destroy() - if(brainmob) - qdel(brainmob) - brainmob = null - ..() - -/obj/item/organ/internal/brain/proc/transfer_identity(var/mob/living/carbon/H) - - if(!brainmob) - brainmob = new(src) - brainmob.name = H.real_name - brainmob.real_name = H.real_name - brainmob.dna = H.dna.Clone() - brainmob.timeofhostdeath = H.timeofdeath - - if(H.mind) - H.mind.transfer_to(brainmob) - - brainmob << "You feel slightly disoriented. That's normal when you're just \a [initial(src.name)]." - callHook("debrain", list(brainmob)) - -/obj/item/organ/internal/brain/examine(mob/user) // -- TLE - ..(user) - if(brainmob && brainmob.client)//if thar be a brain inside... the brain. - user << "You can feel the small spark of life still left in this one." - else - user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.." - -/obj/item/organ/internal/brain/removed(var/mob/living/user) - - if(name == initial(name)) - name = "\the [owner.real_name]'s [initial(name)]" - - var/mob/living/simple_animal/borer/borer = owner.has_brain_worms() - - if(borer) - borer.detatch() //Should remove borer if the brain is removed - RR - - var/obj/item/organ/internal/brain/B = src - if(istype(B) && istype(owner)) - B.transfer_identity(owner) - - ..() - -/obj/item/organ/internal/brain/replaced(var/mob/living/target) - - if(target.key) - target.ghostize() - - if(brainmob) - if(brainmob.mind) - brainmob.mind.transfer_to(target) - else - target.key = brainmob.key - ..() - -/obj/item/organ/internal/brain/slime - name = "slime core" - desc = "A complex, organic knot of jelly and crystalline particles." - icon = 'icons/mob/slimes.dmi' - icon_state = "green slime extract" - -/obj/item/organ/internal/brain/golem - name = "chem" - desc = "A tightly furled roll of paper, covered with indecipherable runes." - icon = 'icons/obj/wizard.dmi' - icon_state = "scroll" +/obj/item/organ/internal/brain + name = "brain" + health = 400 //They need to live awhile longer than other organs. Is this even used by organ code anymore? + desc = "A piece of juicy meat found in a person's head." + organ_tag = "brain" + parent_organ = BP_HEAD + vital = 1 + icon_state = "brain2" + force = 1.0 + w_class = ITEMSIZE_SMALL + throwforce = 1.0 + throw_speed = 3 + throw_range = 5 + origin_tech = list(TECH_BIO = 3) + attack_verb = list("attacked", "slapped", "whacked") + var/mob/living/carbon/brain/brainmob = null + +/obj/item/organ/internal/brain/robotize() + replace_self_with(/obj/item/organ/internal/mmi_holder/posibrain) + +/obj/item/organ/internal/brain/mechassist() + replace_self_with(/obj/item/organ/internal/mmi_holder) + +/obj/item/organ/internal/brain/digitize() + replace_self_with(/obj/item/organ/internal/mmi_holder/robot) + +/obj/item/organ/internal/brain/proc/replace_self_with(replace_path) + var/mob/living/carbon/human/tmp_owner = owner + qdel(src) + if(tmp_owner) + tmp_owner.internal_organs_by_name[organ_tag] = new replace_path(tmp_owner, 1) + tmp_owner = null + +/obj/item/organ/internal/pariah_brain + name = "brain remnants" + desc = "Did someone tread on this? It looks useless for cloning or cyborgification." + organ_tag = "brain" + parent_organ = BP_HEAD + icon = 'icons/mob/alien.dmi' + icon_state = "chitin" + vital = 1 + +/obj/item/organ/internal/brain/xeno + name = "thinkpan" + desc = "It looks kind of like an enormous wad of purple bubblegum." + icon = 'icons/mob/alien.dmi' + icon_state = "chitin" + +/obj/item/organ/internal/brain/New() + ..() + health = config.default_brain_health + spawn(5) + if(brainmob && brainmob.client) + brainmob.client.screen.len = null //clear the hud + +/obj/item/organ/internal/brain/Destroy() + if(brainmob) + qdel(brainmob) + brainmob = null + ..() + +/obj/item/organ/internal/brain/proc/transfer_identity(var/mob/living/carbon/H) + + if(!brainmob) + brainmob = new(src) + brainmob.name = H.real_name + brainmob.real_name = H.real_name + brainmob.dna = H.dna.Clone() + brainmob.timeofhostdeath = H.timeofdeath + + if(H.mind) + H.mind.transfer_to(brainmob) + + brainmob << "You feel slightly disoriented. That's normal when you're just \a [initial(src.name)]." + callHook("debrain", list(brainmob)) + +/obj/item/organ/internal/brain/examine(mob/user) // -- TLE + ..(user) + if(brainmob && brainmob.client)//if thar be a brain inside... the brain. + user << "You can feel the small spark of life still left in this one." + else + user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.." + +/obj/item/organ/internal/brain/removed(var/mob/living/user) + + if(name == initial(name)) + name = "\the [owner.real_name]'s [initial(name)]" + + var/mob/living/simple_animal/borer/borer = owner.has_brain_worms() + + if(borer) + borer.detatch() //Should remove borer if the brain is removed - RR + + var/obj/item/organ/internal/brain/B = src + if(istype(B) && istype(owner)) + B.transfer_identity(owner) + + ..() + +/obj/item/organ/internal/brain/replaced(var/mob/living/target) + + if(target.key) + target.ghostize() + + if(brainmob) + if(brainmob.mind) + brainmob.mind.transfer_to(target) + else + target.key = brainmob.key + ..() + +/obj/item/organ/internal/brain/slime + name = "slime core" + desc = "A complex, organic knot of jelly and crystalline particles." + icon = 'icons/mob/slimes.dmi' + icon_state = "green slime extract" + +/obj/item/organ/internal/brain/golem + name = "chem" + desc = "A tightly furled roll of paper, covered with indecipherable runes." + icon = 'icons/obj/wizard.dmi' + icon_state = "scroll" diff --git a/code/modules/organs/internal/organ_internal.dm b/code/modules/organs/internal/organ_internal.dm index 100666caaa..c1bfebb673 100644 --- a/code/modules/organs/internal/organ_internal.dm +++ b/code/modules/organs/internal/organ_internal.dm @@ -33,4 +33,4 @@ if(istype(E)) E.internal_organs -= src ..() -// Brain is defined in brain_item.dm. \ No newline at end of file +// Brain is defined in brain.dm \ No newline at end of file diff --git a/polaris.dme b/polaris.dme index 1c4ff32424..d8c0ac2087 100644 --- a/polaris.dme +++ b/polaris.dme @@ -1523,7 +1523,6 @@ #include "code\modules\mob\living\carbon\alien\diona\say_understands.dm" #include "code\modules\mob\living\carbon\alien\diona\update_icons.dm" #include "code\modules\mob\living\carbon\brain\brain.dm" -#include "code\modules\mob\living\carbon\brain\brain_item.dm" #include "code\modules\mob\living\carbon\brain\death.dm" #include "code\modules\mob\living\carbon\brain\emote.dm" #include "code\modules\mob\living\carbon\brain\life.dm" @@ -1723,6 +1722,7 @@ #include "code\modules\organs\robolimbs.dm" #include "code\modules\organs\wound.dm" #include "code\modules\organs\internal\appendix.dm" +#include "code\modules\organs\internal\brain.dm" #include "code\modules\organs\internal\eyes.dm" #include "code\modules\organs\internal\heart.dm" #include "code\modules\organs\internal\kidneys.dm" From 6704b7084d7d9f2a6ba2cde83d6eaa5b988f79b8 Mon Sep 17 00:00:00 2001 From: Yoshax Date: Tue, 15 Nov 2016 21:56:44 +0000 Subject: [PATCH 2/2] Adds changelog --- html/changelogs/Yoshax-BrainDeath.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 html/changelogs/Yoshax-BrainDeath.yml diff --git a/html/changelogs/Yoshax-BrainDeath.yml b/html/changelogs/Yoshax-BrainDeath.yml new file mode 100644 index 0000000000..40a6bc16c7 --- /dev/null +++ b/html/changelogs/Yoshax-BrainDeath.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: Yoshax + +# 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: + - experiment: "Being unable to breathe and having oxyloss will now cause brain damage that scales with the amount of oxyloss you have. Without oxygen, the brain takes damage and will EVENTUALLY die (but you would most likely die of actual oxyloss before that point.)"