Merge remote-tracking branch 'citadel/master' into the-p-o-o-l
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* A component to reset the parent to its previous state after some time passes
|
||||
*/
|
||||
/datum/component/dejavu
|
||||
/// The turf the parent was on when this components was applied, they get moved back here after the duration
|
||||
var/turf/starting_turf
|
||||
/// Determined by the type of the parent so different behaviours can happen per type
|
||||
var/rewind_type
|
||||
/// How many rewinds will happen before the effect ends
|
||||
var/rewinds_remaining
|
||||
/// How long to wait between each rewind
|
||||
var/rewind_interval
|
||||
|
||||
/// The starting value of clone loss at the beginning of the effect
|
||||
var/clone_loss = 0
|
||||
/// The starting value of toxin loss at the beginning of the effect
|
||||
var/tox_loss = 0
|
||||
/// The starting value of oxygen loss at the beginning of the effect
|
||||
var/oxy_loss = 0
|
||||
/// The starting value of brain loss at the beginning of the effect
|
||||
var/brain_loss = 0
|
||||
/// The starting value of brute loss at the beginning of the effect
|
||||
/// This only applies to simple animals
|
||||
var/brute_loss
|
||||
/// The starting value of integrity at the beginning of the effect
|
||||
/// This only applies to objects
|
||||
var/integrity
|
||||
/// A list of body parts saved at the beginning of the effect
|
||||
var/list/datum/saved_bodypart/saved_bodyparts
|
||||
|
||||
/datum/component/dejavu/Initialize(rewinds = 1, interval = 10 SECONDS)
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
starting_turf = get_turf(parent)
|
||||
rewinds_remaining = rewinds
|
||||
rewind_interval = interval
|
||||
|
||||
if(isliving(parent))
|
||||
var/mob/living/L = parent
|
||||
clone_loss = L.getCloneLoss()
|
||||
tox_loss = L.getToxLoss()
|
||||
oxy_loss = L.getOxyLoss()
|
||||
brain_loss = L.getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
rewind_type = .proc/rewind_living
|
||||
|
||||
if(iscarbon(parent))
|
||||
var/mob/living/carbon/C = parent
|
||||
saved_bodyparts = C.save_bodyparts()
|
||||
rewind_type = .proc/rewind_carbon
|
||||
|
||||
else if(isanimal(parent))
|
||||
var/mob/living/simple_animal/M = parent
|
||||
brute_loss = M.bruteloss
|
||||
rewind_type = .proc/rewind_animal
|
||||
|
||||
else if(isobj(parent))
|
||||
var/obj/O = parent
|
||||
integrity = O.obj_integrity
|
||||
rewind_type = .proc/rewind_obj
|
||||
|
||||
addtimer(CALLBACK(src, rewind_type), rewind_interval)
|
||||
|
||||
/datum/component/dejavu/Destroy()
|
||||
starting_turf = null
|
||||
saved_bodyparts = null
|
||||
return ..()
|
||||
|
||||
/datum/component/dejavu/proc/rewind()
|
||||
to_chat(parent, "<span class=notice>You remember a time not so long ago...</span>")
|
||||
|
||||
//comes after healing so new limbs comically drop to the floor
|
||||
if(starting_turf)
|
||||
var/atom/movable/master = parent
|
||||
master.forceMove(starting_turf)
|
||||
|
||||
rewinds_remaining --
|
||||
if(rewinds_remaining)
|
||||
addtimer(CALLBACK(src, rewind_type), rewind_interval)
|
||||
else
|
||||
to_chat(parent, "<span class=notice>But the memory falls out of your reach.</span>")
|
||||
qdel(src)
|
||||
|
||||
/datum/component/dejavu/proc/rewind_living()
|
||||
var/mob/living/master = parent
|
||||
master.setCloneLoss(clone_loss)
|
||||
master.setToxLoss(tox_loss)
|
||||
master.setOxyLoss(oxy_loss)
|
||||
master.setOrganLoss(ORGAN_SLOT_BRAIN, brain_loss)
|
||||
rewind()
|
||||
|
||||
/datum/component/dejavu/proc/rewind_carbon()
|
||||
if(saved_bodyparts)
|
||||
var/mob/living/carbon/master = parent
|
||||
master.apply_saved_bodyparts(saved_bodyparts)
|
||||
rewind_living()
|
||||
|
||||
/datum/component/dejavu/proc/rewind_animal()
|
||||
var/mob/living/simple_animal/master = parent
|
||||
master.bruteloss = brute_loss
|
||||
master.updatehealth()
|
||||
rewind_living()
|
||||
|
||||
/datum/component/dejavu/proc/rewind_obj()
|
||||
var/obj/master = parent
|
||||
master.obj_integrity = integrity
|
||||
rewind()
|
||||
+12
-2
@@ -236,7 +236,12 @@
|
||||
G.fields["fingerprint"] = md5(H.dna.uni_identity)
|
||||
G.fields["p_stat"] = "Active"
|
||||
G.fields["m_stat"] = "Stable"
|
||||
G.fields["sex"] = H.gender
|
||||
if(H.gender == MALE)
|
||||
G.fields["gender"] = "Male"
|
||||
else if(H.gender == FEMALE)
|
||||
G.fields["gender"] = "Female"
|
||||
else
|
||||
G.fields["gender"] = "Other"
|
||||
G.fields["photo_front"] = photo_front
|
||||
G.fields["photo_side"] = photo_side
|
||||
general += G
|
||||
@@ -274,7 +279,12 @@
|
||||
L.fields["name"] = H.real_name
|
||||
L.fields["rank"] = H.mind.assigned_role
|
||||
L.fields["age"] = H.age
|
||||
L.fields["sex"] = H.gender
|
||||
if(H.gender == MALE)
|
||||
G.fields["gender"] = "Male"
|
||||
else if(H.gender == FEMALE)
|
||||
G.fields["gender"] = "Female"
|
||||
else
|
||||
G.fields["gender"] = "Other"
|
||||
L.fields["blood_type"] = H.dna.blood_type
|
||||
L.fields["b_dna"] = H.dna.unique_enzymes
|
||||
L.fields["enzymes"] = H.dna.struc_enzymes
|
||||
|
||||
@@ -41,7 +41,7 @@ Bonus
|
||||
suppress_warning = TRUE
|
||||
|
||||
/datum/symptom/choking/Activate(datum/disease/advance/A)
|
||||
if(!..())
|
||||
if(!..() || HAS_TRAIT(A.affected_mob,TRAIT_NOBREATH))
|
||||
return
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
@@ -112,7 +112,7 @@ Bonus
|
||||
power = 2
|
||||
|
||||
/datum/symptom/asphyxiation/Activate(datum/disease/advance/A)
|
||||
if(!..())
|
||||
if(!..() || HAS_TRAIT(A.affected_mob,TRAIT_NOBREATH))
|
||||
return
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
|
||||
@@ -50,7 +50,7 @@ BONUS
|
||||
symptom_delay_max = 10
|
||||
|
||||
/datum/symptom/cough/Activate(datum/disease/advance/A)
|
||||
if(!..())
|
||||
if(!..() || HAS_TRAIT(A.affected_mob,TRAIT_NOBREATH))
|
||||
return
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
|
||||
@@ -39,7 +39,7 @@ Bonus
|
||||
suppress_warning = TRUE
|
||||
|
||||
/datum/symptom/sneeze/Activate(datum/disease/advance/A)
|
||||
if(!..())
|
||||
if(!..() || HAS_TRAIT(A.affected_mob,TRAIT_NOBREATH))
|
||||
return
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
|
||||
+28
-3
@@ -92,7 +92,15 @@
|
||||
. = ""
|
||||
var/list/L = new /list(DNA_UNI_IDENTITY_BLOCKS)
|
||||
|
||||
L[DNA_GENDER_BLOCK] = construct_block((holder.gender!=MALE)+1, 2)
|
||||
switch(holder.gender)
|
||||
if(MALE)
|
||||
L[DNA_GENDER_BLOCK] = construct_block(G_MALE, 4)
|
||||
if(FEMALE)
|
||||
L[DNA_GENDER_BLOCK] = construct_block(G_FEMALE, 4)
|
||||
if(PLURAL)
|
||||
L[DNA_GENDER_BLOCK] = construct_block(G_PLURAL, 4)
|
||||
else
|
||||
L[DNA_GENDER_BLOCK] = construct_block(G_NEUTER, 4)
|
||||
if(ishuman(holder))
|
||||
var/mob/living/carbon/human/H = holder
|
||||
if(!GLOB.hair_styles_list.len)
|
||||
@@ -165,7 +173,15 @@
|
||||
if(DNA_EYE_COLOR_BLOCK)
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(H.eye_color))
|
||||
if(DNA_GENDER_BLOCK)
|
||||
setblock(uni_identity, blocknumber, construct_block((H.gender!=MALE)+1, 2))
|
||||
switch(H.gender)
|
||||
if(MALE)
|
||||
setblock(uni_identity, blocknumber, construct_block(G_MALE, 4))
|
||||
if(FEMALE)
|
||||
setblock(uni_identity, blocknumber, construct_block(G_FEMALE, 4))
|
||||
if(PLURAL)
|
||||
setblock(uni_identity, blocknumber, construct_block(G_PLURAL, 4))
|
||||
else
|
||||
setblock(uni_identity, blocknumber, construct_block(G_NEUTER, 4))
|
||||
if(DNA_FACIAL_HAIR_STYLE_BLOCK)
|
||||
setblock(uni_identity, blocknumber, construct_block(GLOB.facial_hair_styles_list.Find(H.facial_hair_style), GLOB.facial_hair_styles_list.len))
|
||||
if(DNA_HAIR_STYLE_BLOCK)
|
||||
@@ -307,7 +323,16 @@
|
||||
/mob/living/carbon/proc/updateappearance(icon_update=1, mutcolor_update=0, mutations_overlay_update=0)
|
||||
if(!has_dna())
|
||||
return
|
||||
gender = (deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 2)-1) ? FEMALE : MALE
|
||||
|
||||
switch(deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 4))
|
||||
if(G_MALE)
|
||||
gender = MALE
|
||||
if(G_FEMALE)
|
||||
gender = FEMALE
|
||||
if(G_PLURAL)
|
||||
gender = PLURAL
|
||||
else
|
||||
gender = NEUTER
|
||||
|
||||
/mob/living/carbon/human/updateappearance(icon_update=1, mutcolor_update=0, mutations_overlay_update=0)
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/datum/element/dusts_on_leaving_area
|
||||
element_flags = ELEMENT_DETACH | ELEMENT_BESPOKE
|
||||
id_arg_index = 2
|
||||
var/list/attached_mobs = list()
|
||||
var/list/area_types = list()
|
||||
|
||||
/datum/element/dusts_on_leaving_area/Attach(datum/target,types)
|
||||
. = ..()
|
||||
if(!ismob(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
attached_mobs += target
|
||||
area_types = types
|
||||
START_PROCESSING(SSprocessing,src)
|
||||
|
||||
/datum/element/dusts_on_leaving_area/Detach(mob/M)
|
||||
. = ..()
|
||||
if(M in attached_mobs)
|
||||
attached_mobs -= M
|
||||
if(!attached_mobs.len)
|
||||
STOP_PROCESSING(SSprocessing,src)
|
||||
|
||||
/datum/element/dusts_on_leaving_area/process()
|
||||
for(var/m in attached_mobs)
|
||||
var/mob/M = m
|
||||
var/area/A = get_area(M)
|
||||
if(!(A.type in area_types))
|
||||
M.dust(force = TRUE)
|
||||
Detach(M)
|
||||
+1
-1
@@ -132,7 +132,7 @@
|
||||
//CIT CHANGE - makes arousal update when transfering bodies
|
||||
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
|
||||
var/mob/living/L = new_character
|
||||
if(L.client && L.client.prefs & L.client.prefs.auto_ooc & L.client.prefs.chat_toggles & CHAT_OOC)
|
||||
if(L.client?.prefs && L.client.prefs.auto_ooc && L.client.prefs.chat_toggles & CHAT_OOC)
|
||||
DISABLE_BITFIELD(L.client.prefs.chat_toggles,CHAT_OOC)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_MIND_TRANSFER, new_character, old_character)
|
||||
|
||||
@@ -34,3 +34,10 @@
|
||||
id = "engine_tesla"
|
||||
suffix = "Box/Engine/engine_tesla.dmm"
|
||||
name = "Box Tesla"
|
||||
|
||||
// Lavaland
|
||||
// Mining Base
|
||||
/datum/map_template/ruin/station/lavaland/mining_base
|
||||
id = "mining_public_01"
|
||||
suffix = "Lavaland/Mining_Station/Mining_Station_Public_01.dmm"
|
||||
name = "Public Mining Base"
|
||||
@@ -201,13 +201,12 @@
|
||||
medical_record_text = "Patient's blood tests report an abnormal concentration of red blood cells in their bloodstream."
|
||||
|
||||
/datum/quirk/bloodpressure/add()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.blood_ratio = 1.2
|
||||
M.blood_volume += 150
|
||||
quirk_holder.blood_ratio = 1.2
|
||||
quirk_holder.blood_volume += 150
|
||||
|
||||
/datum/quirk/bloodpressure/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.blood_ratio = 1
|
||||
if(quirk_holder)
|
||||
quirk_holder.blood_ratio = 1
|
||||
|
||||
/datum/quirk/night_vision
|
||||
name = "Night Vision"
|
||||
|
||||
@@ -400,3 +400,12 @@
|
||||
|
||||
/datum/quirk/blindness/remove()
|
||||
quirk_holder?.cure_blind(ROUNDSTART_TRAIT)
|
||||
|
||||
/datum/quirk/coldblooded
|
||||
name = "Cold-blooded"
|
||||
desc = "Your body doesn't create its own internal heat, requiring external heat regulation."
|
||||
value = -2
|
||||
medical_record_text = "Patient is ectothermic."
|
||||
mob_trait = TRAIT_COLDBLOODED
|
||||
gain_text = "<span class='notice'>You feel cold-blooded.</span>"
|
||||
lose_text = "<span class='notice'>You feel more warm-blooded.</span>"
|
||||
|
||||
@@ -104,15 +104,6 @@
|
||||
gain_text = "<span class='notice'>You desire to be hurt.</span>"
|
||||
lose_text = "<span class='notice'>Pain has become less exciting for you.</span>"
|
||||
|
||||
/datum/quirk/coldblooded
|
||||
name = "Cold-blooded"
|
||||
desc = "Your body doesn't create its own internal heat, requiring external heat regulation."
|
||||
value = 0
|
||||
medical_record_text = "Patient is ectothermic."
|
||||
mob_trait = TRAIT_COLDBLOODED
|
||||
gain_text = "<span class='notice'>You feel cold-blooded.</span>"
|
||||
lose_text = "<span class='notice'>You feel more warm-blooded.</span>"
|
||||
|
||||
/datum/quirk/alcohol_intolerance
|
||||
name = "Alcohol Intolerance"
|
||||
desc = "You take toxin damage from alcohol rather than getting drunk."
|
||||
|
||||
Reference in New Issue
Block a user