From 8bd79007ef51d9dd5337eccb37023df093606b30 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Oct 2016 17:43:03 +0200 Subject: [PATCH 1/5] Fix holodeck ready device and ghosts accessing tray lights --- code/game/machinery/computer/HolodeckControl.dm | 4 ++-- code/modules/hydroponics/trays/tray.dm | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index eafdbe893ab..aa834941d78 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -553,8 +553,8 @@ to_chat(user, "The device is a solid button, there's nothing you can do with it!") /obj/machinery/readybutton/attack_hand(mob/user as mob) - if(user.stat || stat & (NOPOWER|BROKEN)) - to_chat(user, "This device is not powered.") + if(user.stat || stat & (BROKEN)) + to_chat(user, "This device is not functioning.") return currentarea = get_area(src.loc) diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index e9c63ed8794..b7e9c9ac4d8 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -380,10 +380,12 @@ //--FalseIncarnate /obj/machinery/portable_atmospherics/hydroponics/verb/remove_label() - set name = "Remove Label" set category = "Object" set src in view(1) + + if(usr.stat || usr.restrained()) + return if(labelled) to_chat(usr, "You remove the label.") @@ -397,6 +399,9 @@ set name = "Set Light" set category = "Object" set src in view(1) + + if(usr.stat || usr.restrained()) + return var/new_light = input("Specify a light level.") as null|anything in list(0,1,2,3,4,5,6,7,8,9,10) if(new_light) From cf31814e80de0c0ea512705b2d638a640dfb83c6 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Oct 2016 18:51:49 +0200 Subject: [PATCH 2/5] Exploit fixes --- code/game/dna/genes/goon_powers.dm | 4 ++++ code/game/machinery/Sleeper.dm | 8 ++++++-- code/game/machinery/cryo.dm | 13 ++++++++----- code/game/machinery/programmable_unloader.dm | 1 + code/game/mecha/equipment/tools/medical_tools.dm | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index f9e9c2678a5..1ada7c0f5ac 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -288,6 +288,10 @@ if((O in user) && is_type_in_list(O,own_blacklist)) continue if(is_type_in_list(O,types_allowed)) + if(isanimal(O)) + var/mob/living/simple_animal/SA = O + if(!SA.gold_core_spawnable) + continue possible_targets += O targets += input("Choose the target of your hunger.", "Targeting") as null|anything in possible_targets diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 60e650691e5..65668b9104c 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -454,8 +454,10 @@ set name = "Eject Sleeper" set category = "Object" set src in oview(1) - if(usr.stat != 0) + + if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other return + src.icon_state = "[base_icon]-open" src.go_out() add_fingerprint(usr) @@ -465,8 +467,10 @@ set name = "Remove Beaker" set category = "Object" set src in oview(1) - if(usr.stat != 0) + + if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other return + if(beaker) filtering = 0 beaker.forceMove(usr.loc) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 94bc3f5b90b..c4a1968a18f 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -457,16 +457,15 @@ set name = "Eject occupant" set category = "Object" set src in oview(1) + if(usr == occupant)//If the user is inside the tube... - if(usr.stat == 2)//and he's not dead.... - return - to_chat(usr, "\blue Release sequence activated. This will take two minutes.") + to_chat(usr, "Release sequence activated. This will take two minutes.") sleep(600) if(!src || !usr || !occupant || (occupant != usr)) //Check if someone's released/replaced/bombed him already return go_out()//and release him from the eternal prison. else - if(usr.stat != 0) + if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other return go_out() add_fingerprint(usr) @@ -476,14 +475,18 @@ set name = "Move Inside" set category = "Object" set src in oview(1) + for(var/mob/living/carbon/slime/M in range(1,usr)) if(M.Victim == usr) to_chat(usr, "You're too busy getting your life sucked out of you.") return - if(usr.stat != 0 || stat & (NOPOWER|BROKEN)) + + if(stat & (NOPOWER|BROKEN)) return + if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other return + put_mob(usr) return diff --git a/code/game/machinery/programmable_unloader.dm b/code/game/machinery/programmable_unloader.dm index 4cd09d6f8a4..3bed121322b 100644 --- a/code/game/machinery/programmable_unloader.dm +++ b/code/game/machinery/programmable_unloader.dm @@ -254,6 +254,7 @@ src.overrides = null P.emag_overrides = src.emag_overrides src.emag_overrides = null + default_deconstruction_crowbar(I, 1) return else ..(I,user) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 23271355206..29158e083e5 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -488,7 +488,7 @@ return 1 /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/add_known_reagent(r_id,r_name) - if(!(r_id in known_reagents)) + if(!(r_id in known_reagents) && (r_id in standard_medicines)) known_reagents += r_id known_reagents[r_id] = r_name return 1 From db0a2ec3eff12b9aae4674e705d77f1ff32fc4a6 Mon Sep 17 00:00:00 2001 From: Markolie Date: Mon, 17 Oct 2016 18:56:04 +0200 Subject: [PATCH 3/5] Cryo occupant death fix --- code/game/machinery/cryo.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index c4a1968a18f..f2fad7fa81a 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -459,6 +459,8 @@ set src in oview(1) if(usr == occupant)//If the user is inside the tube... + if(usr.stat == DEAD) + return to_chat(usr, "Release sequence activated. This will take two minutes.") sleep(600) if(!src || !usr || !occupant || (occupant != usr)) //Check if someone's released/replaced/bombed him already From 80591de9b1bc34e0641f02d8580d20da7f6b5393 Mon Sep 17 00:00:00 2001 From: Markolie Date: Tue, 18 Oct 2016 16:30:20 +0200 Subject: [PATCH 4/5] Use incapacitated() checks --- code/game/machinery/Sleeper.dm | 4 ++-- code/game/machinery/cryo.dm | 4 ++-- code/modules/hydroponics/trays/tray.dm | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 65668b9104c..7adf9114aa1 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -455,7 +455,7 @@ set category = "Object" set src in oview(1) - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return src.icon_state = "[base_icon]-open" @@ -468,7 +468,7 @@ set category = "Object" set src in oview(1) - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return if(beaker) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index f2fad7fa81a..240f225abc1 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -467,7 +467,7 @@ return go_out()//and release him from the eternal prison. else - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return go_out() add_fingerprint(usr) @@ -486,7 +486,7 @@ if(stat & (NOPOWER|BROKEN)) return - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return put_mob(usr) diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index b7e9c9ac4d8..72bf80c58de 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -384,7 +384,7 @@ set category = "Object" set src in view(1) - if(usr.stat || usr.restrained()) + if(usr.incapacitated()) return if(labelled) @@ -400,7 +400,7 @@ set category = "Object" set src in view(1) - if(usr.stat || usr.restrained()) + if(usr.incapacitated()) return var/new_light = input("Specify a light level.") as null|anything in list(0,1,2,3,4,5,6,7,8,9,10) From 81a509c043abb1f8df3a8d7a4763859f9c91e397 Mon Sep 17 00:00:00 2001 From: Markolie Date: Fri, 11 Nov 2016 11:40:27 +0100 Subject: [PATCH 5/5] Fix cryo expel gas removal, undo syringe gun synth change --- code/game/machinery/cryo.dm | 11 ----------- code/game/mecha/equipment/tools/medical_tools.dm | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 889f78f283f..33b1d79cb19 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -134,7 +134,6 @@ if(air_contents) temperature_archived = air_contents.temperature heat_gas_contents() - expel_gas() if(occupant) process_occupant() @@ -401,16 +400,6 @@ var/combined_energy = T20C*current_heat_capacity + air_heat_capacity*air_contents.temperature air_contents.temperature = combined_energy/combined_heat_capacity -/obj/machinery/atmospherics/unary/cryo_cell/proc/expel_gas() - if(air_contents.total_moles() < 1) - return - var/datum/gas_mixture/expel_gas = new - var/remove_amount = air_contents.total_moles()/100 - expel_gas = air_contents.remove(remove_amount) - expel_gas.temperature = T20C // Lets expel hot gas and see if that helps people not die as they are removed - loc.assume_air(expel_gas) - air_update_turf() - /obj/machinery/atmospherics/unary/cryo_cell/proc/go_out() if(!occupant) return diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 29158e083e5..23271355206 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -488,7 +488,7 @@ return 1 /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/add_known_reagent(r_id,r_name) - if(!(r_id in known_reagents) && (r_id in standard_medicines)) + if(!(r_id in known_reagents)) known_reagents += r_id known_reagents[r_id] = r_name return 1