From 75b540c061ddf1b661b7c03a60f4bb1633250034 Mon Sep 17 00:00:00 2001 From: NanakoAC Date: Wed, 4 Jan 2017 01:14:07 +0000 Subject: [PATCH] Miscellaneous bugfixes (#1385) Fixes footstep sounds, they weren't defined. I redefined them for all floors. Also changed a few, notably carpets and bare plating have different sounds from what they used to. And all the various holodeck terrains should have correct sounds now too Fixes bicaridine and internal bleeding interactions. It was never really working before because the internal wounds could never be removed. Slightly rebalanced some values with bicaridine and internal bleeding. Adds short doafter and visible message to engiborg inflatable dispenser --- code/game/sound.dm | 5 ++- code/game/turfs/flooring/flooring_premade.dm | 10 ++++- code/game/turfs/simulated/floor_types.dm | 8 +++- code/game/turfs/turf.dm | 2 +- code/modules/holodeck/HolodeckObjects.dm | 8 +++- .../mob/living/silicon/robot/robot_items.dm | 22 ++++++++--- code/modules/organs/organ_external.dm | 9 ++--- code/modules/organs/wound.dm | 11 +++++- .../Chemistry-Reagents-Medicine.dm | 17 ++++++++- .../Nanako-Inflatafootstepbleeding.yml | 38 +++++++++++++++++++ 10 files changed, 110 insertions(+), 20 deletions(-) create mode 100644 html/changelogs/Nanako-Inflatafootstepbleeding.yml diff --git a/code/game/sound.dm b/code/game/sound.dm index 575df8ebe58..2838b934b7f 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -53,9 +53,9 @@ var/list/grassfootsteps = list('sound/effects/footsteps/grass1.wav','sound/effec var/list/dirtfootsteps = list('sound/effects/footsteps/dirt1.wav','sound/effects/footsteps/dirt2.wav','sound/effects/footsteps/dirt3.wav','sound/effects/footsteps/dirt4.wav') var/list/waterfootsteps = list('sound/effects/footsteps/slosh1.wav','sound/effects/footsteps/slosh2.wav','sound/effects/footsteps/slosh3.wav','sound/effects/footsteps/slosh4.wav') var/list/sandfootsteps = list('sound/effects/footsteps/sand1.wav','sound/effects/footsteps/sand2.wav','sound/effects/footsteps/sand3.wav','sound/effects/footsteps/sand4.wav') -var/list/gravelstep = list('sound/effects/footsteps/gravel1.wav','sound/effects/footsteps/gravel2.wav','sound/effects/footsteps/gravel3.wav','sound/effects/footsteps/gravel4.wav') +var/list/gravelfootsteps = list('sound/effects/footsteps/gravel1.wav','sound/effects/footsteps/gravel2.wav','sound/effects/footsteps/gravel3.wav','sound/effects/footsteps/gravel4.wav') -var/list/footstepfx = list("defaultstep","concretestep","grassstep","dirtstep","waterstep","sandstep") +var/list/footstepfx = list("defaultstep","concretestep","grassstep","dirtstep","waterstep","sandstep", "gravelstep") //var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg') @@ -209,4 +209,5 @@ var/const/FALLOFF_SOUNDS = 0.5 if ("dirtstep") soundin = pick(dirtfootsteps) if ("waterstep") soundin = pick(waterfootsteps) if ("sandstep") soundin = pick(sandfootsteps) + if ("gravelstep") soundin = pick(gravelfootsteps) return soundin diff --git a/code/game/turfs/flooring/flooring_premade.dm b/code/game/turfs/flooring/flooring_premade.dm index 8fe6b23973f..33b54cc38bc 100644 --- a/code/game/turfs/flooring/flooring_premade.dm +++ b/code/game/turfs/flooring/flooring_premade.dm @@ -3,6 +3,7 @@ icon = 'icons/turf/flooring/carpet.dmi' icon_state = "carpet" initial_flooring = /decl/flooring/carpet + footstep_sound = "dirtstep"//It sounds better than squeaky hard-floor audio /turf/simulated/floor/bluegrid name = "mainframe floor" @@ -27,6 +28,7 @@ icon = 'icons/turf/flooring/grass.dmi' icon_state = "grass0" initial_flooring = /decl/flooring/grass + footstep_sound = "grassstep" /turf/simulated/floor/carpet/blue name = "blue carpet" @@ -44,6 +46,7 @@ icon = 'icons/turf/flooring/tiles.dmi' icon_state = "reinforced" initial_flooring = /decl/flooring/reinforced + footstep_sound = "concretestep" /turf/simulated/floor/reinforced/airless oxygen = 0 @@ -145,6 +148,7 @@ oxygen = 0 nitrogen = 0 temperature = TCMB + footstep_sound = "concretestep" /turf/simulated/floor/tiled/airless name = "airless floor" @@ -177,13 +181,15 @@ /turf/simulated/floor/airless/lava /turf/simulated/floor/light /turf/simulated/floor/snow -/turf/simulated/floor/beach/coastline + footstep_sound = "gravelstep" /turf/simulated/floor/plating/snow + footstep_sound = "gravelstep" /turf/simulated/floor/airless/ceiling /turf/simulated/floor/beach name = "beach" icon = 'icons/misc/beach.dmi' + footstep_sound = "sandstep" /turf/simulated/floor/beach/sand name = "sand" @@ -196,10 +202,12 @@ name = "coastline" icon = 'icons/misc/beach2.dmi' icon_state = "sandwater" + footstep_sound = "waterstep" /turf/simulated/floor/beach/water name = "water" icon_state = "water" + footstep_sound = "waterstep" /turf/simulated/floor/beach/water/update_dirt() return // Water doesn't become dirty diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index 21c26de1b3c..b2eb625d665 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -1,6 +1,10 @@ +/turf/simulated/floor/plating + footstep_sound = "concretestep" + /turf/simulated/floor/diona name = "biomass flooring" icon_state = "diona" + footstep_sound = "grassstep" /turf/simulated/floor/diona/attackby() return @@ -22,13 +26,13 @@ /turf/simulated/shuttle/floor name = "floor" icon_state = "floor" - footstep_sound = "concretefootsteps" + footstep_sound = "concretestep" /turf/simulated/shuttle/plating name = "plating" icon = 'icons/turf/floors.dmi' icon_state = "plating" - footstep_sound = "concretefootsteps" + footstep_sound = "concretestep" level = 1 /turf/simulated/shuttle/plating/is_plating() diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 175344d9390..fd41829d79b 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -23,7 +23,7 @@ var/blessed = 0 // Has the turf been blessed? var/dynamic_lighting = 1 // Does the turf use dynamic lighting? - var/footstep_sound = null + var/footstep_sound = "defaultstep" var/list/decals diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index 07bf641445e..438d45550a2 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -18,6 +18,7 @@ icon = 'icons/turf/flooring/carpet.dmi' icon_state = "carpet" initial_flooring = /decl/flooring/carpet + footstep_sound = "dirtstep"//It sounds better than squeaky hard-floor audio /turf/simulated/floor/holofloor/tiled name = "floor" @@ -56,6 +57,7 @@ base_icon = 'icons/turf/floors.dmi' icon_state = "snow" base_icon_state = "snow" + footstep_sound = "gravelstep" /turf/simulated/floor/holofloor/space icon = 'icons/turf/space.dmi' @@ -68,6 +70,7 @@ initial_flooring = /decl/flooring/reinforced name = "reinforced holofloor" icon_state = "reinforced" + footstep_sound = "concretestep" /turf/simulated/floor/holofloor/space/New() icon_state = "[((x + y) ^ ~(x * y) + z) % 25]" @@ -78,6 +81,7 @@ icon = 'icons/misc/beach.dmi' base_icon = 'icons/misc/beach.dmi' initial_flooring = null + footstep_sound = "sandstep" /turf/simulated/floor/holofloor/beach/sand name = "sand" @@ -89,11 +93,13 @@ icon = 'icons/misc/beach2.dmi' icon_state = "sandwater" base_icon_state = "sandwater" + footstep_sound = "waterstep" /turf/simulated/floor/holofloor/beach/water name = "water" icon_state = "seashallow" base_icon_state = "seashallow" + footstep_sound = "waterstep" /turf/simulated/floor/holofloor/desert name = "desert sand" @@ -257,7 +263,7 @@ /obj/item/weapon/holo/esword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") if(active && default_parry_check(user, attacker, damage_source) && prob(50)) user.visible_message("\The [user] parries [attack_text] with \the [src]!") - + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 6e9df95a11a..2248c7f28cd 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -263,7 +263,7 @@ icon = 'icons/obj/storage.dmi' icon_state = "inf_deployer" w_class = 3 - + var/deploying = 0 // By default stores up to 10 walls and 5 doors. May be changed. var/stored_walls = 10 var/stored_doors = 5 @@ -294,14 +294,17 @@ pick_up(A, user) /obj/item/weapon/inflatable_dispenser/proc/try_deploy_inflatable(var/turf/T, var/mob/living/user) + if (deploying) + return + deploying = 1 + var/newtype if(mode) // Door deployment if(!stored_doors) user << "\The [src] is out of doors!" return if(T && istype(T)) - new /obj/structure/inflatable/door(T) - stored_doors-- + newtype = /obj/structure/inflatable/door else // Wall deployment if(!stored_walls) @@ -309,11 +312,18 @@ return if(T && istype(T)) - new /obj/structure/inflatable/wall(T) + newtype = /obj/structure/inflatable/wall + + user.visible_message(span("notice", "[user] starts deploying an inflatable"), span("notice", "You start deploying an inflatable [mode ? "door" : "wall"]!")) + playsound(T, 'sound/items/zip.ogg', 75, 1) + if (do_after(user, 20, needhand = 0)) + new newtype(T) + if (mode) + stored_doors-- + else stored_walls-- - playsound(T, 'sound/items/zip.ogg', 75, 1) - user << "You deploy the inflatable [mode ? "door" : "wall"]!" + deploying = 0 /obj/item/weapon/inflatable_dispenser/proc/pick_up(var/obj/A, var/mob/living/user) if(istype(A, /obj/structure/inflatable)) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 4a1909d2544..37741398f2b 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -581,7 +581,7 @@ Note that amputating the affected organ does in fact remove the infection from t var/updatehud for(var/datum/wound/W in wounds) // wounds can disappear after 10 minutes at the earliest - if(W.damage <= 0 && W.created + 10 * 10 * 60 <= world.time) + if(W.damage <= 0 && W.created + 6000 <= world.time) wounds -= W continue // let the GC handle the deletion of the wound @@ -590,13 +590,12 @@ Note that amputating the affected organ does in fact remove the infection from t updatehud = 1//If there are any wounds with damage to heal, then we'll update health huds // Internal wounds get worse over time. Low temperatures (cryo) stop them. - if(W.internal && owner.bodytemperature >= 170) + if(W.damage && W.internal && owner.bodytemperature >= 170) var/bicardose = owner.reagents.get_reagent_amount("bicaridine") var/inaprovaline = owner.reagents.get_reagent_amount("inaprovaline") if(!(W.can_autoheal() || (bicardose && inaprovaline))) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, unless it is so small that it is already healing - W.open_wound(0.1 * wound_update_accuracy) - if(bicardose >= 30) //overdose of bicaridine begins healing IB - W.damage = max(0, W.damage - 0.2) + W.open_wound(0.09 * wound_update_accuracy) + owner.vessel.remove_reagent("blood", wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place. if(prob(1 * wound_update_accuracy)) diff --git a/code/modules/organs/wound.dm b/code/modules/organs/wound.dm index 7d89a07d67c..e89d6d11adc 100644 --- a/code/modules/organs/wound.dm +++ b/code/modules/organs/wound.dm @@ -46,7 +46,6 @@ - // helper lists var/tmp/list/desc_list = list() var/tmp/list/damage_list = list() @@ -166,6 +165,16 @@ desc = desc_list[current_stage] src.min_damage = damage_list[current_stage] + //Internal wounds should vanish if damage reaches 0 + if (internal && damage <= 0) + //Wounds can't clean themselves up. Instead we'll set vars that will make the organ delete us + internal = 0 + bleed_timer = 0 + damage = 0 + created = -6000//Wounds only disappear after 10 mins + //These vars will cause this wound to be removed and GC'd next tick + + // return amount of healing still leftover, can be used for other wounds return amount diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 3025970af0e..36eb5e15b18 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -27,10 +27,25 @@ color = "#BF0000" overdose = REAGENTS_OVERDOSE scannable = 1 + metabolism = REM * 1.5//Get to overdose state a bit faster /datum/reagent/bicaridine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) - M.heal_organ_damage(6 * removed, 0) + M.heal_organ_damage(5 * removed, 0) + +/datum/reagent/bicaridine/overdose(var/mob/living/carbon/M, var/alien) + ..()//Bicard overdose heals internal wounds + if(alien != IS_DIONA && ishuman(M)) + var/healpower = 1 + var/mob/living/carbon/human/H = M + for (var/a in H.organs) + var/obj/item/organ/external/E = a + for (var/w in E.wounds) + var/datum/wound/W = w + if (W && W.internal) + healpower = W.heal_damage(healpower,1) + if (healpower <= 0) + return /datum/reagent/kelotane name = "Kelotane" diff --git a/html/changelogs/Nanako-Inflatafootstepbleeding.yml b/html/changelogs/Nanako-Inflatafootstepbleeding.yml new file mode 100644 index 00000000000..64a471db0ff --- /dev/null +++ b/html/changelogs/Nanako-Inflatafootstepbleeding.yml @@ -0,0 +1,38 @@ +################################ +# 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 +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Nanako + +# 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, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "Bicaridine metabolises a little faster but heals less" + - bugfix: "Fixed bicaridine not properly healing internal bleeding." + - soundadd: "Footstep sounds adjusted on several different kinds of floors. Notably plating and carpets."