mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-19 03:50:32 +01:00
Merge pull request #17 from shellspeed1/stasisbed
Adds basic stasis beds.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
set invisibility = 0
|
||||
if (notransform)
|
||||
return
|
||||
if(..()) //not dead
|
||||
if(..() && !IsInStasis()) //not dead and not in stasis
|
||||
// GROW!
|
||||
if(amount_grown < max_grown)
|
||||
amount_grown++
|
||||
|
||||
@@ -28,21 +28,22 @@
|
||||
if (QDELETED(src))
|
||||
return 0
|
||||
|
||||
if(.) //not dead
|
||||
handle_active_genes()
|
||||
if(!IsInStasis())
|
||||
if(.) //not dead
|
||||
handle_active_genes()
|
||||
|
||||
if(stat != DEAD)
|
||||
//heart attack stuff
|
||||
handle_heart()
|
||||
if(stat != DEAD)
|
||||
//heart attack stuff
|
||||
handle_heart()
|
||||
|
||||
if(stat != DEAD)
|
||||
//Stuff jammed in your limbs hurts
|
||||
handle_embedded_objects()
|
||||
if(stat != DEAD)
|
||||
//Stuff jammed in your limbs hurts
|
||||
handle_embedded_objects()
|
||||
dna.species.spec_life(src) // for mutantraces
|
||||
|
||||
//Update our name based on whether our face is obscured/disfigured
|
||||
name = get_visible_name()
|
||||
|
||||
dna.species.spec_life(src) // for mutantraces
|
||||
|
||||
if(stat != DEAD)
|
||||
return 1
|
||||
|
||||
@@ -9,28 +9,29 @@
|
||||
stamdamageoverlaytemp = 0
|
||||
update_damage_hud()
|
||||
|
||||
if(stat != DEAD) //Reagent processing needs to come before breathing, to prevent edge cases.
|
||||
handle_organs()
|
||||
if(!IsInStasis())
|
||||
if(stat != DEAD) //Reagent processing needs to come before breathing, to prevent edge cases.
|
||||
handle_organs()
|
||||
|
||||
. = ..()
|
||||
. = ..()
|
||||
|
||||
if (QDELETED(src))
|
||||
return
|
||||
if (QDELETED(src))
|
||||
return
|
||||
|
||||
if(.) //not dead
|
||||
handle_blood()
|
||||
if(.) //not dead
|
||||
handle_blood()
|
||||
|
||||
if(stat != DEAD)
|
||||
var/bprv = handle_bodyparts()
|
||||
if(bprv & BODYPART_LIFE_UPDATE_HEALTH)
|
||||
updatehealth()
|
||||
update_stamina()
|
||||
if(stat != DEAD)
|
||||
var/bprv = handle_bodyparts()
|
||||
if(bprv & BODYPART_LIFE_UPDATE_HEALTH)
|
||||
updatehealth()
|
||||
update_stamina()
|
||||
|
||||
if(stat != DEAD)
|
||||
handle_brain_damage()
|
||||
if(stat != DEAD)
|
||||
handle_brain_damage()
|
||||
|
||||
if(stat != DEAD)
|
||||
handle_liver()
|
||||
if(stat != DEAD)
|
||||
handle_liver()
|
||||
|
||||
if(stat == DEAD)
|
||||
stop_sound_channel(CHANNEL_HEARTBEAT)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
if (notransform)
|
||||
return
|
||||
|
||||
if(..())
|
||||
if(..() && !IsInStasis())
|
||||
|
||||
if(!client)
|
||||
if(stat == CONSCIOUS)
|
||||
|
||||
@@ -33,43 +33,45 @@
|
||||
return
|
||||
if(!loc)
|
||||
return
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(!IsInStasis())
|
||||
if(stat != DEAD)
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
if(stat != DEAD)
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
if(stat != DEAD)
|
||||
//Breathing, if applicable
|
||||
handle_breathing(times_fired)
|
||||
|
||||
if(stat != DEAD)
|
||||
//Breathing, if applicable
|
||||
handle_breathing(times_fired)
|
||||
handle_diseases()// DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not.
|
||||
|
||||
handle_diseases()// DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not.
|
||||
if (QDELETED(src)) // diseases can qdel the mob via transformations
|
||||
return
|
||||
|
||||
if (QDELETED(src)) // diseases can qdel the mob via transformations
|
||||
return
|
||||
if(stat != DEAD)
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
|
||||
if(stat != DEAD)
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
handle_environment(environment)
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
if(environment)
|
||||
handle_environment(environment)
|
||||
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
handle_gravity()
|
||||
|
||||
if(stat != DEAD)
|
||||
handle_traits() // eye, ear, brain damages
|
||||
handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc
|
||||
|
||||
handle_fire()
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
handle_gravity()
|
||||
|
||||
if(machine)
|
||||
machine.check_eye(src)
|
||||
|
||||
if(stat != DEAD)
|
||||
handle_traits() // eye, ear, brain damages
|
||||
if(stat != DEAD)
|
||||
handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc
|
||||
|
||||
if(stat != DEAD)
|
||||
return 1
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
death()
|
||||
|
||||
|
||||
/mob/living/incapacitated(ignore_restraints, ignore_grab)
|
||||
/mob/living/incapacitated(ignore_restraints, ignore_grab, ignore_stasis)
|
||||
if(stat || IsUnconscious() || IsStun() || IsKnockdown() || recoveringstam || (!ignore_restraints && restrained(ignore_grab))) // CIT CHANGE - adds recoveringstam check here
|
||||
return TRUE
|
||||
|
||||
@@ -603,7 +603,7 @@
|
||||
..(pressure_difference, direction, pressure_resistance_prob_delta)
|
||||
|
||||
/mob/living/can_resist()
|
||||
return !((next_move > world.time) || incapacitated(ignore_restraints = TRUE))
|
||||
return !((next_move > world.time) || incapacitated(ignore_restraints = TRUE, ignore_stasis= TRUE))
|
||||
|
||||
/mob/living/verb/resist()
|
||||
set name = "Resist"
|
||||
@@ -1011,6 +1011,8 @@
|
||||
var/has_legs = get_num_legs()
|
||||
var/has_arms = get_num_arms()
|
||||
var/ignore_legs = get_leg_ignore()
|
||||
var/in_stasis = IsInStasis()
|
||||
var/canmove = !buckled && (pulledby) && !chokehold && !IsFrozen() && !in_stasis && (has_arms || ignore_legs || has_legs)
|
||||
var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
|
||||
if(ko || move_and_fall || IsStun() || chokehold) // Cit change - makes resting not force you to drop everything
|
||||
drop_all_held_items()
|
||||
|
||||
@@ -138,6 +138,14 @@
|
||||
priority_absorb_key["stuns_absorbed"] += amount
|
||||
return TRUE
|
||||
|
||||
/////////////////////////////////// STASIS ///////////////////////////////////
|
||||
|
||||
/mob/living/proc/IsInStasis()
|
||||
. = has_status_effect(STATUS_EFFECT_STASIS)
|
||||
|
||||
/mob/living/proc/SetStasis(apply, updating = TRUE)
|
||||
. = apply ? apply_status_effect(STATUS_EFFECT_STASIS, null, updating) : remove_status_effect(STATUS_EFFECT_STASIS)
|
||||
|
||||
/////////////////////////////////// DISABILITIES ////////////////////////////////////
|
||||
|
||||
/mob/living/proc/add_quirk(quirk, spawn_effects) //separate proc due to the way these ones are handled
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
///MEDICAL Boards//
|
||||
///////////////////
|
||||
|
||||
/datum/design/board/stasis
|
||||
name = "Machine Design (Lifeform Stasis Unit)"
|
||||
desc = "The circuit board for a stasis unit."
|
||||
id = "stasis"
|
||||
build_path = /obj/item/circuitboard/machine/stasis
|
||||
category = list("Medical Machinery")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
|
||||
/datum/design/board/limbgrower
|
||||
name = "Machine Design (Limb Grower Board)"
|
||||
desc = "The circuit board for a limb grower."
|
||||
|
||||
@@ -508,7 +508,7 @@
|
||||
display_name = "Cryostasis Technology"
|
||||
description = "Smart freezing of objects to preserve them!"
|
||||
prereq_ids = list("adv_engi", "biotech")
|
||||
design_ids = list("splitbeaker", "noreactsyringe", "cryotube", "cryo_Grenade")
|
||||
design_ids = list("splitbeaker", "noreactsyringe", "cryotube", "cryo_Grenade", "stasis")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2000)
|
||||
export_price = 4000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user