mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Merge pull request #12307 from Fox-McCloud/light-replacer-fix
Fixes Double-Bonking Light Replacer
This commit is contained in:
@@ -110,7 +110,8 @@
|
||||
src.transfer_fingerprints_to(newlight)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light_construct/small
|
||||
name = "small light fixture frame"
|
||||
@@ -299,17 +300,15 @@
|
||||
// attack with item - insert light (if right type), otherwise try to break the light
|
||||
|
||||
/obj/machinery/light/attackby(obj/item/W, mob/living/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE) //does not call parent requires manual definition
|
||||
//Light replacer code
|
||||
if(istype(W, /obj/item/lightreplacer))
|
||||
var/obj/item/lightreplacer/LR = W
|
||||
LR.ReplaceLight(src, user)
|
||||
|
||||
// attempt to insert light
|
||||
if(istype(W, /obj/item/light))
|
||||
else if(istype(W, /obj/item/light))
|
||||
if(status != LIGHT_EMPTY)
|
||||
to_chat(user, "There is a [fitting] already inserted.")
|
||||
return
|
||||
else
|
||||
src.add_fingerprint(user)
|
||||
var/obj/item/light/L = W
|
||||
@@ -388,6 +387,8 @@
|
||||
do_sparks(3, 1, src)
|
||||
if(prob(75))
|
||||
electrocute_mob(user, get_area(src), src, rand(0.7, 1), TRUE)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
// returns whether this light has power
|
||||
@@ -681,8 +682,7 @@
|
||||
|
||||
// attack bulb/tube with object
|
||||
// if a syringe, can inject plasma to make it explode
|
||||
/obj/item/light/attackby(var/obj/item/I, var/mob/user, params)
|
||||
..()
|
||||
/obj/item/light/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/reagent_containers/syringe))
|
||||
var/obj/item/reagent_containers/syringe/S = I
|
||||
|
||||
@@ -697,8 +697,7 @@
|
||||
|
||||
S.reagents.clear_reagents()
|
||||
else
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
// called after an attack with a light item
|
||||
// shatter light, unless it was an attempt to put it in a light socket
|
||||
|
||||
Reference in New Issue
Block a user