mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
[wip] fix golem gibbing / dusting / etc (#34534)
* broken framework to fix golemgib; todo: species dust * species-specific dusting and fixing this spaghetti * code cleanup, fix runtimes, fix animations * this tab removal brought to you by dilt --------- Co-authored-by: nervere <sage@lulz>
This commit is contained in:
@@ -1,22 +1,12 @@
|
||||
/mob/living/carbon/human/gib(animation = FALSE, meat = TRUE)
|
||||
if(status_flags & BUDDHAMODE)
|
||||
adjustBruteLoss(200)
|
||||
return
|
||||
if(!isUnconscious())
|
||||
forcesay("-")
|
||||
if(species)
|
||||
species.gib(src)
|
||||
return
|
||||
ASSERT(species)
|
||||
species.gib(src, animation, meat)
|
||||
|
||||
/* This will be called if the species datum has not overwritten /datum/species/gib() */
|
||||
/mob/living/carbon/human/proc/default_gib(animation, meat)
|
||||
death(1)
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
default_gib()
|
||||
handle_body_destroyed()
|
||||
|
||||
//This will get called often at first until custom gibbing events get made up for each species.
|
||||
/mob/living/carbon/human/proc/default_gib()
|
||||
monkeyizing = TRUE
|
||||
for(var/datum/organ/external/E in src.organs)
|
||||
if(istype(E, /datum/organ/external/chest) || istype(E, /datum/organ/external/groin)) //Really bad stuff happens when either get removed
|
||||
continue
|
||||
@@ -24,23 +14,23 @@
|
||||
if(prob(100 - E.get_damage()))
|
||||
//Override the current limb status and don't cause an explosion
|
||||
E.droplimb(1, 1)
|
||||
dropBorers()
|
||||
var/gib_radius = 0
|
||||
if(reagents.has_reagent(LUBE))
|
||||
gib_radius = 6 //Your insides are all lubed, so gibs travel much further
|
||||
|
||||
anim(target = src, a_icon = 'icons/mob/mob.dmi', flick_anim = "gibbed-h", sleeptime = 15)
|
||||
hgibs(loc, virus2, dna, species.flesh_color, species.blood_color, gib_radius)
|
||||
qdel(src)
|
||||
spawn()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/carbon/human/dust(var/drop_everything = FALSE)
|
||||
death(1)
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
ASSERT(species)
|
||||
species.dust(src, drop_everything)
|
||||
|
||||
dropBorers(1)
|
||||
/* This will be called if the species datum has not overwritten /datum/species/dust() */
|
||||
/mob/living/carbon/human/proc/default_dust(drop_everything)
|
||||
death(1)
|
||||
handle_body_destroyed()
|
||||
|
||||
if(istype(src, /mob/living/carbon/human/manifested))
|
||||
anim(target = src, a_icon = 'icons/mob/mob.dmi', flick_anim = "dust-hm", sleeptime = 15)
|
||||
@@ -54,7 +44,15 @@
|
||||
new /obj/effect/decal/remains/human(loc)
|
||||
if(drop_everything)
|
||||
drop_all()
|
||||
qdel(src)
|
||||
spawn()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_body_destroyed()
|
||||
monkeyizing = TRUE
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
dropBorers(1)
|
||||
|
||||
/mob/living/carbon/human/Destroy()
|
||||
infected_contact_mobs -= src
|
||||
|
||||
@@ -169,15 +169,18 @@ var/global/list/playable_species = list("Human")
|
||||
myhuman = null
|
||||
..()
|
||||
|
||||
/datum/species/proc/gib(var/mob/living/carbon/human/H)
|
||||
/datum/species/proc/gib(var/mob/living/carbon/human/H, animation, meat)
|
||||
if(H.status_flags & BUDDHAMODE)
|
||||
H.adjustBruteLoss(200)
|
||||
return
|
||||
H.death(1)
|
||||
H.monkeyizing = 1
|
||||
H.canmove = 0
|
||||
H.icon = null
|
||||
H.invisibility = 101
|
||||
if(!H.isUnconscious())
|
||||
H.forcesay("-")
|
||||
H.default_gib(H, animation, meat)
|
||||
|
||||
/datum/species/proc/dust(var/mob/living/carbon/human/H, drop_everything)
|
||||
if(!H.isUnconscious())
|
||||
H.forcesay("-")
|
||||
H.default_dust(H, drop_everything)
|
||||
|
||||
/datum/species/proc/handle_speech(var/datum/speech/speech, mob/living/carbon/human/H)
|
||||
if(speech_filter)
|
||||
@@ -328,10 +331,6 @@ var/global/list/playable_species = list("Human")
|
||||
|
||||
max_skin_tone = 220
|
||||
|
||||
/datum/species/human/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/manifested
|
||||
name = "Manifested"
|
||||
icobase = 'icons/mob/human_races/r_manifested.dmi'
|
||||
@@ -414,10 +413,6 @@ var/global/list/playable_species = list("Human")
|
||||
..()
|
||||
speech_filter = new /datum/speech_filter/unathi
|
||||
|
||||
/datum/species/unathi/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/skellington // /vg/
|
||||
name = "Skellington"
|
||||
icobase = 'icons/mob/human_races/r_skeleton.dmi'
|
||||
@@ -596,10 +591,6 @@ var/global/list/playable_species = list("Human")
|
||||
speech.message += pick("KILL ME", "END MY SUFFERING", "I CAN'T DO THIS ANYMORE")
|
||||
return ..()
|
||||
|
||||
/datum/species/tajaran/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/grey // /vg/
|
||||
name = "Grey"
|
||||
icobase = 'icons/mob/human_races/grey/r_grey.dmi'
|
||||
@@ -691,9 +682,6 @@ var/global/list/playable_species = list("Human")
|
||||
else
|
||||
icobase = 'icons/mob/human_races/grey/r_grey.dmi'
|
||||
deform = 'icons/mob/human_races/grey/r_def_grey.dmi'
|
||||
/datum/species/grey/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/muton // /vg/
|
||||
name = "Muton"
|
||||
@@ -732,10 +720,6 @@ var/global/list/playable_species = list("Human")
|
||||
H.u_equip(H.head,1)
|
||||
move_speed_mod = 1
|
||||
|
||||
/datum/species/muton/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/skrell
|
||||
name = "Skrell"
|
||||
icobase = 'icons/mob/human_races/r_skrell.dmi'
|
||||
@@ -752,10 +736,6 @@ var/global/list/playable_species = list("Human")
|
||||
head_icons = 'icons/mob/species/skrell/head.dmi'
|
||||
wear_suit_icons = 'icons/mob/species/skrell/suit.dmi'
|
||||
|
||||
/datum/species/skrell/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/vox
|
||||
name = "Vox"
|
||||
icobase = 'icons/mob/human_races/vox/r_vox.dmi'
|
||||
@@ -864,10 +844,6 @@ var/global/list/playable_species = list("Human")
|
||||
icobase = 'icons/mob/human_races/vox/r_vox.dmi'
|
||||
deform = 'icons/mob/human_races/vox/r_def_vox.dmi'
|
||||
|
||||
/datum/species/vox/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/diona
|
||||
name = "Diona"
|
||||
icobase = 'icons/mob/human_races/r_plant.dmi'
|
||||
@@ -921,10 +897,6 @@ var/global/list/playable_species = list("Human")
|
||||
"eyes" = /datum/organ/internal/eyes
|
||||
)
|
||||
|
||||
/datum/species/diona/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/golem
|
||||
name = "Golem"
|
||||
icobase = 'icons/mob/human_races/r_golem.dmi'
|
||||
@@ -977,7 +949,7 @@ var/global/list/playable_species = list("Human")
|
||||
|
||||
var/list/has_died_as_golem = list()
|
||||
|
||||
/datum/species/golem/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns).
|
||||
/datum/species/golem/handle_death(var/mob/living/carbon/human/H, gibbed) //Handles any species-specific death events (such as dionaea nymph spawns).
|
||||
if(!isgolem(H))
|
||||
return
|
||||
var/datum/mind/golemmind = H.mind
|
||||
@@ -996,13 +968,34 @@ var/list/has_died_as_golem = list()
|
||||
A.real_name = H.real_name
|
||||
A.desc = "The remains of what used to be [A.real_name]."
|
||||
A.key = H.key
|
||||
qdel(H)
|
||||
|
||||
/datum/species/golem/can_artifact_revive()
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/species/golem/gib(mob/living/carbon/human/H)
|
||||
handle_death()
|
||||
/datum/species/golem/gib(var/mob/living/carbon/human/H, animation, meat)
|
||||
if(H.status_flags & BUDDHAMODE)
|
||||
H.adjustBruteLoss(200)
|
||||
return
|
||||
if(!H.isUnconscious())
|
||||
H.forcesay("-")
|
||||
H.death(1)
|
||||
H.handle_body_destroyed()
|
||||
var/gib_radius = 0
|
||||
if(H.reagents.has_reagent(LUBE))
|
||||
gib_radius = 6
|
||||
hgibs(H.loc, H.virus2, H.dna, flesh_color, blood_color, gib_radius)
|
||||
spawn()
|
||||
qdel(H)
|
||||
|
||||
/datum/species/golem/dust(var/mob/living/carbon/human/H, drop_everything)
|
||||
if(!H.isUnconscious())
|
||||
H.forcesay("-")
|
||||
H.death(1)
|
||||
H.handle_body_destroyed()
|
||||
if(drop_everything)
|
||||
H.drop_all()
|
||||
spawn()
|
||||
qdel(H)
|
||||
|
||||
/mob/living/adamantine_dust //serves as the corpse of adamantine golems
|
||||
name = "adamantine dust"
|
||||
@@ -1068,10 +1061,6 @@ var/list/has_died_as_golem = list()
|
||||
/datum/species/vampire/makeName()
|
||||
return "vampire"
|
||||
|
||||
/datum/species/vampire/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/ghoul
|
||||
name = "Ghoul"
|
||||
icobase = 'icons/mob/human_races/r_ghoul.dmi'
|
||||
@@ -1089,10 +1078,6 @@ var/list/has_died_as_golem = list()
|
||||
|
||||
primitive = /mob/living/carbon/monkey //Just to keep them SoC friendly.
|
||||
|
||||
/datum/species/ghoul/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/slime
|
||||
name = "Slime"
|
||||
icobase = 'icons/mob/human_races/r_slime.dmi'
|
||||
@@ -1299,9 +1284,6 @@ var/list/has_died_as_golem = list()
|
||||
newname += pick(insectoid_name_syllables)
|
||||
return capitalize(newname)
|
||||
|
||||
/datum/species/insectoid/gib(mob/living/carbon/human/H) //changed from Skrell to Insectoid for testing
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/mushroom
|
||||
name = "Mushroom"
|
||||
icobase = 'icons/mob/human_races/r_mushman.dmi'
|
||||
@@ -1368,10 +1350,6 @@ var/list/has_died_as_golem = list()
|
||||
/datum/species/mushroom/makeName()
|
||||
return capitalize(pick(mush_first)) + " " + capitalize(pick(mush_last))
|
||||
|
||||
/datum/species/mushroom/gib(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.default_gib()
|
||||
|
||||
/datum/species/mushroom/silent_speech(mob/M, message)
|
||||
if(!message)
|
||||
return
|
||||
@@ -1443,4 +1421,4 @@ var/list/has_died_as_golem = list()
|
||||
head_organ.droplimb(1,1)
|
||||
|
||||
H.drop_all()
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
Reference in New Issue
Block a user