diff --git a/code/game/gamemodes/changeling/powers/self_respiration.dm b/code/game/gamemodes/changeling/powers/self_respiration.dm index 96b8f3d277..6d6228eba8 100644 --- a/code/game/gamemodes/changeling/powers/self_respiration.dm +++ b/code/game/gamemodes/changeling/powers/self_respiration.dm @@ -2,15 +2,30 @@ name = "Self Respiration" desc = "We evolve our body to no longer require drawing oxygen from the atmosphere." helptext = "We will no longer require internals, and we cannot inhale any gas, including harmful ones." + ability_icon_state = "ling_toggle_breath" genomecost = 0 - isVerb = 0 verbpath = /mob/proc/changeling_self_respiration //No breathing required /mob/proc/changeling_self_respiration() + set category = "Changeling" + set name = "Toggle Breathing" + set desc = "We choose whether or not to breathe." + + var/datum/changeling/changeling = changeling_power(0,0,100,UNCONSCIOUS) + if(!changeling) + return 0 + if(istype(src,/mob/living/carbon)) var/mob/living/carbon/C = src - C.does_not_breathe = 1 - src << "We stop breathing, as we no longer need to." - return 1 + if(C.suiciding) + src << "You're committing suicide, this isn't going to work." + return 0 + if(C.does_not_breathe == 0) + C.does_not_breathe = 1 + src << "We stop breathing, as we no longer need to." + return 1 + else + C.does_not_breathe = 0 + src << "We resume breathing, as we now need to again." return 0 \ No newline at end of file diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index bed720d584..874b6f3998 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -27,6 +27,7 @@ src << "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))" return suiciding = 1 + does_not_breathe = 0 //Prevents ling-suicide zombies, or something var/obj/item/held_item = get_active_hand() if(held_item) var/damagetype = held_item.suicide_act(src) diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index 476e1c1117..7f4dc972c4 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -7,7 +7,7 @@ /mob/living/carbon/proc/breathe() //if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return - if(!should_have_organ(O_LUNGS) || does_not_breathe) return + if(!should_have_organ(O_LUNGS)) return var/datum/gas_mixture/breath = null diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 93706ccdb4..30bbdfde7e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -327,6 +327,11 @@ if(status_flags & GODMODE) return + if(does_not_breathe) + failed_last_breath = 0 + adjustOxyLoss(-5) + return + if(!breath || (breath.total_moles == 0) || suiciding) failed_last_breath = 1 if(suiciding) @@ -1184,10 +1189,10 @@ // if(resting || lying || sleeping) rest.icon_state = "rest1" // else rest.icon_state = "rest0" if(toxin) - if(hal_screwyhud == 4 || phoron_alert) toxin.icon_state = "tox1" + if(hal_screwyhud == 4 || (phoron_alert && !does_not_breathe)) toxin.icon_state = "tox1" else toxin.icon_state = "tox0" if(oxygen) - if(hal_screwyhud == 3 || oxygen_alert) oxygen.icon_state = "oxy1" + if(hal_screwyhud == 3 || (oxygen_alert && !does_not_breathe)) oxygen.icon_state = "oxy1" else oxygen.icon_state = "oxy0" if(fire) if(fire_alert) fire.icon_state = "fire[fire_alert]" //fire_alert is either 0 if no alert, 1 for cold and 2 for heat. diff --git a/html/changelogs/anewbe.yml b/html/changelogs/anewbe.yml new file mode 100644 index 0000000000..d1220a9492 --- /dev/null +++ b/html/changelogs/anewbe.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: Anewbe + +# 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: "Changeling Self-Respiration is now a toggle. By default they breathe normally, but if they use the power they no longer require oxygen, or experience the effects of inhaled gasses." diff --git a/icons/mob/screen_spells.dmi b/icons/mob/screen_spells.dmi index a1a480a50a..1d416a954c 100644 Binary files a/icons/mob/screen_spells.dmi and b/icons/mob/screen_spells.dmi differ