mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Fixes #8485
This commit is contained in:
@@ -688,27 +688,28 @@
|
||||
|
||||
//Todo
|
||||
/obj/item/weapon/rig/proc/malfunction()
|
||||
return 0
|
||||
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rig/emp_act(severity_class)
|
||||
//set malfunctioning
|
||||
if(emp_protection < 30) //for ninjas, really.
|
||||
malfunctioning += 10
|
||||
if(malfunction_delay <= 0)
|
||||
malfunction_delay = max(malfunction_delay, round(30/severity_class))
|
||||
|
||||
malfunction_delay = max(malfunction_delay, round(30/severity_class))
|
||||
|
||||
//drain some charge
|
||||
if(cell) cell.emp_act(severity_class + 15)
|
||||
|
||||
|
||||
//possibly damage some modules
|
||||
take_hit((100/severity_class), "electrical pulse", 1)
|
||||
take_hit((100/severity_class), "electrical pulse", 1)
|
||||
|
||||
/obj/item/weapon/rig/proc/shock(mob/user)
|
||||
if (electrocute_mob(user, cell, src))
|
||||
spark_system.start()
|
||||
return 1
|
||||
if(user.stunned)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/rig/proc/take_hit(damage, source, is_emp=0)
|
||||
|
||||
if(!installed_modules.len)
|
||||
@@ -740,7 +741,7 @@
|
||||
dam_module = pick(damaged_modules)
|
||||
else if(valid_modules.len)
|
||||
dam_module = pick(valid_modules)
|
||||
|
||||
|
||||
if(!dam_module) return
|
||||
|
||||
dam_module.damage++
|
||||
@@ -748,11 +749,11 @@
|
||||
if(!source)
|
||||
source = "hit"
|
||||
|
||||
if(wearer)
|
||||
if(wearer)
|
||||
if(dam_module.damage >= 2)
|
||||
wearer << "<span class='danger'>The [source] has disabled your [dam_module.interface_name]!"
|
||||
else
|
||||
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
|
||||
wearer << "<span class='warning'>The [source] has damaged your [dam_module.interface_name]!"
|
||||
dam_module.deactivate()
|
||||
|
||||
/obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user)
|
||||
|
||||
@@ -535,7 +535,8 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
if(user.stunned)
|
||||
return
|
||||
C.use(10)
|
||||
user.visible_message(\
|
||||
"<span class='warning'>[user.name] has added cables to the APC frame!</span>",\
|
||||
@@ -555,7 +556,8 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
if(usr.stunned)
|
||||
return
|
||||
new /obj/item/stack/cable_coil(loc,10)
|
||||
user << "<span class='notice'>You cut the cables and dismantle the power terminal.</span>"
|
||||
del(terminal) // qdel
|
||||
|
||||
@@ -193,9 +193,9 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
if(usr.stunned)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//explosion handling
|
||||
/obj/structure/cable/ex_act(severity)
|
||||
|
||||
@@ -275,7 +275,8 @@
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
building_terminal = 0
|
||||
return 0
|
||||
if(usr.stunned)
|
||||
return 0
|
||||
new /obj/item/stack/cable_coil(loc,10)
|
||||
user.visible_message(\
|
||||
"<span class='notice'>[user.name] cut the cables and dismantled the power terminal.</span>",\
|
||||
|
||||
Reference in New Issue
Block a user