From 28df26b36c00aad389338ad0e78d192f4ed373b3 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 23 Mar 2015 02:34:17 -0400 Subject: [PATCH 1/4] Reduces the effect of EMP on robot power cells Temporary fix to resolve #8454 --- code/modules/mob/living/silicon/robot/drone/drone.dm | 1 + code/modules/mob/living/silicon/robot/robot.dm | 2 ++ code/modules/power/cell.dm | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 9d2af7af56..0fcdc10875 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -5,6 +5,7 @@ icon_state = "repairbot" maxHealth = 35 health = 35 + cell_emp_mult = 1 universal_speak = 0 universal_understand = 1 gender = NEUTER diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 3647352aab..fd324f2c6e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -50,6 +50,8 @@ var/list/robot_verbs_default = list( var/obj/item/weapon/cell/cell = null var/obj/machinery/camera/camera = null + var/cell_emp_mult = 2 + // Components are basically robot organs. var/list/components = list() diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 69f0b92a48..b919658bba 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -128,6 +128,11 @@ rigged = 1 //broken batterys are dangerous /obj/item/weapon/cell/emp_act(severity) + //remove this once emp changes on dev are merged in + if(isrobot(loc)) + var/mob/living/silicon/robot/R = loc + severity *= R.cell_emp_mult + charge -= maxcharge / severity if (charge < 0) charge = 0 From ceaa938b89b8f183da8705a6aa794a60840a3b5e Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 23 Mar 2015 02:47:05 -0400 Subject: [PATCH 2/4] EMP deals burn instead of brute to silicons, and bypasses robot armour --- code/modules/mob/living/living.dm | 2 +- .../mob/living/silicon/robot/drone/drone_damage.dm | 2 +- code/modules/mob/living/silicon/robot/robot_damage.dm | 11 ++++++----- code/modules/mob/living/silicon/silicon.dm | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 8995183db9..13bc98a0de 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -241,7 +241,7 @@ src.updatehealth() // damage ONE external organ, organ gets randomly selected from damaged ones. -/mob/living/proc/take_organ_damage(var/brute, var/burn) +/mob/living/proc/take_organ_damage(var/brute, var/burn, var/emp=0) if(status_flags & GODMODE) return 0 //godmode adjustBruteLoss(brute) adjustFireLoss(burn) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_damage.dm b/code/modules/mob/living/silicon/robot/drone/drone_damage.dm index 57ffc89887..37731dd345 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_damage.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_damage.dm @@ -11,7 +11,7 @@ if(bruteloss<0) bruteloss = 0 if(fireloss<0) fireloss = 0 -/mob/living/silicon/robot/drone/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0) +/mob/living/silicon/robot/drone/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/emp = 0) take_overall_damage(brute,burn) /mob/living/silicon/robot/drone/heal_organ_damage(var/brute, var/burn) diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm index e0ebe671f1..5b204a2d04 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -62,7 +62,7 @@ var/datum/robot_component/picked = pick(parts) picked.heal_damage(brute,burn) -/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/edge = 0) +/mob/living/silicon/robot/take_organ_damage(var/brute = 0, var/burn = 0, var/sharp = 0, var/edge = 0, var/emp = 0) var/list/components = get_damageable_components() if(!components.len) return @@ -84,10 +84,11 @@ burn -= absorb_burn src << "\red Your shield absorbs some of the impact!" - var/datum/robot_component/armour/A = get_armour() - if(A) - A.take_damage(brute,burn,sharp,edge) - return + if(!emp) + var/datum/robot_component/armour/A = get_armour() + if(A) + A.take_damage(brute,burn,sharp,edge) + return var/datum/robot_component/C = pick(components) C.take_damage(brute,burn,sharp,edge) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 466e984350..b504166697 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -56,10 +56,10 @@ /mob/living/silicon/emp_act(severity) switch(severity) if(1) - src.take_organ_damage(20) + src.take_organ_damage(0,20,emp=1) Stun(rand(5,10)) if(2) - src.take_organ_damage(10) + src.take_organ_damage(0,10,emp=1) Stun(rand(1,5)) flick("noise", src:flash) src << "\red *BZZZT*" From dc1f05a9da1d70cf1197454b0d3e97d7ef87e86d Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 23 Mar 2015 02:49:34 -0400 Subject: [PATCH 3/4] Tweaks rig emp effect, breach_threshold --- code/modules/clothing/spacesuits/rig/rig.dm | 2 +- code/modules/clothing/spacesuits/rig/rig_pieces.dm | 6 +++--- code/modules/clothing/spacesuits/rig/suits/light.dm | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index d003d64d59..f0de341cf6 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -720,7 +720,7 @@ else //Want this to be roughly independant of the number of modules, meaning that X emp hits will disable Y% of the suit's modules on average. //that way people designing hardsuits don't have to worry (as much) about how adding that extra module will affect emp resiliance by 'soaking' hits for other modules - chance = max(0, damage - emp_protection)*min(installed_modules.len/15, 1) + chance = 2*max(0, damage - emp_protection)*min(installed_modules.len/15, 1) if(!prob(chance)) return diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index 7f0291c038..294644f3cb 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -39,9 +39,9 @@ flags_inv = HIDEJUMPSUIT|HIDETAIL flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT slowdown = 0 - //will reach 10 breach damage after 18 laser carbine blasts, or 7 revolver hits. Completely immune to smg hits. - breach_threshold = 28 - resilience = 0.05 + //will reach 10 breach damage after 25 laser carbine blasts, 3 revolver hits, or ~1 PTR hit. Completely immune to smg or sts hits. + breach_threshold = 38 + resilience = 0.2 can_breach = 1 sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/suit.dmi',"Unathi" = 'icons/mob/species/unathi/suit.dmi') supporting_limbs = list() diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index 55442c0a02..e07aa90452 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -20,7 +20,6 @@ /obj/item/clothing/suit/space/rig/light name = "suit" breach_threshold = 18 //comparable to voidsuits - resilience = 0.2 /obj/item/clothing/gloves/rig/light name = "gloves" @@ -82,8 +81,7 @@ ..() /obj/item/clothing/suit/space/rig/light/ninja - breach_threshold = 28 //comparable to regular hardsuits - resilience = 0.05 + breach_threshold = 38 //comparable to regular hardsuits /obj/item/weapon/rig/light/stealth name = "stealth suit control module" From f8eb5ccb97b946a35aa8a35335b5a61d45607fd9 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 23 Mar 2015 13:04:39 -0400 Subject: [PATCH 4/4] indent fix --- code/modules/power/cell.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index b919658bba..55c78538d6 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -130,8 +130,8 @@ /obj/item/weapon/cell/emp_act(severity) //remove this once emp changes on dev are merged in if(isrobot(loc)) - var/mob/living/silicon/robot/R = loc - severity *= R.cell_emp_mult + var/mob/living/silicon/robot/R = loc + severity *= R.cell_emp_mult charge -= maxcharge / severity if (charge < 0)