Removes auto-shading on beheading, but cultists can now shade properly from severed heads or brains. Merry Christmas (#28451)

* Merry Christmas

* shade space damage

* get_turf

* It's fucking christmas

* Why are we still here, just to suffer?

* everything is better with defines
This commit is contained in:
DeityLink
2020-12-30 20:08:24 +01:00
committed by GitHub
parent 528cf00285
commit ac51dd0537
9 changed files with 108 additions and 17 deletions

View File

@@ -171,6 +171,7 @@
#define MAX_TALISMAN_PER_TOME 5 #define MAX_TALISMAN_PER_TOME 5
#define SACRIFICE_CHANGE_COOLDOWN 30 MINUTES #define SACRIFICE_CHANGE_COOLDOWN 30 MINUTES
#define DEATH_SHADEOUT_TIMER 60 SECONDS
#define CONVERSION_REFUSE -1 #define CONVERSION_REFUSE -1
#define CONVERSION_NOCHOICE 0 #define CONVERSION_NOCHOICE 0

View File

@@ -424,7 +424,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Ghost" set name = "Ghost"
set desc = "Relinquish your life and enter the land of the dead." set desc = "Relinquish your life and enter the land of the dead."
if(iscultist(src) && (ishuman(src)||isconstruct(src)||istype(src,/mob/living/carbon/complex/gondola)) && veil_thickness > CULT_PROLOGUE) var/timetocheck = timeofdeath
if (isbrain(src))
var/mob/living/carbon/brain/brainmob = src
timetocheck = brainmob.timeofhostdeath
if(iscultist(src) && (ishuman(src)||isconstruct(src)||isbrain(src)||istype(src,/mob/living/carbon/complex/gondola)) && veil_thickness > CULT_PROLOGUE && (timetocheck == 0 || timetocheck >= world.time - DEATH_SHADEOUT_TIMER))
var/response = alert(src, "It doesn't have to end here, the veil is thin and the dark energies in you soul cling to this plane. You may forsake this body and materialize as a Shade.","Sacrifice Body","Shade","Ghost","Stay in body") var/response = alert(src, "It doesn't have to end here, the veil is thin and the dark energies in you soul cling to this plane. You may forsake this body and materialize as a Shade.","Sacrifice Body","Shade","Ghost","Stay in body")
switch (response) switch (response)
if ("Shade") if ("Shade")

View File

@@ -197,6 +197,14 @@ obj/item/device/mmi/Destroy()
brainmob.dna = H.dna.Clone() brainmob.dna = H.dna.Clone()
brainmob.container = src brainmob.container = src
if (isbrain(H))
var/mob/living/carbon/brain/otherbrain = H
brainmob.timeofhostdeath = otherbrain.timeofhostdeath
else if (H.timeofdeath == 0)//happens when the human gets decapitated while still alive
brainmob.timeofhostdeath = world.time
else
brainmob.timeofhostdeath = H.timeofdeath
name = "Man-Machine Interface: [brainmob.real_name]" name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full" icon_state = "mmi_full"
locked = 1 locked = 1

View File

@@ -32,7 +32,15 @@
brainmob.real_name = H.real_name brainmob.real_name = H.real_name
if(istype(H) && H.dna) if(istype(H) && H.dna)
brainmob.dna = H.dna.Clone() brainmob.dna = H.dna.Clone()
brainmob.timeofhostdeath = H.timeofdeath
if (isbrain(H))
var/mob/living/carbon/brain/otherbrain = H
brainmob.timeofhostdeath = otherbrain.timeofhostdeath
else if (H.timeofdeath == 0)//happens when the human gets decapitated while still alive
brainmob.timeofhostdeath = world.time
else
brainmob.timeofhostdeath = H.timeofdeath
if(H.mind) if(H.mind)
H.mind.transfer_to(brainmob) H.mind.transfer_to(brainmob)

View File

@@ -16,6 +16,69 @@
return ..(gibbed) return ..(gibbed)
/mob/living/carbon/brain/death(gibbed)
if(stat == DEAD)
return
if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container.
container.OnMobDeath(src)
stat = DEAD
change_sight(adding = SEE_TURFS|SEE_MOBS|SEE_OBJS)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
tod = worldtime2text() //weasellos time of death patch
if(mind)
mind.store_memory("Time of death: [tod]", 0) //mind. ?
return ..(gibbed)
/mob/living/carbon/brain/dust()
var/turf/T = get_turf(loc)
if(T && client && iscultist(src) && veil_thickness > CULT_PROLOGUE && timeofhostdeath >= world.time - DEATH_SHADEOUT_TIMER)
var/obj/item/organ/internal/brain/B
var/obj/item/organ/external/head/H
var/obj/item/device/mmi/M
if (loc && istype(loc,/obj/item/device/mmi))
M = loc
else if (loc && istype(loc,/obj/item/organ/external/head))
H = loc
else if(loc && istype(loc,/obj/item/organ/internal/brain))
B = loc
if (B.loc && istype(B.loc,/obj/item/organ/external/head))
H = B.loc
//Spawning our shade and transfering the mind
var/mob/living/simple_animal/shade/shade = new (T)
playsound(T, 'sound/hallucinations/growl1.ogg', 50, 1)
shade.name = "[real_name] the Shade"
shade.real_name = "[real_name]"
mind.transfer_to(shade)
update_faction_icons()
to_chat(shade, "<span class='sinister'>Dark energies rip your dying body appart, anchoring your soul inside the form of a Shade. You retain your memories, and devotion to the cult.</span>")
//Spawning a skull, or just ashes if there was only a brain
if (H)
new/obj/item/weapon/skull(T)
else if (B || M)
new /obj/effect/decal/cleanable/ash(T)
//Getting rid of the brain/head objects
if (B)
qdel(B)
if (H)
qdel(H)
if (M)
M.icon_state = "mmi_empty"
M.name = "\improper Man-Machine Interface"
//Finally getting rid of the brainmob itself
qdel(src)
else
..()
/mob/living/carbon/brain/gib(animation = FALSE, meat = TRUE) /mob/living/carbon/brain/gib(animation = FALSE, meat = TRUE)
death(1) death(1)
monkeyizing = 1 monkeyizing = 1

View File

@@ -60,7 +60,7 @@
L.client.images -= pathogen L.client.images -= pathogen
pathogen = null pathogen = null
if(client && iscultist(src) && veil_thickness > CULT_PROLOGUE) if(client && iscultist(src) && veil_thickness > CULT_PROLOGUE && (timeofdeath == 0 || timeofdeath >= world.time - DEATH_SHADEOUT_TIMER))
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if (T) if (T)
var/mob/living/simple_animal/shade/shade = new (T) var/mob/living/simple_animal/shade/shade = new (T)

View File

@@ -30,6 +30,7 @@
flying = TRUE flying = TRUE
meat_type = /obj/item/weapon/ectoplasm meat_type = /obj/item/weapon/ectoplasm
mob_property_flags = MOB_SUPERNATURAL mob_property_flags = MOB_SUPERNATURAL
var/space_damage_warned = FALSE
/mob/living/simple_animal/shade/New() /mob/living/simple_animal/shade/New()
..() ..()
@@ -98,7 +99,13 @@
SB.blood++//no cap on blood regen when held by a cultist, no blood regen when held by a non-cultist (but there's a spell to take care of that) SB.blood++//no cap on blood regen when held by a cultist, no blood regen when held by a non-cultist (but there's a spell to take care of that)
else if (SB.blood < SB.maxregenblood) else if (SB.blood < SB.maxregenblood)
SB.blood++ SB.blood++
else
var/turf/T = get_turf(src)
if (istype(T,/turf/space))
if (!space_damage_warned)
space_damage_warned = TRUE
to_chat(src,"<span class='danger'>Your ghostly form suffers from the star's radiations. Remaining in space will slowly erase you.</span>")
adjustBruteLoss(1)
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri /mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
user.delayNextAttack(8) user.delayNextAttack(8)

View File

@@ -766,16 +766,6 @@ Note that amputating the affected organ does in fact remove the infection from t
if(body_part == (UPPER_TORSO || LOWER_TORSO)) //We can't lose either, those cannot be amputated and will cause extremely serious problems if(body_part == (UPPER_TORSO || LOWER_TORSO)) //We can't lose either, those cannot be amputated and will cause extremely serious problems
return return
if(body_part == HEAD && iscultist(owner) && veil_thickness > CULT_PROLOGUE)
//spawning a skull where the head would have been
var/obj/item/weapon/skull/sk = new (get_turf(owner))
var/randomdir = pick(cardinal)
step(sk, randomdir)
//turning the body into skull-less remains, the dusting will take care of the shade's creation.
status |= ORGAN_DESTROYED
owner.dust(TRUE)
return
var/datum/species/species = src.species || owner.species var/datum/species/species = src.species || owner.species
var/obj/item/organ/external/organ //Dropped limb object var/obj/item/organ/external/organ //Dropped limb object
@@ -1823,7 +1813,7 @@ obj/item/organ/external/head/New(loc, mob/living/carbon/human/H)
hair.Blend(icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_acc"), ICON_OVERLAY) hair.Blend(icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_acc"), ICON_OVERLAY)
overlays.Add(hair) //icon.Blend(hair, ICON_OVERLAY) overlays.Add(hair) //icon.Blend(hair, ICON_OVERLAY)
spawn(5)
if(brainmob && brainmob.client) if(brainmob && brainmob.client)
brainmob.client.screen.len = null //clear the hud brainmob.client.screen.len = null //clear the hud
@@ -1861,6 +1851,15 @@ obj/item/organ/external/head/proc/transfer_identity(var/mob/living/carbon/human/
brainmob.name = H.real_name brainmob.name = H.real_name
brainmob.real_name = H.real_name brainmob.real_name = H.real_name
brainmob.dna = H.dna.Clone() brainmob.dna = H.dna.Clone()
if (isbrain(H))
var/mob/living/carbon/brain/otherbrain = H
brainmob.timeofhostdeath = otherbrain.timeofhostdeath
else if (H.timeofdeath == 0)//happens when the human gets decapitated while still alive
brainmob.timeofhostdeath = world.time
else
brainmob.timeofhostdeath = H.timeofdeath
if(H.mind) if(H.mind)
H.mind.transfer_to(brainmob) H.mind.transfer_to(brainmob)
brainmob.languages = H.languages brainmob.languages = H.languages

View File

@@ -1104,8 +1104,8 @@
..() ..()
if(volume >= 5) if(volume >= 5)
if(istype(M,/mob/living/simple_animal/construct)) if(istype(M,/mob/living/simple_animal/construct) || istype(M,/mob/living/simple_animal/shade))
var/mob/living/simple_animal/construct/C = M var/mob/living/simple_animal/C = M
C.purge = 3 C.purge = 3
C.adjustBruteLoss(5) C.adjustBruteLoss(5)
C.visible_message("<span class='danger'>The holy water erodes \the [src].</span>") C.visible_message("<span class='danger'>The holy water erodes \the [src].</span>")