mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #11511 from Markolie/lighting
Make the lighting plane master respect client color and other lighting fixes
This commit is contained in:
@@ -688,8 +688,8 @@
|
||||
message += " (RESTRICTED)"
|
||||
to_chat(world, "[message]")
|
||||
|
||||
/client/proc/colour_transition(var/list/colour_to = null, var/time = 10) //Call this with no parameters to reset to default.
|
||||
animate(src, color=colour_to, time=time, easing=SINE_EASING)
|
||||
/client/proc/colour_transition(list/colour_to = null, time = 10) //Call this with no parameters to reset to default.
|
||||
animate(src, color = colour_to, time = time, easing = SINE_EASING)
|
||||
|
||||
/client/proc/on_varedit()
|
||||
var_edited = TRUE
|
||||
|
||||
@@ -256,16 +256,16 @@
|
||||
desc = "Somehow these seem even more out-of-date than normal sunglasses."
|
||||
actions_types = list(/datum/action/item_action/noir)
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/noir/attack_self()
|
||||
toggle_noir()
|
||||
/obj/item/clothing/glasses/sunglasses/noir/attack_self(mob/user)
|
||||
toggle_noir(user)
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/noir/item_action_slot_check(slot)
|
||||
if(slot == slot_glasses)
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/noir/proc/toggle_noir()
|
||||
/obj/item/clothing/glasses/sunglasses/noir/proc/toggle_noir(mob/user)
|
||||
color_view = color_view ? null : MATRIX_GREYSCALE //Toggles between null and grayscale, with null being the default option.
|
||||
usr.update_client_colour()
|
||||
user.update_client_colour()
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/yeah
|
||||
name = "agreeable glasses"
|
||||
|
||||
@@ -207,19 +207,26 @@
|
||||
/datum/action/innate/minedrone/toggle_meson_vision
|
||||
name = "Toggle Meson Vision"
|
||||
button_icon_state = "meson"
|
||||
var/sight_flags = SEE_TURFS
|
||||
var/lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
|
||||
/datum/action/innate/minedrone/toggle_meson_vision/Activate()
|
||||
var/mob/living/simple_animal/hostile/mining_drone/user = owner
|
||||
if(user.sight & SEE_TURFS)
|
||||
user.sight &= ~SEE_TURFS
|
||||
user.lighting_alpha = initial(user.lighting_alpha)
|
||||
var/mob/living/user = owner
|
||||
var/is_active = user.sight & SEE_TURFS
|
||||
|
||||
if(is_active)
|
||||
UnregisterSignal(user, COMSIG_MOB_UPDATE_SIGHT)
|
||||
user.update_sight()
|
||||
else
|
||||
user.sight |= SEE_TURFS
|
||||
user.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
RegisterSignal(user, COMSIG_MOB_UPDATE_SIGHT, .proc/update_user_sight)
|
||||
user.update_sight()
|
||||
|
||||
user.sync_lighting_plane_alpha()
|
||||
to_chat(user, "<span class='notice'>You toggle your meson vision [!is_active ? "on" : "off"].</span>")
|
||||
|
||||
to_chat(user, "<span class='notice'>You toggle your meson vision [(user.sight & SEE_TURFS) ? "on" : "off"].</span>")
|
||||
/datum/action/innate/minedrone/toggle_meson_vision/proc/update_user_sight(mob/living/user)
|
||||
user.sight |= sight_flags
|
||||
if(!isnull(lighting_alpha))
|
||||
user.lighting_alpha = min(user.lighting_alpha, lighting_alpha)
|
||||
|
||||
/datum/action/innate/minedrone/toggle_mode
|
||||
name = "Toggle Mode"
|
||||
|
||||
@@ -619,12 +619,14 @@
|
||||
|
||||
/datum/pai_software/flashlight/toggle(mob/living/silicon/pai/user)
|
||||
var/atom/movable/actual_location = istype(user.loc, /obj/item/paicard) ? user.loc : user
|
||||
if(user.flashlight_on)
|
||||
if(!user.flashlight_on)
|
||||
actual_location.set_light(2)
|
||||
user.card.set_light(2)
|
||||
return
|
||||
actual_location.set_light(2)
|
||||
user.card.set_light(0)
|
||||
else
|
||||
actual_location.set_light(0)
|
||||
user.card.set_light(0)
|
||||
|
||||
user.flashlight_on = !user.flashlight_on
|
||||
|
||||
/datum/pai_software/flashlight/is_active(mob/living/silicon/pai/user)
|
||||
return user.flashlight_on
|
||||
|
||||
Reference in New Issue
Block a user