diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 8b8b1edeb82..33921405659 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -144,9 +144,10 @@ var/const/enterloopsanity = 100 if(objects > enterloopsanity) break objects++ spawn(0) - A.HasProximity(thing, 1) - if ((thing && A) && (thing.flags & PROXMOVE)) - thing.HasProximity(A, 1) + if(A) //Runtime prevention + A.HasProximity(thing, 1) + if ((thing && A) && (thing.flags & PROXMOVE)) + thing.HasProximity(A, 1) return /turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 01da722636f..1c09c04c709 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -139,19 +139,6 @@ emp_act if(.) return return 0 -/mob/living/carbon/human/emp_act(severity) - for(var/obj/O in src) - if(!O) continue - O.emp_act(severity) - for(var/obj/item/organ/external/O in organs) - O.emp_act(severity) - for(var/obj/item/organ/I in O.internal_organs) - if(!(I.status & ORGAN_ROBOT)) - continue - I.emp_act(severity) - ..() - - //Returns 1 if the attack hit, 0 if it missed. /mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone) if(!I || !user) return 0 diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 2a60be14fdb..8b5f566d15f 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -97,6 +97,8 @@ else //Not stunned. src.stat = 0 + confused = max(0, confused - 1) + else //Dead. src.blinded = 1 src.stat = 2 diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index 9d9117b9330..da682c51953 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -1,6 +1,8 @@ /mob/living/silicon/robot/Login() ..() regenerate_icons() + update_hud() + show_laws(0) winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5") diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm index 5b204a2d04c..1b051e029f4 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -147,3 +147,7 @@ burn -= (picked.electronics_damage - burn_was) parts -= picked + +/mob/living/silicon/robot/emp_act(severity) + uneq_all() + ..() //Damage is handled at /silicon/ level. \ No newline at end of file diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 42d5c6e6f68..0d0a83b7d1a 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -63,13 +63,13 @@ switch(severity) if(1) src.take_organ_damage(0,20,emp=1) - Stun(rand(5,10)) + confused = (min(confused + 5, 30)) if(2) src.take_organ_damage(0,10,emp=1) - Stun(rand(1,5)) - flick("noise", src:flash) - src << "\red *BZZZT*" - src << "\red Warning: Electromagnetic pulse detected." + confused = (min(confused + 2, 30)) + flick("noise", src.flash) + src << "*BZZZT*" + src << "Warning: Electromagnetic pulse detected." ..() /mob/living/silicon/stun_effect_act(var/stun_amount, var/agony_amount) diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 8b0f22445cf..27f30e0b8b2 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -258,14 +258,10 @@ var/list/organ_cache = list() if(!(status & ORGAN_ROBOT)) return switch (severity) - if (1.0) - take_damage(20) - return - if (2.0) - take_damage(7) - return - if(3.0) - take_damage(3) + if (1) + take_damage(5) + if (2) + take_damage(2) /obj/item/organ/proc/removed(var/mob/living/user) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 6ac8386c238..8def5e7eefa 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -89,6 +89,15 @@ return ..() +/obj/item/organ/external/emp_act(severity) + if(!(status & ORGAN_ROBOT)) + return + switch (severity) + if (1) + take_damage(8) + if (2) + take_damage(4) + /obj/item/organ/external/attack_self(var/mob/user) if(!contents.len) return ..() diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 599dadc4a4b..ef73f3c031d 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -136,7 +136,7 @@ var/mob/living/silicon/robot/R = loc severity *= R.cell_emp_mult - charge -= maxcharge / severity + charge -= charge / severity if (charge < 0) charge = 0 ..() diff --git a/html/changelogs/Neerti-EMPtweaks.yml b/html/changelogs/Neerti-EMPtweaks.yml new file mode 100644 index 00000000000..995bae44dcb --- /dev/null +++ b/html/changelogs/Neerti-EMPtweaks.yml @@ -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 +################################# + +# Your name. +author: Neerti + +# 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: "EMP no longer hits twice on humans." + - tweak: "EMP drains powercells using the cell's current charge, and not the cell's maximum potential charge, to ensure two blasts do not completely disable a synthetic." + - tweak: "EMP hitting a prosthetic limb or organ will now do less damage." + - tweak: "EMP hitting a cyborg will no longer outright stun them. Instead, they gain the 'confused' status for a few moments, making movement difficult. In addition, their HUD gets staticy, and their modules are forced to be retracted. diff --git a/icons/mob/screen1_robot.dmi b/icons/mob/screen1_robot.dmi index 63f627ced46..3288b58c576 100644 Binary files a/icons/mob/screen1_robot.dmi and b/icons/mob/screen1_robot.dmi differ