mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Decomposition now has mold first, then ants, instead of both. (#65409)
Someone made a suggestion to me that fixed a problem I've been trying to work around, and now that I've made it so people can set custom decompose times, that made this WAY EASIER. When most foods decay, they will turn into the generic moldy food sprite you've become accustomed to, without the ants. After 30 seconds, that moldy food will get consumed by ants, leaving only the anthill. Ants also no longer spawn on lavaland's basalt, by Fikou request.
This commit is contained in:
@@ -2,22 +2,32 @@
|
||||
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?
|
||||
///I'm sorry but cleanable/blood code is ass, and so is blood_DNA
|
||||
var/blood_state = ""
|
||||
///0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
|
||||
var/bloodiness = 0
|
||||
///When two of these are on a same tile or do we need to merge them into just one?
|
||||
var/mergeable_decal = TRUE
|
||||
var/beauty = 0
|
||||
///The type of cleaning required to clean the decal. See __DEFINES/cleaning.dm for the options
|
||||
var/clean_type = CLEAN_TYPE_LIGHT_DECAL
|
||||
///The reagent this decal holds. Leave blank for none.
|
||||
var/datum/reagent/decal_reagent
|
||||
///The amount of reagent this decal holds, if decal_reagent is defined
|
||||
var/reagent_amount = 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(decal_reagent)
|
||||
reagents.add_reagent(decal_reagent, reagent_amount)
|
||||
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))
|
||||
handle_merge_decal(C)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
if(LAZYLEN(diseases))
|
||||
@@ -99,3 +109,9 @@
|
||||
return bloodiness
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/effect/decal/cleanable/proc/handle_merge_decal(obj/effect/decal/cleanable/merger)
|
||||
if(!merger)
|
||||
return
|
||||
if(merger.reagents && reagents)
|
||||
reagents.trans_to(merger, reagents.total_volume)
|
||||
|
||||
@@ -106,12 +106,13 @@
|
||||
|
||||
dryname = "rotting gibs"
|
||||
drydesc = "They look bloody and gruesome while some terrible smell fills the air."
|
||||
decal_reagent = /datum/reagent/liquidgibs
|
||||
reagent_amount = 5
|
||||
///Information about the diseases our streaking spawns
|
||||
var/list/streak_diseases
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/liquidgibs, 5)
|
||||
RegisterSignal(src, COMSIG_MOVABLE_PIPE_EJECTING, .proc/on_pipe_eject)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/replace_decal(obj/effect/decal/cleanable/C)
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
icon_state = "ash"
|
||||
mergeable_decal = FALSE
|
||||
beauty = -50
|
||||
decal_reagent = /datum/reagent/ash
|
||||
reagent_amount = 30
|
||||
|
||||
/obj/effect/decal/cleanable/ash/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/ash, 30)
|
||||
pixel_x = base_pixel_x + rand(-5, 5)
|
||||
pixel_y = base_pixel_y + rand(-5, 5)
|
||||
|
||||
@@ -27,10 +28,8 @@
|
||||
name = "large pile of ashes"
|
||||
icon_state = "big_ash"
|
||||
beauty = -100
|
||||
|
||||
/obj/effect/decal/cleanable/ash/large/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/ash, 30) //double the amount of ash.
|
||||
decal_reagent = /datum/reagent/ash
|
||||
reagent_amount = 60
|
||||
|
||||
/obj/effect/decal/cleanable/glass
|
||||
name = "tiny shards"
|
||||
@@ -91,9 +90,13 @@
|
||||
/obj/effect/decal/cleanable/greenglow/ex_act()
|
||||
return FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/filled
|
||||
decal_reagent = /datum/reagent/uranium
|
||||
reagent_amount = 5
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/filled/Initialize(mapload)
|
||||
decal_reagent = pick(/datum/reagent/uranium, /datum/reagent/uranium/radium)
|
||||
. = ..()
|
||||
reagents.add_reagent(pick(/datum/reagent/uranium, /datum/reagent/uranium/radium), 5)
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/ecto
|
||||
name = "ectoplasmic puddle"
|
||||
@@ -268,22 +271,23 @@
|
||||
beauty = -150
|
||||
plane = GAME_PLANE
|
||||
layer = LOW_OBJ_LAYER
|
||||
/// The damage the ants will do when you step on them
|
||||
var/ant_bite_damage = 0.1
|
||||
/// The amount of ant reagent inside the ant cluster
|
||||
var/ant_volume
|
||||
decal_reagent = /datum/reagent/ants
|
||||
reagent_amount = 5
|
||||
/// Sound the ants make when biting
|
||||
var/bite_sound = 'sound/weapons/bite.ogg'
|
||||
|
||||
/obj/effect/decal/cleanable/ants/Initialize(mapload)
|
||||
reagent_amount = rand(3, 5)
|
||||
. = ..()
|
||||
ant_volume = rand(3, 5)
|
||||
reagents.add_reagent(/datum/reagent/ants, ant_volume)
|
||||
update_ant_damage()
|
||||
|
||||
/obj/effect/decal/cleanable/ants/proc/update_ant_damage(spilled_ants)
|
||||
ant_volume += spilled_ants
|
||||
ant_bite_damage = min(10, round((ant_volume * 0.1),0.1)) // 100u ants = 10 max_damage
|
||||
/obj/effect/decal/cleanable/ants/handle_merge_decal(obj/effect/decal/cleanable/merger)
|
||||
. = ..()
|
||||
var/obj/effect/decal/cleanable/ants/ants = merger
|
||||
ants.update_ant_damage()
|
||||
|
||||
/obj/effect/decal/cleanable/ants/proc/update_ant_damage()
|
||||
var/ant_bite_damage = min(10, round((reagents.get_reagent_amount(/datum/reagent/ants) * 0.1),0.1)) // 100u ants = 10 max_damage
|
||||
|
||||
var/ant_flags = (CALTROP_NOCRAWL | CALTROP_NOSTUN) /// Small amounts of ants won't be able to bite through shoes.
|
||||
if(ant_bite_damage > 1)
|
||||
|
||||
@@ -79,10 +79,8 @@
|
||||
bloodiness = BLOOD_AMOUNT_PER_DECAL
|
||||
beauty = -100
|
||||
clean_type = CLEAN_TYPE_BLOOD
|
||||
|
||||
/obj/effect/decal/cleanable/oil/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/fuel/oil, 30)
|
||||
decal_reagent = /datum/reagent/fuel/oil
|
||||
reagent_amount = 30
|
||||
|
||||
/obj/effect/decal/cleanable/oil/attackby(obj/item/I, mob/living/user)
|
||||
var/attacked_by_hot_thing = I.get_temperature()
|
||||
|
||||
Reference in New Issue
Block a user