mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes does_not_breathe, Toggle breathing is an active power (#2240)
* Fixes does_not_breathe * Fixes things, Changelings can toggle breathing * Changelog
This commit is contained in:
@@ -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 << "<span class='notice'>We stop breathing, as we no longer need to.</span>"
|
||||
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 << "<span class='notice'>We stop breathing, as we no longer need to.</span>"
|
||||
return 1
|
||||
else
|
||||
C.does_not_breathe = 0
|
||||
src << "<span class='notice'>We resume breathing, as we now need to again.</span>"
|
||||
return 0
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
36
html/changelogs/anewbe.yml
Normal file
36
html/changelogs/anewbe.yml
Normal file
@@ -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."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 55 KiB |
Reference in New Issue
Block a user