mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Ash visuals removal (#36554)
This commit is contained in:
@@ -222,7 +222,7 @@
|
|||||||
|
|
||||||
#define isrealobject(A) (istype(A, /obj/item) || istype(A, /obj/structure) || istype(A, /obj/machinery) || istype(A, /obj/mecha))
|
#define isrealobject(A) (istype(A, /obj/item) || istype(A, /obj/structure) || istype(A, /obj/machinery) || istype(A, /obj/mecha))
|
||||||
|
|
||||||
#define iscleanaway(A) (istype(A,/obj/effect/decal/cleanable) || (istype(A,/obj/effect/overlay) && !istype(A,/obj/effect/overlay/puddle) && !istype(A, /obj/effect/overlay/hologram)) || istype(A,/obj/effect/rune_legacy) || (A.ErasableRune()) || istype(A,/obj/effect/ash))
|
#define iscleanaway(A) (istype(A,/obj/effect/decal/cleanable) || (istype(A,/obj/effect/overlay) && !istype(A,/obj/effect/overlay/puddle) && !istype(A, /obj/effect/overlay/hologram)) || istype(A,/obj/effect/rune_legacy) || (A.ErasableRune()))
|
||||||
|
|
||||||
#define ismatrix(A) (istype(A, /matrix))
|
#define ismatrix(A) (istype(A, /matrix))
|
||||||
|
|
||||||
|
|||||||
@@ -94,9 +94,6 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
|
|||||||
var/fire_sprite = "fire"
|
var/fire_sprite = "fire"
|
||||||
var/fire_overlay = null
|
var/fire_overlay = null
|
||||||
|
|
||||||
var/image/charred_overlay = null
|
|
||||||
var/last_char = 0
|
|
||||||
|
|
||||||
var/atom/movable/firelightdummy/firelightdummy
|
var/atom/movable/firelightdummy/firelightdummy
|
||||||
|
|
||||||
/atom/movable/New()
|
/atom/movable/New()
|
||||||
@@ -163,76 +160,6 @@ var/ZAS_fuel_energy_release_rate = zas_settings.Get(/datum/ZAS_Setting/fire_fuel
|
|||||||
if(reagents?.total_volume)
|
if(reagents?.total_volume)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
//charred overlay procs taken from Deity's food temperature overlays system (see food.dm)
|
|
||||||
var/global/list/image/charred_overlays = list()
|
|
||||||
|
|
||||||
/atom/proc/set_charred_overlay()
|
|
||||||
return
|
|
||||||
|
|
||||||
/atom/proc/update_charred_overlay(var/char_alpha)
|
|
||||||
return
|
|
||||||
|
|
||||||
/atom/proc/process_charred_overlay()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/set_charred_overlay()
|
|
||||||
if(update_charred_overlay())
|
|
||||||
return
|
|
||||||
|
|
||||||
var/icon/I = new /icon(icon, icon_state)
|
|
||||||
I.Blend(rgb(255,255,255),ICON_ADD)
|
|
||||||
I.Blend(new /icon('icons/effects/effects.dmi', "char"),ICON_MULTIPLY)
|
|
||||||
|
|
||||||
var/image/img = image(I)
|
|
||||||
img.name = "charred_overlay"
|
|
||||||
charred_overlays["[type][icon_state]"] = img
|
|
||||||
update_charred_overlay()
|
|
||||||
|
|
||||||
/obj/update_charred_overlay(var/char_alpha = 96)
|
|
||||||
if(charred_overlays["[type][icon_state]"])
|
|
||||||
if (charred_overlay)
|
|
||||||
overlays -= charred_overlay
|
|
||||||
charred_overlay = mutable_appearance(charred_overlays["[type][icon_state]"])
|
|
||||||
charred_overlay.appearance_flags = RESET_COLOR|RESET_ALPHA|KEEP_TOGETHER
|
|
||||||
charred_overlay.alpha = char_alpha
|
|
||||||
overlays += charred_overlay
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/process_charred_overlay()
|
|
||||||
if(thermal_mass)
|
|
||||||
var/c_alpha = 96 + clamp((64*(1-(thermal_mass/initial_thermal_mass))),0,64)
|
|
||||||
if(!charred_overlays["[type][icon_state]"])
|
|
||||||
set_charred_overlay()
|
|
||||||
else
|
|
||||||
update_charred_overlay(c_alpha)
|
|
||||||
last_char = world.time
|
|
||||||
else
|
|
||||||
if(prob(10)) //10% chance each tick of item getting charred
|
|
||||||
set_charred_overlay()
|
|
||||||
|
|
||||||
/obj/effect/process_charred_overlay()
|
|
||||||
return
|
|
||||||
|
|
||||||
/turf/process_charred_overlay()
|
|
||||||
if(locate(/obj/effect/ash) in src)
|
|
||||||
var/obj/effect/ash/A = locate(/obj/effect/ash) in src
|
|
||||||
if(flammable)
|
|
||||||
A.alpha = clamp((80*(1-(thermal_mass/initial_thermal_mass))),0,80) //turf's char overlays aren't as harsh as objects'
|
|
||||||
else
|
|
||||||
A.alpha = 40
|
|
||||||
else
|
|
||||||
new /obj/effect/ash(src)
|
|
||||||
|
|
||||||
/obj/effect/ash
|
|
||||||
name = "ash"
|
|
||||||
icon_state = "char"
|
|
||||||
alpha = 0
|
|
||||||
anchored = 1
|
|
||||||
mouse_opacity = 0
|
|
||||||
|
|
||||||
/obj/effect/ash/clean_act(var/cleanliness)
|
|
||||||
if(cleanliness >= CLEANLINESS_WATER)
|
|
||||||
qdel(src)
|
|
||||||
/**
|
/**
|
||||||
* Burns solid objects and produces heat.
|
* Burns solid objects and produces heat.
|
||||||
*
|
*
|
||||||
@@ -282,9 +209,6 @@ var/global/list/image/charred_overlays = list()
|
|||||||
useThermalMass(delta_m)
|
useThermalMass(delta_m)
|
||||||
genSmoke(oxy_ratio,temperature,T)
|
genSmoke(oxy_ratio,temperature,T)
|
||||||
|
|
||||||
if(world.time - last_char >= 10 SECONDS)
|
|
||||||
process_charred_overlay()
|
|
||||||
|
|
||||||
//Change in internal energy = energy produced by combustion (assuming perfect combustion).
|
//Change in internal energy = energy produced by combustion (assuming perfect combustion).
|
||||||
heat_out = material.heating_value * delta_m
|
heat_out = material.heating_value * delta_m
|
||||||
|
|
||||||
@@ -419,15 +343,12 @@ var/global/list/image/charred_overlays = list()
|
|||||||
if(flammable && !on_fire)
|
if(flammable && !on_fire)
|
||||||
ignite()
|
ignite()
|
||||||
return 1
|
return 1
|
||||||
else
|
|
||||||
process_charred_overlay()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/atom/proc/checkburn()
|
/atom/proc/checkburn()
|
||||||
if(on_fire)
|
if(on_fire)
|
||||||
return
|
return
|
||||||
if(!flammable)
|
if(!flammable)
|
||||||
return
|
CRASH("[src] was added to burnableatoms despite not being flammable!")
|
||||||
//if an object is not on fire, is flammable, and is in an environment with temperature above its autoignition temp & sufficient oxygen, ignite it
|
//if an object is not on fire, is flammable, and is in an environment with temperature above its autoignition temp & sufficient oxygen, ignite it
|
||||||
if(thermal_mass <= 0)
|
if(thermal_mass <= 0)
|
||||||
ashify()
|
ashify()
|
||||||
|
|||||||
@@ -467,8 +467,6 @@ its easier to just keep the beam vertical.
|
|||||||
if(on_fire)
|
if(on_fire)
|
||||||
user.simple_message("<span class='danger'>OH SHIT! IT'S ON FIRE!</span>",\
|
user.simple_message("<span class='danger'>OH SHIT! IT'S ON FIRE!</span>",\
|
||||||
"<span class='info'>It's on fire, man.</span>")
|
"<span class='info'>It's on fire, man.</span>")
|
||||||
if(charred_overlay)
|
|
||||||
to_chat(user, "<span class='info'>It's covered in ash.</span>")
|
|
||||||
if(min_harm_label && harm_labeled)
|
if(min_harm_label && harm_labeled)
|
||||||
if(harm_labeled < min_harm_label)
|
if(harm_labeled < min_harm_label)
|
||||||
to_chat(user, harm_label_examine[1])
|
to_chat(user, harm_label_examine[1])
|
||||||
@@ -551,8 +549,6 @@ its easier to just keep the beam vertical.
|
|||||||
/atom/proc/clean_act(var/cleanliness)//1 = contact with water (splashed with water, removes glue from objs), 2 = space cleaner or efficient cleaning (showers, sink, soap), 3 = bleach
|
/atom/proc/clean_act(var/cleanliness)//1 = contact with water (splashed with water, removes glue from objs), 2 = space cleaner or efficient cleaning (showers, sink, soap), 3 = bleach
|
||||||
if (cleanliness >= CLEANLINESS_SPACECLEANER)
|
if (cleanliness >= CLEANLINESS_SPACECLEANER)
|
||||||
clean_blood()
|
clean_blood()
|
||||||
if(charred_overlay)
|
|
||||||
overlays -= charred_overlay
|
|
||||||
if (cleanliness >= CLEANLINESS_BLEACH)
|
if (cleanliness >= CLEANLINESS_BLEACH)
|
||||||
color = ""
|
color = ""
|
||||||
if (cleanliness >= CLEANLINESS_WATER)//I mean, not sure why we'd ever add a rank below water but, futur-proofing and all that jazz
|
if (cleanliness >= CLEANLINESS_WATER)//I mean, not sure why we'd ever add a rank below water but, futur-proofing and all that jazz
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ BREATHALYZER
|
|||||||
if(istype(A,/obj/))
|
if(istype(A,/obj/))
|
||||||
var/obj/O = A
|
var/obj/O = A
|
||||||
O.t_scanner_expose()
|
O.t_scanner_expose()
|
||||||
else if(istype(A,/obj/effect/ash))
|
|
||||||
continue
|
|
||||||
else if(istype(A,/mob/living/carbon))
|
else if(istype(A,/mob/living/carbon))
|
||||||
var/mob/living/carbon/C = A
|
var/mob/living/carbon/C = A
|
||||||
if(C.alpha < OPAQUE || (C.invisibility > 0 && C.invisibility < INVISIBILITY_OBSERVER) || length(C.body_alphas))
|
if(C.alpha < OPAQUE || (C.invisibility > 0 && C.invisibility < INVISIBILITY_OBSERVER) || length(C.body_alphas))
|
||||||
|
|||||||
@@ -200,12 +200,6 @@
|
|||||||
else if(P.wet == TURF_WET_WATER)
|
else if(P.wet == TURF_WET_WATER)
|
||||||
reagents.add_reagent(WATER,1)
|
reagents.add_reagent(WATER,1)
|
||||||
qdel(P)
|
qdel(P)
|
||||||
for(var/obj/effect/ash/A in T)
|
|
||||||
if(reagents.is_full())
|
|
||||||
visible_message("<span class='warning'>\The [src] sputters, wet tank full!</span>")
|
|
||||||
break
|
|
||||||
reagents.add_reagent(CARBON,1)
|
|
||||||
qdel(A)
|
|
||||||
T.clean_blood()
|
T.clean_blood()
|
||||||
for(var/obj/item/trash/R in T)
|
for(var/obj/item/trash/R in T)
|
||||||
if(trash.len >= max_trash)
|
if(trash.len >= max_trash)
|
||||||
|
|||||||
@@ -59,9 +59,6 @@ var/global/list/reagents_to_log = list(FUEL, PLASMA, PACID, SACID, AMUTATIONTOXI
|
|||||||
var/is_cooktop //If true, the object can be used in conjunction with a cooking vessel, eg. a frying pan, to cook food.
|
var/is_cooktop //If true, the object can be used in conjunction with a cooking vessel, eg. a frying pan, to cook food.
|
||||||
var/obj/item/weapon/reagent_containers/pan/cookvessel //The vessel being used to cook food in. If generalized out to other types of vessels, make sure to also generalize the frying pan's cook_start(), etc. as well.
|
var/obj/item/weapon/reagent_containers/pan/cookvessel //The vessel being used to cook food in. If generalized out to other types of vessels, make sure to also generalize the frying pan's cook_start(), etc. as well.
|
||||||
|
|
||||||
//Is the object covered in ash?
|
|
||||||
var/ash_covered = FALSE
|
|
||||||
|
|
||||||
/obj/New()
|
/obj/New()
|
||||||
..()
|
..()
|
||||||
if(breakable_flags)
|
if(breakable_flags)
|
||||||
@@ -292,7 +289,6 @@ var/global/list/reagents_to_log = list(FUEL, PLASMA, PACID, SACID, AMUTATIONTOXI
|
|||||||
..()
|
..()
|
||||||
if (cleanliness >= CLEANLINESS_WATER)
|
if (cleanliness >= CLEANLINESS_WATER)
|
||||||
unglue()
|
unglue()
|
||||||
ash_covered = FALSE
|
|
||||||
|
|
||||||
/obj/proc/cultify()
|
/obj/proc/cultify()
|
||||||
qdel(src)
|
qdel(src)
|
||||||
@@ -425,28 +421,6 @@ var/global/list/reagents_to_log = list(FUEL, PLASMA, PACID, SACID, AMUTATIONTOXI
|
|||||||
/obj/ignite()
|
/obj/ignite()
|
||||||
if(!istype(loc, /turf)) //Prevent things from burning if worn, held, or inside something else. Storage containers will eject their contents when ignited, allowing for burning of the contents.
|
if(!istype(loc, /turf)) //Prevent things from burning if worn, held, or inside something else. Storage containers will eject their contents when ignited, allowing for burning of the contents.
|
||||||
return
|
return
|
||||||
. = ..()
|
|
||||||
ash_covered = TRUE
|
|
||||||
remove_particles(PS_SMOKE)
|
|
||||||
|
|
||||||
/obj/item/checkburn()
|
|
||||||
if(!flammable)
|
|
||||||
burnableatoms -= src
|
|
||||||
CRASH("[src] was added to burnableatoms despite not being flammable!")
|
|
||||||
if(on_fire)
|
|
||||||
return
|
|
||||||
var/datum/gas_mixture/G = return_air()
|
|
||||||
if(!G)
|
|
||||||
return
|
|
||||||
if(G.temperature >= (autoignition_temperature * 0.75))
|
|
||||||
if(!smoking)
|
|
||||||
add_particles(PS_SMOKE)
|
|
||||||
smoking = TRUE
|
|
||||||
var/rate = clamp(lerp(G.temperature,autoignition_temperature * 0.75,autoignition_temperature,0.1,1),0.1,1)
|
|
||||||
adjust_particles(PVAR_SPAWNING,rate,PS_SMOKE)
|
|
||||||
else
|
|
||||||
remove_particles(PS_SMOKE)
|
|
||||||
smoking = FALSE
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/singularity_act()
|
/obj/singularity_act()
|
||||||
@@ -586,9 +560,6 @@ a {
|
|||||||
onclose(user, "mtcomputer")
|
onclose(user, "mtcomputer")
|
||||||
|
|
||||||
/obj/update_icon()
|
/obj/update_icon()
|
||||||
if(ash_covered)
|
|
||||||
overlays -= charred_overlay
|
|
||||||
process_charred_overlay()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/proc/unset_machine()
|
/mob/proc/unset_machine()
|
||||||
|
|||||||
@@ -79,8 +79,6 @@
|
|||||||
..()
|
..()
|
||||||
if(bullet_marks)
|
if(bullet_marks)
|
||||||
to_chat(user, "It has [bullet_marks > 1 ? "some holes" : "a hole"] in it.")
|
to_chat(user, "It has [bullet_marks > 1 ? "some holes" : "a hole"] in it.")
|
||||||
if(locate(/obj/effect/ash) in src)
|
|
||||||
to_chat(user, "It is covered in ashes.")
|
|
||||||
|
|
||||||
/turf/proc/process()
|
/turf/proc/process()
|
||||||
set waitfor = FALSE
|
set waitfor = FALSE
|
||||||
|
|||||||
Reference in New Issue
Block a user