Merge pull request #7041 from Citadel-Station-13/upstream-merge-38211
[MIRROR] Fix meson goggles and lantern wisps conflicting
This commit is contained in:
@@ -266,26 +266,29 @@
|
||||
/obj/item/wisp_lantern/attack_self(mob/user)
|
||||
if(!wisp)
|
||||
to_chat(user, "<span class='warning'>The wisp has gone missing!</span>")
|
||||
icon_state = "lantern"
|
||||
return
|
||||
|
||||
if(wisp.loc == src)
|
||||
to_chat(user, "<span class='notice'>You release the wisp. It begins to bob around your head.</span>")
|
||||
user.sight |= SEE_MOBS
|
||||
icon_state = "lantern"
|
||||
wisp.orbit(user, 20)
|
||||
user.update_sight()
|
||||
SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Freed")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You return the wisp to the lantern.</span>")
|
||||
|
||||
var/mob/target
|
||||
if(wisp.orbiting)
|
||||
var/atom/A = wisp.orbiting.orbiting
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
M.sight &= ~SEE_MOBS
|
||||
to_chat(M, "<span class='notice'>Your vision returns to normal.</span>")
|
||||
|
||||
target = wisp.orbiting.orbiting
|
||||
wisp.stop_orbit()
|
||||
wisp.forceMove(src)
|
||||
|
||||
if (istype(target))
|
||||
target.update_sight()
|
||||
to_chat(target, "<span class='notice'>Your vision returns to normal.</span>")
|
||||
|
||||
icon_state = "lantern-blue"
|
||||
SSblackbox.record_feedback("tally", "wisp_lantern", 1, "Returned")
|
||||
|
||||
@@ -308,6 +311,8 @@
|
||||
icon_state = "orb"
|
||||
light_range = 7
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
var/sight_flags = SEE_MOBS
|
||||
var/lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
|
||||
//Red/Blue Cubes
|
||||
/obj/item/warp_cube
|
||||
|
||||
@@ -842,6 +842,14 @@
|
||||
return
|
||||
|
||||
/mob/proc/update_sight()
|
||||
for(var/O in orbiters)
|
||||
var/datum/orbit/orbit = O
|
||||
var/obj/effect/wisp/wisp = orbit.orbiter
|
||||
if (istype(wisp))
|
||||
sight |= wisp.sight_flags
|
||||
if(!isnull(wisp.lighting_alpha))
|
||||
lighting_alpha = min(lighting_alpha, wisp.lighting_alpha)
|
||||
|
||||
sync_lighting_plane_alpha()
|
||||
|
||||
/mob/proc/sync_lighting_plane_alpha()
|
||||
|
||||
Reference in New Issue
Block a user