From 3e1ad4099e90cc271e44356593a72062c8728f0e Mon Sep 17 00:00:00 2001 From: Atlantiscze Date: Thu, 1 Jan 2015 17:20:21 +0100 Subject: [PATCH 1/7] Wireless Wires Bug Removal - This removes the dreaded wireless wires bug, which caused wires disconnected by explosions to actually still conduct power until powernet was manually updated. - This also adresses issue with (on bay unused) singularity, which exhibits similar behavior when eating wires (wireless wires bug) --- code/game/objects/explosion.dm | 12 ++++++++---- code/modules/power/singularity/singularity.dm | 9 --------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index c48d062e9e1..32f05901b4a 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -70,8 +70,12 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit lighting_controller.processing = 0 + + + var/approximate_intensity = (devastation_range * 3) + (heavy_impact_range * 2) + light_impact_range var/powernet_rebuild_was_deferred_already = defer_powernet_rebuild - if(defer_powernet_rebuild != 2) + // Large enough explosion. For performance reasons, powernets will be rebuilt manually + if(!defer_powernet_rebuild && (approximate_intensity > 25)) defer_powernet_rebuild = 1 if(heavy_impact_range > 1) @@ -110,9 +114,9 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa sleep(8) if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing - if(!powernet_rebuild_was_deferred_already) - if(defer_powernet_rebuild != 2) - defer_powernet_rebuild = 0 + if(!powernet_rebuild_was_deferred_already && defer_powernet_rebuild) + makepowernets() + defer_powernet_rebuild = 0 return 1 diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index e71157be7e7..5bed535c7f8 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -206,8 +206,6 @@ var/global/list/uneatable = list( /obj/machinery/singularity/proc/eat() set background = 1 - if(defer_powernet_rebuild != 2) - defer_powernet_rebuild = 1 // Let's just make this one loop. for(var/atom/X in orange(grav_pull,src)) var/dist = get_dist(X, src) @@ -226,9 +224,6 @@ var/global/list/uneatable = list( // Turf and movable atoms else if(dist <= consume_range && (isturf(X) || istype(X, /atom/movable))) consume(X) - - if(defer_powernet_rebuild != 2) - defer_powernet_rebuild = 0 return @@ -567,11 +562,7 @@ var/global/list/uneatable = list( /obj/machinery/singularity/narsie/wizard/eat() set background = 1 - if(defer_powernet_rebuild != 2) - defer_powernet_rebuild = 1 for(var/atom/X in orange(consume_range,src)) if(isturf(X) || istype(X, /atom/movable)) consume(X) - if(defer_powernet_rebuild != 2) - defer_powernet_rebuild = 0 return From 1c772e99143d063a13584313a91c6a5af36a1760 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Thu, 15 Jan 2015 16:45:45 +0300 Subject: [PATCH 2/7] Fixes #7821 --- code/game/gamemodes/setupgame.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 1 + code/modules/virus2/effect.dm | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index d2b54fe5ba5..09d83c01b3f 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -91,7 +91,7 @@ //REMOTEVIEWBLOCK = getAssignedBlock("REMOTEVIEW", numsToAssign, DNA_HARDER_BOUNDS) //REGENERATEBLOCK = getAssignedBlock("REGENERATE", numsToAssign, DNA_HARDER_BOUNDS) //INCREASERUNBLOCK = getAssignedBlock("INCREASERUN", numsToAssign, DNA_HARDER_BOUNDS) - //REMOTETALKBLOCK = getAssignedBlock("REMOTETALK", numsToAssign, DNA_HARDER_BOUNDS) + REMOTETALKBLOCK = getAssignedBlock("REMOTETALK", numsToAssign, DNA_HARDER_BOUNDS) //MORPHBLOCK = getAssignedBlock("MORPH", numsToAssign, DNA_HARDER_BOUNDS) //COLDBLOCK = getAssignedBlock("COLD", numsToAssign) //HALLUCINATIONBLOCK = getAssignedBlock("HALLUCINATION", numsToAssign) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 59e402548a4..f4025be06d1 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -941,6 +941,7 @@ else target.show_message("\blue You hear a voice that seems to echo around the room: [say]") usr.show_message("\blue You project your mind into [target.real_name]: [say]") + log_say("[key_name(usr)] sent a telepathic message to [key_name(target)]: [say]") for(var/mob/dead/observer/G in world) G.show_message("Telepathic message from [src] to [target]: [say]") diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 3ebeefeba8e..048085b730d 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -191,10 +191,10 @@ /datum/disease2/effect/telepathic name = "Telepathy Syndrome" stage = 3 + happensonce = 1 activate(var/mob/living/carbon/mob,var/multiplier) - mob.dna.check_integrity() mob.dna.SetSEState(REMOTETALKBLOCK,1) - domutcheck(mob, null) + domutcheck(mob, null, MUTCHK_FORCED) /datum/disease2/effect/mind name = "Lazy Mind Syndrome" From 0401cb20845b992c7c7165c95a8adb22ffd32b01 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Thu, 15 Jan 2015 17:09:50 +0300 Subject: [PATCH 3/7] Fixes #7820 --- code/game/verbs/suicide.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 82a81e5af74..ab3c8dcc804 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -59,7 +59,8 @@ //Do 175 damage divided by the number of damage types applied. if(damagetype & BRUTELOSS) - adjustBruteLoss(175/damage_mod) + adjustBruteLoss(30/damage_mod) //hack to prevent gibbing + adjustOxyLoss(145/damage_mod) if(damagetype & FIRELOSS) adjustFireLoss(175/damage_mod) From 47e5e51db37d6a567211e5e308201b4279552f35 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Thu, 15 Jan 2015 17:51:45 +0300 Subject: [PATCH 4/7] Fix for the fix. --- code/modules/virus2/effect.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 048085b730d..aa0a06c9df8 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -191,7 +191,6 @@ /datum/disease2/effect/telepathic name = "Telepathy Syndrome" stage = 3 - happensonce = 1 activate(var/mob/living/carbon/mob,var/multiplier) mob.dna.SetSEState(REMOTETALKBLOCK,1) domutcheck(mob, null, MUTCHK_FORCED) From 6f8618ded85d6cd08cc432e727c8eb73586d3acd Mon Sep 17 00:00:00 2001 From: Chinsky Date: Thu, 15 Jan 2015 18:04:10 +0300 Subject: [PATCH 5/7] Fixes surgery steps never failing --- code/modules/surgery/surgery.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index c5e883e79a4..339f1a6070f 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -98,7 +98,7 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool) //We had proper tools! (or RNG smiled.) and user did not move or change hands. if(prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration))) S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully - else if (tool in user.contents && user.Adjacent(M)) //or + else if ((tool in user.contents) && user.Adjacent(M)) //or S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~ else // This failing silently was a pain. user << "\red You must remain close to your patient to conduct surgery." From 0a7185c20a4fc597036ea7ae586586941ae58b2d Mon Sep 17 00:00:00 2001 From: Chinsky Date: Thu, 15 Jan 2015 18:59:39 +0300 Subject: [PATCH 6/7] Fixes #7787 Made clean surgical amputation not cause huge wounds. Also moved code around a bit to prevent situations where missing limbs would get wounds (ie hands giving wounds to arms during recursive droplimb). --- code/modules/organs/organ_external.dm | 12 ++++++------ code/modules/surgery/generic.dm | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index c0c23975188..6ef2e59b906 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -562,7 +562,7 @@ Note that amputating the affected organ does in fact remove the infection from t O.setAmputatedTree() //Handles dismemberment -/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0) +/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0,var/amputation=0) if(destspawn) return if(override) status |= ORGAN_DESTROYED @@ -579,9 +579,13 @@ Note that amputating the affected organ does in fact remove the infection from t germ_level = 0 + // If any organs are attached to this, destroy them + for(var/datum/organ/external/O in children) + O.droplimb(1, no_explode, amputation) + //Replace all wounds on that arm with one wound on parent organ. wounds.Cut() - if (parent) + if (parent && !amputation) var/datum/wound/W if(max_damage < 50) W = new/datum/wound/lost_limb/small(max_damage) @@ -591,10 +595,6 @@ Note that amputating the affected organ does in fact remove the infection from t parent.update_damages() update_damages() - // If any organs are attached to this, destroy them - for(var/datum/organ/external/O in children) - O.droplimb(1) - var/obj/organ //Dropped limb object switch(body_part) if(HEAD) diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 238657c28da..2642b87cb77 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -305,7 +305,7 @@ var/datum/organ/external/affected = target.get_organ(target_zone) user.visible_message("\blue [user] cuts off [target]'s [affected.display_name] with \the [tool].", \ "\blue You cut off [target]'s [affected.display_name] with \the [tool].") - affected.droplimb(1,0) + affected.droplimb(1,1,1) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) From fb945fa9ecc637cebbcf6c61282db46b627108e1 Mon Sep 17 00:00:00 2001 From: Loganbacca Date: Fri, 16 Jan 2015 13:50:13 +1300 Subject: [PATCH 7/7] Fixes telekinetic tape placement on airlocks --- code/WorkInProgress/Ported/policetape.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/WorkInProgress/Ported/policetape.dm b/code/WorkInProgress/Ported/policetape.dm index f331f8401bb..4f28e524109 100644 --- a/code/WorkInProgress/Ported/policetape.dm +++ b/code/WorkInProgress/Ported/policetape.dm @@ -98,8 +98,8 @@ //is_blocked_turf(var/turf/T) usr << "\blue You finish placing the [src]." //Git Test -/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob) - if (istype(A, /obj/machinery/door/airlock)) +/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity) + if (proximity && istype(A, /obj/machinery/door/airlock)) var/turf/T = get_turf(A) var/obj/item/tape/P = new tape_type(T.x,T.y,T.z) P.loc = locate(T.x,T.y,T.z)