EMP resistance items (#4995)

Adds cyborg heavy surge prevention module as an upgrade by robotics. It is expensive to make, requires a bit high tech, and can protect cyborg for 1-3 EMP pulses which is purely random when module is installed.

Adds IPC surge prevention module via antag uplink. The module comes in the form of modified red nanopaste that only interacts with IPCs. Like cyborg module it gives EMP protection for 1-3 pulses which is purely random by nanopaste. Can be used only once per paste. Cost for it is 14 telecrystals(idk if need to bump it higher, idea is that you can't buy two of them as traitor).

adds sprite for new nanopaste with surge module.

Cleans up some code in files I worked on.

Fixes bug where destroyed cyborg components would vanish. Fixes #5000
This commit is contained in:
Mykhailo Bykhovtsev
2018-08-04 21:14:32 +03:00
committed by Erki
parent 4065e29e86
commit dd4efb5a27
13 changed files with 178 additions and 13 deletions
+19
View File
@@ -82,6 +82,25 @@
owner.Paralyse(emp_counter/6)
owner << "<span class='danger'>%#/ERR: Power leak detected!$%^/</span>"
/obj/item/organ/surge
name = "surge preventor"
desc = "A small device that give immunity to EMP for few pulses."
icon = 'icons/obj/robot_component.dmi'
icon_state = "surge_ipc"
organ_tag = "surge"
parent_organ = "chest"
vital = 0
var/surge_left = 0
var/broken = 0
/obj/item/organ/surge/Initialize()
if(!surge_left && !broken)
surge_left = rand(1, 3)
robotize()
. = ..()
/obj/item/organ/eyes/optical_sensor
name = "optical sensor"
singular_name = "optical sensor"