From 3a22f09c5eab9f79ef36c26ac9aa2edda9ce6af6 Mon Sep 17 00:00:00 2001 From: Llywelwyn <82828093+Llywelwyn@users.noreply.github.com> Date: Sat, 3 Jun 2023 10:06:00 +0100 Subject: [PATCH] Overmap events now respect their opacity settings, rather than all hazards being opaque (#16428) * sensors bugfix + standardisation standardises datums and events so they default to 0 opacity and require events to be set explicitly if opaque, instead of events working one way and the datums the other. also fixes the sensor ping from setting every event to opaque every time it scans * cl * fixes events going transparent by toggling sensors on and off * better solution - doesn't leave blocked vision on overmap when toggling toggling sensors doesn't leave opaque tiles on the overmap doing it like this * just rewording cl, no code change here --- code/modules/overmap/contacts/_contacts.dm | 2 +- code/modules/overmap/events/event.dm | 16 ++++----- html/changelogs/llywelwyn-sensors fix.yml | 41 ++++++++++++++++++++++ 3 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 html/changelogs/llywelwyn-sensors fix.yml diff --git a/code/modules/overmap/contacts/_contacts.dm b/code/modules/overmap/contacts/_contacts.dm index 8cc6ef68546..395050738ff 100644 --- a/code/modules/overmap/contacts/_contacts.dm +++ b/code/modules/overmap/contacts/_contacts.dm @@ -74,7 +74,7 @@ if(pinged) return pinged = TRUE - effect.opacity = 1 + effect.opacity = initial(effect.opacity) show() animate(marker, alpha=255, 0.5 SECOND, 1, LINEAR_EASING) addtimer(CALLBACK(src, PROC_REF(unping)), 1 SECOND) diff --git a/code/modules/overmap/events/event.dm b/code/modules/overmap/events/event.dm index c95727482b7..20367e1fada 100644 --- a/code/modules/overmap/events/event.dm +++ b/code/modules/overmap/events/event.dm @@ -260,13 +260,13 @@ /obj/effect/overmap/event/meteor name = "asteroid field" events = list(/datum/event/meteor_wave/overmap) + opacity = 1 event_icon_states = list("meteor1", "meteor2", "meteor3", "meteor4") difficulty = EVENT_LEVEL_MAJOR /obj/effect/overmap/event/electric name = "electrical storm" events = list(/datum/event/electrical_storm) - opacity = 0 event_icon_states = list("electrical1", "electrical2") difficulty = EVENT_LEVEL_MAJOR can_be_destroyed = FALSE @@ -274,13 +274,13 @@ /obj/effect/overmap/event/dust name = "dust cloud" events = list(/datum/event/meteor_wave/dust/overmap) + opacity = 1 event_icon_states = list("dust1", "dust2", "dust3", "dust4") can_be_destroyed = FALSE /obj/effect/overmap/event/ion name = "ion cloud" events = list(/datum/event/ionstorm) - opacity = 0 event_icon_states = list("ion1", "ion2", "ion3", "ion4") difficulty = EVENT_LEVEL_MAJOR can_be_destroyed = FALSE @@ -288,19 +288,18 @@ /obj/effect/overmap/event/carp name = "carp shoal" events = list(/datum/event/carp_migration/overmap) - opacity = 0 difficulty = EVENT_LEVEL_MODERATE event_icon_states = list("carp") movable_event_chance = 5 /obj/effect/overmap/event/carp/major name = "carp school" + opacity = 1 difficulty = EVENT_LEVEL_MAJOR /obj/effect/overmap/event/gravity name = "dark matter influx" events = list(/datum/event/gravity) - opacity = 0 can_be_destroyed = FALSE //These now are basically only used to spawn hazards. Will be useful when we need to spawn group of moving hazards @@ -309,13 +308,14 @@ var/radius = 2 var/count = 6 var/hazards - var/opacity = 1 + var/opacity = 0 var/continuous = TRUE //if it should form continous blob, or can have gaps /datum/overmap_event/meteor name = "asteroid field" count = 15 radius = 4 + opacity = 1 continuous = FALSE hazards = /obj/effect/overmap/event/meteor @@ -323,27 +323,25 @@ name = "electrical storm" count = 11 radius = 3 - opacity = 0 hazards = /obj/effect/overmap/event/electric /datum/overmap_event/dust name = "dust cloud" count = 16 radius = 4 + opacity = 1 hazards = /obj/effect/overmap/event/dust /datum/overmap_event/ion name = "ion cloud" count = 8 radius = 3 - opacity = 0 hazards = /obj/effect/overmap/event/ion /datum/overmap_event/carp name = "carp shoal" count = 8 radius = 3 - opacity = 0 continuous = FALSE hazards = /obj/effect/overmap/event/carp @@ -351,11 +349,11 @@ name = "carp school" count = 5 radius = 4 + opacity = 1 hazards = /obj/effect/overmap/event/carp/major /datum/overmap_event/gravity name = "dark matter influx" count = 12 radius = 4 - opacity = 0 hazards = /obj/effect/overmap/event/gravity diff --git a/html/changelogs/llywelwyn-sensors fix.yml b/html/changelogs/llywelwyn-sensors fix.yml new file mode 100644 index 00000000000..0d65d8ed903 --- /dev/null +++ b/html/changelogs/llywelwyn-sensors fix.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Llywelwyn + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Overmap events now respect their opacity settings, rather than all hazards being opaque. Now only asteroids, dust clouds, and large carp schools block vision, as intended."