mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Adds the can_charge var to energy guns
If set to 0, makes it so the gun cannot be charged in recharges. Set to 1 by default, only the nuclear (AKA advanced) egun and both plasma cutters have it set to 0. (Nuclear egun was previously unable to be charged, but used an istype check specific to it.)
This commit is contained in:
@@ -29,14 +29,18 @@
|
||||
user << "\red The [name] blinks red as you try to insert the item!"
|
||||
return
|
||||
|
||||
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear))
|
||||
user << "<span class='notice'>Your gun's recharge port was removed to make room for a miniaturized reactor.</span>"
|
||||
return
|
||||
if (istype(G, /obj/item/weapon/gun/energy))
|
||||
var/obj/item/weapon/gun/energy/E = G
|
||||
if(!E.can_charge)
|
||||
user << "<span class='notice'>Your gun has no external power connector.</span>"
|
||||
return
|
||||
|
||||
if(istype(G, /obj/item/device/laptop))
|
||||
var/obj/item/device/laptop/L = G
|
||||
if(!L.stored_computer.battery)
|
||||
user << "There's no battery in it!"
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
charging = G
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/cell_type = "/obj/item/weapon/stock_parts/cell"
|
||||
var/projectile_type = "/obj/item/projectile/beam"
|
||||
var/modifystate
|
||||
var/can_charge = 1
|
||||
|
||||
emp_act(severity)
|
||||
power_supply.use(round(power_supply.charge / severity))
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
var/lightfail = 0
|
||||
var/charge_tick = 0
|
||||
can_flashlight = 0
|
||||
can_charge = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -307,6 +307,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
charge_cost = 250
|
||||
fire_delay = 10
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
can_charge = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/examine(mob/user)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user