mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Atmos Holofan Clearview (#80662)
## Vid https://github.com/tgstation/tgstation/assets/46101244/b322aac7-519f-4a55-8180-eb9a38b3abc7 ## About The Pull Request You can right-click the Atmos Holofan projector in-hand to make the holograms more transparent and unclickable Only lasts for 40 seconds if you don't toggle it off yourself ## Why It's Good For The Game Sometimes you want to pipe under the holofan or put a machine there, and it's frustrating having to alt-click the tile for every action since you can't see anything under the holofan ## Changelog 🆑 add: Atmos Holofan projectors can be right-clicked inhand to make their holograms more transparent /🆑
This commit is contained in:
@@ -66,15 +66,19 @@
|
||||
return .
|
||||
if(target_turf.is_blocked_turf(TRUE)) //don't try to sneak dense stuff on our tile during the wait.
|
||||
return .
|
||||
target_holosign = new holosign_type(get_turf(target), src)
|
||||
target_holosign.add_hiddenprint(user)
|
||||
if(color)
|
||||
target_holosign.color = color
|
||||
target_holosign = create_holosign(target, user)
|
||||
return .
|
||||
|
||||
/obj/item/holosign_creator/attack(mob/living/carbon/human/M, mob/user)
|
||||
return
|
||||
|
||||
/obj/item/holosign_creator/proc/create_holosign(atom/target, mob/user)
|
||||
var/atom/new_holosign = new holosign_type(get_turf(target), src)
|
||||
new_holosign.add_hiddenprint(user)
|
||||
if(color)
|
||||
new_holosign.color = color
|
||||
return new_holosign
|
||||
|
||||
/obj/item/holosign_creator/attack_self(mob/user)
|
||||
if(LAZYLEN(signs))
|
||||
for(var/obj/structure/holosign/hologram as anything in signs)
|
||||
@@ -126,6 +130,49 @@
|
||||
holosign_type = /obj/structure/holosign/barrier/atmos
|
||||
creation_time = 0
|
||||
max_signs = 6
|
||||
/// Clearview holograms don't catch clicks and are more transparent
|
||||
var/clearview = FALSE
|
||||
/// Timer for auto-turning off clearview
|
||||
var/clearview_timer
|
||||
|
||||
/obj/item/holosign_creator/atmos/Initialize(mapload)
|
||||
. = ..()
|
||||
register_context()
|
||||
|
||||
/obj/item/holosign_creator/atmos/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
. = ..()
|
||||
if(LAZYLEN(signs))
|
||||
context[SCREENTIP_CONTEXT_RMB] = "[clearview ? "Turn off" : "Temporarily activate"] clearview"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/item/holosign_creator/atmos/create_holosign(atom/target, mob/user)
|
||||
var/obj/structure/holosign/barrier/atmos/new_holosign = new holosign_type(get_turf(target), src)
|
||||
new_holosign.add_hiddenprint(user)
|
||||
if(color)
|
||||
new_holosign.color = color
|
||||
if(clearview)
|
||||
new_holosign.clearview_transparency()
|
||||
return new_holosign
|
||||
|
||||
/obj/item/holosign_creator/atmos/attack_self_secondary(mob/user, modifiers)
|
||||
if(clearview)
|
||||
reset_hologram_transparency()
|
||||
balloon_alert(user, "turned off clearview")
|
||||
return
|
||||
if(LAZYLEN(signs))
|
||||
for(var/obj/structure/holosign/barrier/atmos/hologram as anything in signs)
|
||||
hologram.clearview_transparency()
|
||||
clearview = TRUE
|
||||
balloon_alert(user, "turned on clearview")
|
||||
clearview_timer = addtimer(CALLBACK(src, PROC_REF(reset_hologram_transparency)), 40 SECONDS, TIMER_STOPPABLE)
|
||||
return ..()
|
||||
|
||||
/obj/item/holosign_creator/atmos/proc/reset_hologram_transparency()
|
||||
if(LAZYLEN(signs))
|
||||
for(var/obj/structure/holosign/barrier/atmos/hologram as anything in signs)
|
||||
hologram.reset_transparency()
|
||||
clearview = FALSE
|
||||
deltimer(clearview_timer)
|
||||
|
||||
/obj/item/holosign_creator/medical
|
||||
name = "\improper PENLITE barrier projector"
|
||||
|
||||
@@ -111,6 +111,20 @@
|
||||
rad_insulation = RAD_LIGHT_INSULATION
|
||||
resistance_flags = FIRE_PROOF | FREEZE_PROOF
|
||||
|
||||
/obj/structure/holosign/barrier/atmos/proc/clearview_transparency()
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
alpha = 25
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
var/turf/our_turf = get_turf(src)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, MUTATE_PLANE(GAME_PLANE, our_turf), dir)
|
||||
|
||||
/obj/structure/holosign/barrier/atmos/proc/reset_transparency()
|
||||
mouse_opacity = initial(mouse_opacity)
|
||||
alpha = initial(alpha)
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
var/turf/our_turf = get_turf(src)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, MUTATE_PLANE(GAME_PLANE, our_turf), dir, add_appearance_flags = RESET_ALPHA)
|
||||
|
||||
/obj/structure/holosign/barrier/atmos/sturdy
|
||||
name = "sturdy holofirelock"
|
||||
max_integrity = 150
|
||||
|
||||
Reference in New Issue
Block a user