Additional August Fixes (#5104)

Fixes #5101
Fixes plants/food being able to be poured into reagent containers.
Fixes server hanging during backpressure surge.
This commit is contained in:
BurgerLUA
2018-08-07 12:09:30 -07:00
committed by Erki
parent 5453afa830
commit c31bcd2d72
7 changed files with 59 additions and 32 deletions

View File

@@ -23,13 +23,13 @@
#define SLOT_HOLSTER 0x8000 //16th bit - higher than this will overflow #define SLOT_HOLSTER 0x8000 //16th bit - higher than this will overflow
// Flags bitmasks. // Flags bitmasks.
#define NOBLUDGEON 0x1 // When an item has this it produces no "X has been hit by Y with Z" message with the default handler. #define NOBLUDGEON 0x1 // When an item has this it produces no "X has been hit by Y with Z" message with the default handler.
#define CONDUCT 0x2 // Conducts electricity. (metal etc.) #define CONDUCT 0x2 // Conducts electricity. (metal etc.)
#define ON_BORDER 0x4 // Item has priority to check when entering or leaving. #define ON_BORDER 0x4 // Item has priority to check when entering or leaving.
#define NOBLOODY 0x8 // Used for items if they don't want to get a blood overlay. #define NOBLOODY 0x8 // Used for items if they don't want to get a blood overlay.
#define OPENCONTAINER 0x10 // Is an open container for chemistry purposes. #define OPENCONTAINER 0x10 // Is an open container for chemistry purposes.
#define PHORONGUARD 0x20 // Does not get contaminated by phoron. #define PHORONGUARD 0x20 // Does not get contaminated by phoron.
#define NOREACT 0x40 // Reagents don't react inside this container. #define NOREACT 0x40 // Reagents don't react inside this container.
#define PROXMOVE 0x80 // Does this object require proximity checking in Enter()? #define PROXMOVE 0x80 // Does this object require proximity checking in Enter()?
//Flags for items (equipment) //Flags for items (equipment)

View File

@@ -43,21 +43,6 @@
wet_amount += amount wet_amount += amount
var/max_wetness = 10 //About 100 units per tile
if(wet_amount > max_wetness)
var/stored_wet = wet_amount - max_wetness
wet_amount -= max_wetness
var/wet_per_tile = stored_wet * 0.25
for(var/d in cardinal)
var/turf/simulated/target = get_step(src,d)
if(src.CanPass(null, target, 0, 0) && target.CanPass(null, src, 0, 0))
if(target.wet_amount)
var/edited_value = round(wet_per_tile * 0.5) //Prevent infinite loops
target.wet_floor(apply_type,edited_value)
wet_amount += edited_value
else
target.wet_floor(apply_type,wet_per_tile)
unwet_timer = addtimer(CALLBACK(src, .proc/unwet_floor), 120 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE | TIMER_STOPPABLE) unwet_timer = addtimer(CALLBACK(src, .proc/unwet_floor), 120 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE | TIMER_STOPPABLE)
/turf/simulated/proc/unwet_floor() /turf/simulated/proc/unwet_floor()

View File

@@ -181,7 +181,7 @@
origin_tech = list(TECH_MATERIAL = 6,TECH_ENGINEERING = 5,TECH_MAGNET = 4,TECH_POWER = 6) origin_tech = list(TECH_MATERIAL = 6,TECH_ENGINEERING = 5,TECH_MAGNET = 4,TECH_POWER = 6)
/obj/item/custom_ka_upgrade/cells/cell04/on_update(var/obj/item/weapon/gun/custom_ka/the_gun) /obj/item/custom_ka_upgrade/cells/kinetic_charging/on_update(var/obj/item/weapon/gun/custom_ka/the_gun)
stored_charge = min(stored_charge + round(stored_charge*0.2),cell_increase) stored_charge = min(stored_charge + round(stored_charge*0.2),cell_increase)

View File

@@ -245,6 +245,8 @@
/obj/item/weapon/gun/custom_ka/Initialize() /obj/item/weapon/gun/custom_ka/Initialize()
. = ..() . = ..()
START_PROCESSING(SSprocessing, src)
if(installed_cell) if(installed_cell)
installed_cell = new installed_cell(src) installed_cell = new installed_cell(src)
if(installed_barrel) if(installed_barrel)
@@ -255,8 +257,6 @@
update_stats() update_stats()
queue_icon_update() queue_icon_update()
START_PROCESSING(SSprocessing, src)
/obj/item/weapon/gun/custom_ka/Destroy() /obj/item/weapon/gun/custom_ka/Destroy()
. = ..() . = ..()
STOP_PROCESSING(SSprocessing, src) STOP_PROCESSING(SSprocessing, src)
@@ -269,8 +269,6 @@
if(installed_upgrade_chip) if(installed_upgrade_chip)
installed_upgrade_chip.on_update(src) installed_upgrade_chip.on_update(src)
..()
/obj/item/weapon/gun/custom_ka/update_icon() /obj/item/weapon/gun/custom_ka/update_icon()
. = ..() . = ..()
cut_overlays() cut_overlays()
@@ -488,11 +486,9 @@
/obj/item/custom_ka_upgrade/proc/on_update(var/obj/item/weapon/gun/custom_ka) /obj/item/custom_ka_upgrade/proc/on_update(var/obj/item/weapon/gun/custom_ka)
//Do update related things here //Do update related things here
return
/obj/item/custom_ka_upgrade/proc/on_fire(var/obj/item/weapon/gun/custom_ka) /obj/item/custom_ka_upgrade/proc/on_fire(var/obj/item/weapon/gun/custom_ka)
//Do fire related things here //Do fire related things here
return
/obj/item/custom_ka_upgrade/cells /obj/item/custom_ka_upgrade/cells
name = null //Abstract name = null //Abstract
@@ -556,8 +552,6 @@
"<span class='warning'>\The [user] scans \the [target] with \the [src].</span>", "<span class='warning'>\The [user] scans \the [target] with \the [src].</span>",
"<span class='alert'>You scan \the [target] with \the [src].</span>") "<span class='alert'>You scan \the [target] with \the [src].</span>")
if(istype(target,/obj/item/weapon/gun/custom_ka)) if(istype(target,/obj/item/weapon/gun/custom_ka))
playsound(src, 'sound/machines/ping.ogg', 10, 1) playsound(src, 'sound/machines/ping.ogg', 10, 1)

View File

@@ -64,15 +64,16 @@
return return
if(is_type_in_list(target,can_be_placed_into)) if(is_type_in_list(target,can_be_placed_into))
return return
if(standard_splash_mob(user, target))
return
if(standard_feed_mob(user,target)) if(standard_feed_mob(user,target))
return return
if(standard_splash_mob(user, target))
return
if(standard_pour_into(user, target)) if(standard_pour_into(user, target))
return return
if(standard_splash_obj(user, target)) if(standard_splash_obj(user, target))
return return
/obj/item/weapon/reagent_containers/proc/reagentlist() // For attack logs /obj/item/weapon/reagent_containers/proc/reagentlist() // For attack logs
if(reagents) if(reagents)
return reagents.get_reagents() return reagents.get_reagents()
@@ -106,12 +107,13 @@
reagents.splash(target, reagents.total_volume) reagents.splash(target, reagents.total_volume)
return return
/obj/item/weapon/reagent_containers/proc/standard_splash_mob(var/mob/user, var/mob/target) // This goes into afterattack // This goes into afterattack
/obj/item/weapon/reagent_containers/proc/standard_splash_mob(var/mob/user, var/mob/target)
if(!istype(target)) if(!istype(target))
return return
if(user.a_intent != I_HURT) if(user.a_intent != I_HURT)
return return 0
if(!reagents || !reagents.total_volume) if(!reagents || !reagents.total_volume)
user << "<span class='notice'>[src] is empty.</span>" user << "<span class='notice'>[src] is empty.</span>"
@@ -148,9 +150,13 @@
playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
/obj/item/weapon/reagent_containers/proc/standard_feed_mob(var/mob/user, var/mob/target) // This goes into attack /obj/item/weapon/reagent_containers/proc/standard_feed_mob(var/mob/user, var/mob/target) // This goes into attack
if(!istype(target)) if(!istype(target))
return 0 return 0
if(user.a_intent == I_HURT)
return 0
if(!reagents || !reagents.total_volume) if(!reagents || !reagents.total_volume)
user << "<span class='notice'>\The [src] is empty.</span>" user << "<span class='notice'>\The [src] is empty.</span>"
return 1 return 1

View File

@@ -37,5 +37,8 @@
. = ..() . = ..()
/obj/item/weapon/reagent_containers/food/standard_splash_mob(var/mob/user, var/mob/target)
return 1 //Returning 1 will cancel everything else in a long line of things it should do.
#undef CELLS #undef CELLS
#undef CELLSIZE #undef CELLSIZE

View File

@@ -0,0 +1,39 @@
################################
# 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
# balance
#################################
# Your name.
author: BurgerBB
# 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:
- bugfix: "Fixes the kinetic uranium recharger from not functioning."
- bugfix: "Fixes food/plants from being able to be poured into containers."
- bugfix: "Removes water dispersion, as it would hang the server during scrubber events."