mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Ants can't traumatize ghosts, ants show up on top of pipes + Ant QOL (#62496)
* Protects ghosts, bypasses vents & pipes * hard crit oops * stops screaming unconcious people * fixes a copy-paste error * fixes planes * *unconcious* people won't get messages. * I am begging for this to be right * I hate that it took me 30 seconds to realize
This commit is contained in:
@@ -980,19 +980,21 @@
|
||||
var/ants_remaining = 0
|
||||
|
||||
/datum/status_effect/ants/on_creation(mob/living/new_owner, amount_left)
|
||||
if(isnum(amount_left))
|
||||
to_chat(new_owner, "<span class='userdanger'>You're covered in ants!</span>")
|
||||
if(isnum(amount_left) && new_owner.stat < HARD_CRIT)
|
||||
if(new_owner.stat < UNCONSCIOUS) // Unconcious people won't get messages
|
||||
to_chat(new_owner, "<span class='userdanger'>You're covered in ants!</span>")
|
||||
ants_remaining += amount_left
|
||||
RegisterSignal(new_owner, COMSIG_COMPONENT_CLEAN_ACT, .proc/ants_washed)
|
||||
. = ..()
|
||||
|
||||
/datum/status_effect/ants/refresh(effect, amount_left)
|
||||
var/mob/living/carbon/human/victim = owner
|
||||
if(isnum(amount_left) && ants_remaining >= 1)
|
||||
if(!prob(1)) // 99%
|
||||
to_chat(victim, "<span class='userdanger'>You're covered in MORE ants!</span>")
|
||||
else // 1%
|
||||
victim.say("AAHH! THIS SITUATION HAS ONLY BEEN MADE WORSE WITH THE ADDITION OF YET MORE ANTS!!", forced = /datum/status_effect/ants)
|
||||
if(isnum(amount_left) && ants_remaining >= 1 && victim.stat < HARD_CRIT)
|
||||
if(victim.stat < UNCONSCIOUS) // Unconcious people won't get messages
|
||||
if(!prob(1)) // 99%
|
||||
to_chat(victim, "<span class='userdanger'>You're covered in MORE ants!</span>")
|
||||
else // 1%
|
||||
victim.say("AAHH! THIS SITUATION HAS ONLY BEEN MADE WORSE WITH THE ADDITION OF YET MORE ANTS!!", forced = /datum/status_effect/ants)
|
||||
ants_remaining += amount_left
|
||||
. = ..()
|
||||
|
||||
@@ -1010,7 +1012,7 @@
|
||||
/datum/status_effect/ants/tick()
|
||||
var/mob/living/carbon/human/victim = owner
|
||||
victim.adjustBruteLoss(max(0.1, round((ants_remaining * 0.004),0.1))) //Scales with # of ants (lowers with time). Roughly 10 brute over 50 seconds.
|
||||
if(victim.stat <= SOFT_CRIT) //Makes sure people don't scratch at themselves while they're unconcious
|
||||
if(victim.stat <= SOFT_CRIT) //Makes sure people don't scratch at themselves while they're in a critical condition
|
||||
if(prob(15))
|
||||
switch(rand(1,2))
|
||||
if(1)
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "gib1"
|
||||
layer = LOW_OBJ_LAYER
|
||||
plane = GAME_PLANE
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
mergeable_decal = FALSE
|
||||
turf_loc_check = FALSE
|
||||
|
||||
@@ -250,6 +250,7 @@
|
||||
desc = "A split open garbage bag, its stinking content seems to be partially liquified. Yuck!"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "garbage"
|
||||
plane = GAME_PLANE
|
||||
layer = OBJ_LAYER //To display the decal over wires.
|
||||
beauty = -150
|
||||
clean_type = CLEAN_TYPE_HARD_DECAL
|
||||
@@ -264,6 +265,7 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "ants"
|
||||
beauty = -150
|
||||
plane = GAME_PLANE
|
||||
layer = LOW_OBJ_LAYER
|
||||
var/ant_bite_damage = 0.1
|
||||
var/ant_volume
|
||||
|
||||
@@ -2764,9 +2764,21 @@
|
||||
amount_left = round(reac_volume,0.1)
|
||||
exposed_mob.apply_status_effect(STATUS_EFFECT_ANTS, amount_left)
|
||||
|
||||
/datum/reagent/ants/expose_obj(obj/exposed_obj, reac_volume)
|
||||
. = ..()
|
||||
var/turf/open/my_turf = exposed_obj.loc // No dumping ants on an object in a storage slot
|
||||
if(!istype(my_turf)) //Are we actually in an open turf?
|
||||
return
|
||||
var/static/list/accepted_types = typecacheof(list(/obj/machinery/atmospherics, /obj/structure/cable, /obj/structure/disposalpipe))
|
||||
if(!accepted_types[exposed_obj.type]) // Bypasses pipes, vents, and cables to let people create ant mounds on top easily.
|
||||
return
|
||||
expose_turf(my_turf, reac_volume)
|
||||
|
||||
/datum/reagent/ants/expose_turf(turf/exposed_turf, reac_volume)
|
||||
. = ..()
|
||||
if((reac_volume < 10) || isspaceturf(exposed_turf))
|
||||
if(!istype(exposed_turf) || isspaceturf(exposed_turf)) // Is the turf valid
|
||||
return
|
||||
if((reac_volume <= 10)) // Makes sure people don't duplicate ants.
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/ants/pests = locate() in exposed_turf.contents
|
||||
|
||||
Reference in New Issue
Block a user