mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-17 10:05:27 +01:00
Generalizes emp energy weapon drain to power cells
This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
rigged = 1 //broken batterys are dangerous
|
||||
|
||||
/obj/item/weapon/cell/emp_act(severity)
|
||||
charge -= 1000 / severity
|
||||
charge -= maxcharge / severity
|
||||
if (charge < 0)
|
||||
charge = 0
|
||||
if(reliability != 100 && prob(50/severity))
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
/obj/item/weapon/gun/launcher/spikethrower/update_icon()
|
||||
icon_state = "spikethrower[spikes]"
|
||||
|
||||
/obj/item/weapon/gun/launcher/spikethrower/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/launcher/spikethrower/special_check(user)
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
@@ -19,9 +19,8 @@
|
||||
var/charge_tick = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/emp_act(severity)
|
||||
power_supply.use(round(power_supply.maxcharge / severity))
|
||||
update_icon()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/New()
|
||||
..()
|
||||
|
||||
@@ -62,10 +62,6 @@
|
||||
var/obj/item/weapon/cell/cell = null // Used for firing superheated rods.
|
||||
var/current_user // Used to check if the crossbow has changed hands since being drawn.
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/emp_act(severity)
|
||||
if(cell && severity)
|
||||
cell.use(100*severity)
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/update_release_force()
|
||||
release_force = tension*release_speed
|
||||
|
||||
@@ -148,8 +144,8 @@
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(!cell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
cell.loc = src
|
||||
user << "<span class='notice'>You jam [cell] into [src] and wire it to the firing coil.</span>"
|
||||
superheat_rod(user)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user