mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-03 21:42:06 +00:00
* Bloody feet update (#53109) Componentized the bloody feet feature. * Hardsuits and other feet-covering clothing can now get bloody feet as well and spread gunk around. * Bare feet can now get bloody as well and spread gunk around. * Shoes/feet won't get bloody if something is covering them. * Improved blood spreading behaviour. Previously, magic numbers were used in the blood pick up and drop off process. Now, when you step in blood, you and the floor share the blood volume. When you step on a non-bloody tile, you give away half of your shoe blood to the tile, and so on. This means the total blood volume always stays constant when moving around. * Blood doesn't appear out of thin air, nor get flushed to bluespace. * Lowered footprint minimum opacity. Because it looks better, imo. * Improved footprint exit/enter dirs. * Improved footprint examine. * Removed code for cult magic where a spell can suck up blood on your shoes. I'm pretty sure this code didn't work anyway. Implementing that for this new system would require a new signal and I just don't think it's worth it. How can this game make you spend 20 hours on fucking spaceman footprints Hardsuits will become "fully bloody" by just stepping in blood. This is a limitation of the current forensics system, as that is what is used to determine if an item is bloody or not. I'm aware of this but I don't think it fits to fix that in this PR. cl add: Footprints and bloody shoes major update. Hardsuits and bare feet can now get bloody as well. Improved blood spreading behaviour. fix: Shoes will no longer get bloody while wearing something that covers them. /cl * Bloody feet update Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
100 lines
3.6 KiB
Plaintext
100 lines
3.6 KiB
Plaintext
/obj/effect/decal/cleanable
|
|
gender = PLURAL
|
|
layer = ABOVE_NORMAL_TURF_LAYER
|
|
var/list/random_icon_states = null
|
|
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
|
|
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
|
|
var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one?
|
|
var/beauty = 0
|
|
|
|
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
|
|
. = ..()
|
|
if (random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0)
|
|
icon_state = pick(random_icon_states)
|
|
create_reagents(300)
|
|
if(loc && isturf(loc))
|
|
for(var/obj/effect/decal/cleanable/C in loc)
|
|
if(C != src && C.type == type && !QDELETED(C))
|
|
if (replace_decal(C))
|
|
return INITIALIZE_HINT_QDEL
|
|
|
|
if(LAZYLEN(diseases))
|
|
var/list/datum/disease/diseases_to_add = list()
|
|
for(var/datum/disease/D in diseases)
|
|
if(D.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS)
|
|
diseases_to_add += D
|
|
if(LAZYLEN(diseases_to_add))
|
|
AddComponent(/datum/component/infective, diseases_to_add)
|
|
|
|
INVOKE_ASYNC(src, /datum.proc/_AddComponent, list(/datum/component/beauty, beauty))
|
|
|
|
var/turf/T = get_turf(src)
|
|
if(T && is_station_level(T.z))
|
|
SSblackbox.record_feedback("tally", "station_mess_created", 1, name)
|
|
|
|
/obj/effect/decal/cleanable/Destroy()
|
|
var/turf/T = get_turf(src)
|
|
if(T && is_station_level(T.z))
|
|
SSblackbox.record_feedback("tally", "station_mess_destroyed", 1, name)
|
|
return ..()
|
|
|
|
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
|
|
if(mergeable_decal)
|
|
return TRUE
|
|
|
|
/obj/effect/decal/cleanable/attackby(obj/item/W, mob/user, params)
|
|
if((istype(W, /obj/item/reagent_containers/glass) && !istype(W, /obj/item/reagent_containers/glass/rag)) || istype(W, /obj/item/reagent_containers/food/drinks))
|
|
if(src.reagents && W.reagents)
|
|
. = 1 //so the containers don't splash their content on the src while scooping.
|
|
if(!src.reagents.total_volume)
|
|
to_chat(user, "<span class='notice'>[src] isn't thick enough to scoop up!</span>")
|
|
return
|
|
if(W.reagents.total_volume >= W.reagents.maximum_volume)
|
|
to_chat(user, "<span class='notice'>[W] is full!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You scoop up [src] into [W]!</span>")
|
|
reagents.trans_to(W, reagents.total_volume, transfered_by = user)
|
|
if(!reagents.total_volume) //scooped up all of it
|
|
qdel(src)
|
|
return
|
|
if(W.get_temperature()) //todo: make heating a reagent holder proc
|
|
if(istype(W, /obj/item/clothing/mask/cigarette))
|
|
return
|
|
else
|
|
var/hotness = W.get_temperature()
|
|
reagents.expose_temperature(hotness)
|
|
to_chat(user, "<span class='notice'>You heat [name] with [W]!</span>")
|
|
else
|
|
return ..()
|
|
|
|
/obj/effect/decal/cleanable/ex_act()
|
|
if(reagents)
|
|
for(var/datum/reagent/R in reagents.reagent_list)
|
|
R.on_ex_act()
|
|
..()
|
|
|
|
/obj/effect/decal/cleanable/fire_act(exposed_temperature, exposed_volume)
|
|
if(reagents)
|
|
reagents.expose_temperature(exposed_temperature)
|
|
..()
|
|
|
|
|
|
//Add "bloodiness" of this blood's type, to the human's shoes
|
|
//This is on /cleanable because fuck this ancient mess
|
|
/obj/effect/decal/cleanable/Crossed(atom/movable/AM)
|
|
..()
|
|
if(iscarbon(AM) && blood_state && bloodiness > 0)
|
|
SEND_SIGNAL(AM, COMSIG_STEP_ON_BLOOD, src)
|
|
update_icon()
|
|
|
|
/obj/effect/decal/cleanable/wash(clean_types)
|
|
..()
|
|
qdel(src)
|
|
return TRUE
|
|
|
|
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
|
|
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
|
|
return bloodiness
|
|
else
|
|
return 0
|