mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +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)
|
/mob/living/carbon/human/gib(animation = FALSE, meat = TRUE)
|
||||||
if(status_flags & BUDDHAMODE)
|
ASSERT(species)
|
||||||
adjustBruteLoss(200)
|
species.gib(src, animation, meat)
|
||||||
return
|
|
||||||
if(!isUnconscious())
|
|
||||||
forcesay("-")
|
|
||||||
if(species)
|
|
||||||
species.gib(src)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
/* 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)
|
death(1)
|
||||||
canmove = 0
|
handle_body_destroyed()
|
||||||
icon = null
|
|
||||||
invisibility = 101
|
|
||||||
default_gib()
|
|
||||||
|
|
||||||
//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)
|
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
|
if(istype(E, /datum/organ/external/chest) || istype(E, /datum/organ/external/groin)) //Really bad stuff happens when either get removed
|
||||||
continue
|
continue
|
||||||
@@ -24,23 +14,23 @@
|
|||||||
if(prob(100 - E.get_damage()))
|
if(prob(100 - E.get_damage()))
|
||||||
//Override the current limb status and don't cause an explosion
|
//Override the current limb status and don't cause an explosion
|
||||||
E.droplimb(1, 1)
|
E.droplimb(1, 1)
|
||||||
dropBorers()
|
|
||||||
var/gib_radius = 0
|
var/gib_radius = 0
|
||||||
if(reagents.has_reagent(LUBE))
|
if(reagents.has_reagent(LUBE))
|
||||||
gib_radius = 6 //Your insides are all lubed, so gibs travel much further
|
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)
|
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)
|
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)
|
/mob/living/carbon/human/dust(var/drop_everything = FALSE)
|
||||||
death(1)
|
ASSERT(species)
|
||||||
monkeyizing = 1
|
species.dust(src, drop_everything)
|
||||||
canmove = 0
|
|
||||||
icon = null
|
|
||||||
invisibility = 101
|
|
||||||
|
|
||||||
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))
|
if(istype(src, /mob/living/carbon/human/manifested))
|
||||||
anim(target = src, a_icon = 'icons/mob/mob.dmi', flick_anim = "dust-hm", sleeptime = 15)
|
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)
|
new /obj/effect/decal/remains/human(loc)
|
||||||
if(drop_everything)
|
if(drop_everything)
|
||||||
drop_all()
|
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()
|
/mob/living/carbon/human/Destroy()
|
||||||
infected_contact_mobs -= src
|
infected_contact_mobs -= src
|
||||||
|
|||||||
@@ -169,15 +169,18 @@ var/global/list/playable_species = list("Human")
|
|||||||
myhuman = null
|
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)
|
if(H.status_flags & BUDDHAMODE)
|
||||||
H.adjustBruteLoss(200)
|
H.adjustBruteLoss(200)
|
||||||
return
|
return
|
||||||
H.death(1)
|
if(!H.isUnconscious())
|
||||||
H.monkeyizing = 1
|
H.forcesay("-")
|
||||||
H.canmove = 0
|
H.default_gib(H, animation, meat)
|
||||||
H.icon = null
|
|
||||||
H.invisibility = 101
|
/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)
|
/datum/species/proc/handle_speech(var/datum/speech/speech, mob/living/carbon/human/H)
|
||||||
if(speech_filter)
|
if(speech_filter)
|
||||||
@@ -328,10 +331,6 @@ var/global/list/playable_species = list("Human")
|
|||||||
|
|
||||||
max_skin_tone = 220
|
max_skin_tone = 220
|
||||||
|
|
||||||
/datum/species/human/gib(mob/living/carbon/human/H)
|
|
||||||
..()
|
|
||||||
H.default_gib()
|
|
||||||
|
|
||||||
/datum/species/manifested
|
/datum/species/manifested
|
||||||
name = "Manifested"
|
name = "Manifested"
|
||||||
icobase = 'icons/mob/human_races/r_manifested.dmi'
|
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
|
speech_filter = new /datum/speech_filter/unathi
|
||||||
|
|
||||||
/datum/species/unathi/gib(mob/living/carbon/human/H)
|
|
||||||
..()
|
|
||||||
H.default_gib()
|
|
||||||
|
|
||||||
/datum/species/skellington // /vg/
|
/datum/species/skellington // /vg/
|
||||||
name = "Skellington"
|
name = "Skellington"
|
||||||
icobase = 'icons/mob/human_races/r_skeleton.dmi'
|
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")
|
speech.message += pick("KILL ME", "END MY SUFFERING", "I CAN'T DO THIS ANYMORE")
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/species/tajaran/gib(mob/living/carbon/human/H)
|
|
||||||
..()
|
|
||||||
H.default_gib()
|
|
||||||
|
|
||||||
/datum/species/grey // /vg/
|
/datum/species/grey // /vg/
|
||||||
name = "Grey"
|
name = "Grey"
|
||||||
icobase = 'icons/mob/human_races/grey/r_grey.dmi'
|
icobase = 'icons/mob/human_races/grey/r_grey.dmi'
|
||||||
@@ -691,9 +682,6 @@ var/global/list/playable_species = list("Human")
|
|||||||
else
|
else
|
||||||
icobase = 'icons/mob/human_races/grey/r_grey.dmi'
|
icobase = 'icons/mob/human_races/grey/r_grey.dmi'
|
||||||
deform = 'icons/mob/human_races/grey/r_def_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/
|
/datum/species/muton // /vg/
|
||||||
name = "Muton"
|
name = "Muton"
|
||||||
@@ -732,10 +720,6 @@ var/global/list/playable_species = list("Human")
|
|||||||
H.u_equip(H.head,1)
|
H.u_equip(H.head,1)
|
||||||
move_speed_mod = 1
|
move_speed_mod = 1
|
||||||
|
|
||||||
/datum/species/muton/gib(mob/living/carbon/human/H)
|
|
||||||
..()
|
|
||||||
H.default_gib()
|
|
||||||
|
|
||||||
/datum/species/skrell
|
/datum/species/skrell
|
||||||
name = "Skrell"
|
name = "Skrell"
|
||||||
icobase = 'icons/mob/human_races/r_skrell.dmi'
|
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'
|
head_icons = 'icons/mob/species/skrell/head.dmi'
|
||||||
wear_suit_icons = 'icons/mob/species/skrell/suit.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
|
/datum/species/vox
|
||||||
name = "Vox"
|
name = "Vox"
|
||||||
icobase = 'icons/mob/human_races/vox/r_vox.dmi'
|
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'
|
icobase = 'icons/mob/human_races/vox/r_vox.dmi'
|
||||||
deform = 'icons/mob/human_races/vox/r_def_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
|
/datum/species/diona
|
||||||
name = "Diona"
|
name = "Diona"
|
||||||
icobase = 'icons/mob/human_races/r_plant.dmi'
|
icobase = 'icons/mob/human_races/r_plant.dmi'
|
||||||
@@ -921,10 +897,6 @@ var/global/list/playable_species = list("Human")
|
|||||||
"eyes" = /datum/organ/internal/eyes
|
"eyes" = /datum/organ/internal/eyes
|
||||||
)
|
)
|
||||||
|
|
||||||
/datum/species/diona/gib(mob/living/carbon/human/H)
|
|
||||||
..()
|
|
||||||
H.default_gib()
|
|
||||||
|
|
||||||
/datum/species/golem
|
/datum/species/golem
|
||||||
name = "Golem"
|
name = "Golem"
|
||||||
icobase = 'icons/mob/human_races/r_golem.dmi'
|
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()
|
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))
|
if(!isgolem(H))
|
||||||
return
|
return
|
||||||
var/datum/mind/golemmind = H.mind
|
var/datum/mind/golemmind = H.mind
|
||||||
@@ -996,13 +968,34 @@ var/list/has_died_as_golem = list()
|
|||||||
A.real_name = H.real_name
|
A.real_name = H.real_name
|
||||||
A.desc = "The remains of what used to be [A.real_name]."
|
A.desc = "The remains of what used to be [A.real_name]."
|
||||||
A.key = H.key
|
A.key = H.key
|
||||||
qdel(H)
|
|
||||||
|
|
||||||
/datum/species/golem/can_artifact_revive()
|
/datum/species/golem/can_artifact_revive()
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
/datum/species/golem/gib(mob/living/carbon/human/H)
|
/datum/species/golem/gib(var/mob/living/carbon/human/H, animation, meat)
|
||||||
handle_death()
|
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
|
/mob/living/adamantine_dust //serves as the corpse of adamantine golems
|
||||||
name = "adamantine dust"
|
name = "adamantine dust"
|
||||||
@@ -1068,10 +1061,6 @@ var/list/has_died_as_golem = list()
|
|||||||
/datum/species/vampire/makeName()
|
/datum/species/vampire/makeName()
|
||||||
return "vampire"
|
return "vampire"
|
||||||
|
|
||||||
/datum/species/vampire/gib(mob/living/carbon/human/H)
|
|
||||||
..()
|
|
||||||
H.default_gib()
|
|
||||||
|
|
||||||
/datum/species/ghoul
|
/datum/species/ghoul
|
||||||
name = "Ghoul"
|
name = "Ghoul"
|
||||||
icobase = 'icons/mob/human_races/r_ghoul.dmi'
|
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.
|
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
|
/datum/species/slime
|
||||||
name = "Slime"
|
name = "Slime"
|
||||||
icobase = 'icons/mob/human_races/r_slime.dmi'
|
icobase = 'icons/mob/human_races/r_slime.dmi'
|
||||||
@@ -1299,9 +1284,6 @@ var/list/has_died_as_golem = list()
|
|||||||
newname += pick(insectoid_name_syllables)
|
newname += pick(insectoid_name_syllables)
|
||||||
return capitalize(newname)
|
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
|
/datum/species/mushroom
|
||||||
name = "Mushroom"
|
name = "Mushroom"
|
||||||
icobase = 'icons/mob/human_races/r_mushman.dmi'
|
icobase = 'icons/mob/human_races/r_mushman.dmi'
|
||||||
@@ -1368,10 +1350,6 @@ var/list/has_died_as_golem = list()
|
|||||||
/datum/species/mushroom/makeName()
|
/datum/species/mushroom/makeName()
|
||||||
return capitalize(pick(mush_first)) + " " + capitalize(pick(mush_last))
|
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)
|
/datum/species/mushroom/silent_speech(mob/M, message)
|
||||||
if(!message)
|
if(!message)
|
||||||
return
|
return
|
||||||
@@ -1443,4 +1421,4 @@ var/list/has_died_as_golem = list()
|
|||||||
head_organ.droplimb(1,1)
|
head_organ.droplimb(1,1)
|
||||||
|
|
||||||
H.drop_all()
|
H.drop_all()
|
||||||
qdel(src)
|
qdel(src)
|
||||||
Reference in New Issue
Block a user