mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Shower related bug fixes (#20018)
 Fixed monkey cubes under showers from turning the game into Doom 3. Fixed showers not showering you because of an improper early return on wet floors. Fixed blood overlays being wrongly cleared when you shower. Sonme code improvements.
This commit is contained in:
@@ -453,6 +453,9 @@
|
||||
vomit.reagents.add_reagent(/singleton/reagent/acid/stomach, 5)
|
||||
|
||||
/atom/proc/clean_blood()
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
if(!simulated)
|
||||
return
|
||||
fluorescent = 0
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && reagents)
|
||||
|
||||
if (wet_things(T))
|
||||
if(!wet_things(T))
|
||||
break
|
||||
|
||||
if(T == get_turf(target))
|
||||
@@ -37,31 +37,34 @@
|
||||
|
||||
//Wets everything in the tile
|
||||
//A return value of 1 means that the wetting should stop. Either the water ran out or some error ocurred
|
||||
/**
|
||||
* Wets everything in the tile
|
||||
*
|
||||
* Returns `FALSE` if the water ran out or some error ocurred, or we should stop in general
|
||||
*/
|
||||
/obj/effect/effect/water/proc/wet_things(var/turf/T)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
if (!reagents || reagents.total_volume <= 0)
|
||||
return 1
|
||||
return FALSE
|
||||
|
||||
|
||||
reagents.touch_turf(T)
|
||||
var/list/mobshere = list()
|
||||
for (var/mob/living/L in T)
|
||||
mobshere.Add(L)
|
||||
for(var/atom/atom_in_turf as anything in T)
|
||||
if(isliving(atom_in_turf))
|
||||
mobshere.Add(atom_in_turf)
|
||||
else if(!ismob(atom_in_turf))
|
||||
reagents.touch(atom_in_turf)
|
||||
|
||||
|
||||
for (var/atom/B in T)
|
||||
if (!ismob(B))
|
||||
reagents.touch(B)
|
||||
|
||||
if (mobshere.len)
|
||||
var/portion = 1 / mobshere.len
|
||||
if(length(mobshere))
|
||||
var/portion = 1 / length(mobshere)
|
||||
var/total = reagents.total_volume
|
||||
for (var/mob/living/L in mobshere)
|
||||
reagents.splash(L, total * portion)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
for(var/mob/living/mobsphere_living_mob as anything in mobshere)
|
||||
reagents.splash(mobsphere_living_mob, total * portion)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/effect/effect/water/Move(turf/newloc)
|
||||
|
||||
@@ -853,7 +853,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
/obj/item/clean_blood()
|
||||
. = ..()
|
||||
if(blood_overlay)
|
||||
CutOverlays(blood_overlay, TRUE)
|
||||
CutOverlays(blood_overlay, ATOM_ICON_CACHE_ALL)
|
||||
if(istype(src, /obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = src
|
||||
G.transfer_blood = 0
|
||||
|
||||
@@ -224,6 +224,9 @@
|
||||
/obj/machinery/shower/proc/on_entered(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(QDELETED(arrived))
|
||||
return
|
||||
|
||||
INVOKE_ASYNC(src, PROC_REF(wash), arrived)
|
||||
if(ismob(arrived))
|
||||
mobpresent += 1
|
||||
@@ -232,6 +235,9 @@
|
||||
/obj/machinery/shower/proc/on_exit(atom/movable/gone, direction)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(QDELETED(gone))
|
||||
return
|
||||
|
||||
if(ismob(gone))
|
||||
mobpresent -= 1
|
||||
|
||||
|
||||
@@ -34,18 +34,17 @@
|
||||
dirtoverlay = new/obj/effect/decal/cleanable/dirt(src)
|
||||
dirtoverlay.alpha = min((dirt - 50) * 5, 255)
|
||||
|
||||
/turf/simulated/Entered(atom/A, atom/OL)
|
||||
/turf/simulated/Entered(atom/movable/arrived, atom/old_loc)
|
||||
if(movement_disabled && usr.ckey != movement_disabled_exception)
|
||||
to_chat(usr, SPAN_WARNING("Movement is admin-disabled.")) //This is to identify lag problems)
|
||||
return
|
||||
|
||||
if(istype(A,/mob/living))
|
||||
var/mob/living/M = A
|
||||
if(src.wet_type && src.wet_amount)
|
||||
if(M.buckled_to || (src.wet_type == 1 && M.m_intent == M_WALK))
|
||||
return
|
||||
if(istype(arrived, /mob/living))
|
||||
var/mob/living/M = arrived
|
||||
//if the turf is wet, the mob is not buckled, and either it's not wet with water or the mob is running, slip it
|
||||
if(src.wet_type && src.wet_amount && !M.buckled_to && (src.wet_type != WET_TYPE_WATER || M.m_intent != M_WALK))
|
||||
|
||||
//Water
|
||||
//Defaults to a water slip
|
||||
var/slip_dist = 1
|
||||
var/slip_stun = 6
|
||||
var/floor_type = "wet"
|
||||
@@ -67,14 +66,15 @@
|
||||
|
||||
// Ugly hack :c Should never have multiple plants in the same tile.
|
||||
var/obj/effect/plant/plant = locate() in contents
|
||||
if(plant) plant.trodden_on(M)
|
||||
if(plant)
|
||||
plant.trodden_on(M)
|
||||
|
||||
// Dirt overlays.
|
||||
update_dirt()
|
||||
|
||||
M.inertia_dir = 0
|
||||
|
||||
..(A, OL)
|
||||
..()
|
||||
|
||||
/**
|
||||
* Slips a mob, moving it for N tiles
|
||||
|
||||
@@ -354,8 +354,10 @@ var/list/slot_equipment_priority = list( \
|
||||
return 1
|
||||
|
||||
|
||||
//Attemps to remove an object on a mob.
|
||||
///Attemps to remove an object on a mob
|
||||
/mob/proc/remove_from_mob(var/obj/O)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
src.u_equip(O)
|
||||
if (src.client)
|
||||
src.client.screen -= O
|
||||
|
||||
@@ -333,18 +333,27 @@
|
||||
for(var/rtype in rtypes)
|
||||
. += src.trans_type_to(target, rtype, amounteach)
|
||||
|
||||
// When applying reagents to an atom externally, touch() is called to trigger any on-touch effects of the reagent.
|
||||
// This does not handle transferring reagents to things.
|
||||
// For example, splashing someone with water will get them wet and extinguish them if they are on fire,
|
||||
// even if they are wearing an impermeable suit that prevents the reagents from contacting the skin.
|
||||
/datum/reagents/proc/touch(var/atom/target)
|
||||
/**
|
||||
* When applying reagents to an atom externally, touch() is called to trigger any on-touch effects of the reagent
|
||||
*
|
||||
* This does not handle transferring reagents to things
|
||||
*
|
||||
* For example, splashing someone with water will get them wet and extinguish them if they are on fire,
|
||||
* even if they are wearing an impermeable suit that prevents the reagents from contacting the skin
|
||||
*/
|
||||
/datum/reagents/proc/touch(atom/target)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
//No point if it's getting deleted
|
||||
if(QDELETED(target))
|
||||
return
|
||||
|
||||
if(ismob(target))
|
||||
touch_mob(target)
|
||||
if(isturf(target))
|
||||
else if(isturf(target))
|
||||
touch_turf(target)
|
||||
if(isobj(target))
|
||||
else if(isobj(target))
|
||||
touch_obj(target)
|
||||
return
|
||||
|
||||
/datum/reagents/proc/touch_mob(var/mob/living/target)
|
||||
if(!target || !istype(target) || !target.simulated)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(istype(loc, /obj/item/gripper)) // fixes ghost cube when using syringe
|
||||
var/obj/item/gripper/G = loc
|
||||
G.drop_item()
|
||||
var/mob/living/carbon/human/H = new(src.loc)
|
||||
var/mob/living/carbon/human/H = new(get_turf(src))
|
||||
H.set_species(monkey_type)
|
||||
H.real_name = H.species.get_random_name()
|
||||
H.name = H.real_name
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# - (fixes bugs)
|
||||
# wip
|
||||
# - (work in progress)
|
||||
# qol
|
||||
# - (quality of life)
|
||||
# soundadd
|
||||
# - (adds a sound)
|
||||
# sounddel
|
||||
# - (removes a sound)
|
||||
# rscadd
|
||||
# - (adds a feature)
|
||||
# rscdel
|
||||
# - (removes a feature)
|
||||
# imageadd
|
||||
# - (adds an image or sprite)
|
||||
# imagedel
|
||||
# - (removes an image or sprite)
|
||||
# spellcheck
|
||||
# - (fixes spelling or grammar)
|
||||
# experiment
|
||||
# - (experimental change)
|
||||
# balance
|
||||
# - (balance changes)
|
||||
# code_imp
|
||||
# - (misc internal code change)
|
||||
# refactor
|
||||
# - (refactors code)
|
||||
# config
|
||||
# - (makes a change to the config files)
|
||||
# admin
|
||||
# - (makes changes to administrator tools)
|
||||
# server
|
||||
# - (miscellaneous changes to server)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: FluffyGhost
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "Fixed monkey cubes under showers from turning the game into Doom."
|
||||
- bugfix: "Fixed showers not showering you because of an improper early return on wet floors."
|
||||
- bugfix: "Fixed blood overlays being wrongly cleared when you shower."
|
||||
- code_imp: "Sonme code improvements."
|
||||
Reference in New Issue
Block a user