Deconflict

This commit is contained in:
variableundefined
2019-09-11 23:00:13 -04:00
122 changed files with 1161 additions and 846 deletions
@@ -79,7 +79,7 @@
holds_charge = TRUE
unique_frequency = TRUE
/obj/item/gun/energy/kinetic_accelerator/New()
/obj/item/gun/energy/kinetic_accelerator/Initialize(mapload)
. = ..()
if(!holds_charge)
empty()
@@ -98,8 +98,7 @@
if(!QDELING(src) && !holds_charge)
// Put it on a delay because moving item from slot to hand
// calls dropped().
spawn(2)
empty_if_not_held()
addtimer(CALLBACK(src, .proc/empty_if_not_held), 2)
/obj/item/gun/energy/kinetic_accelerator/proc/empty_if_not_held()
if(!ismob(loc))
@@ -143,17 +142,17 @@
overheat = FALSE
/obj/item/gun/energy/kinetic_accelerator/update_icon()
overlays.Cut()
cut_overlays()
if(empty_state && !can_shoot())
overlays += empty_state
add_overlay(empty_state)
if(gun_light && can_flashlight)
var/iconF = "flight"
if(gun_light.on)
iconF = "flight_on"
overlays += image(icon = icon, icon_state = iconF, pixel_x = flight_x_offset, pixel_y = flight_y_offset)
add_overlay(image(icon = icon, icon_state = iconF, pixel_x = flight_x_offset, pixel_y = flight_y_offset))
if(bayonet && can_bayonet)
overlays += knife_overlay
add_overlay(knife_overlay)
/obj/item/gun/energy/kinetic_accelerator/experimental
@@ -165,12 +165,18 @@
/obj/item/gun/energy/plasmacutter/attackby(obj/item/A, mob/user)
if(istype(A, /obj/item/stack/sheet/mineral/plasma))
if(power_supply.charge >= power_supply.maxcharge)
to_chat(user,"<span class='notice'>[src] is already fully charged.")
return
var/obj/item/stack/sheet/S = A
S.use(1)
power_supply.give(1000)
on_recharge()
to_chat(user, "<span class='notice'>You insert [A] in [src], recharging it.</span>")
else if(istype(A, /obj/item/stack/ore/plasma))
if(power_supply.charge >= power_supply.maxcharge)
to_chat(user,"<span class='notice'>[src] is already fully charged.")
return
var/obj/item/stack/ore/S = A
S.use(1)
power_supply.give(500)