Rave and plasma stabilizer MODules now utilize theme-specific visors (#88369)

## About The Pull Request

Rave and plasma stabilizer MODules now use per-theme visors so they no
longer look like an ugly blob (because their sprite only works with the
"standard" MODsuit theme)


![dreamseeker_gav0TXaQOF](https://github.com/user-attachments/assets/15f5a7e5-eb6e-4d03-b2fd-40181d199a78)

Armor booster modules use a signal to change the visor when they're
activated

## Why It's Good For The Game

Currently they use the base helmet visor sprite which doesn't look very
good on non-standard MODsuits

## Changelog
🆑
add: Rave and plasma stabilizer MODules now utilize theme-specific
visors
/🆑
This commit is contained in:
SmArtKar
2024-12-15 13:15:37 +00:00
committed by GitHub
parent 1fff1f42d1
commit d4d106c97d
7 changed files with 33 additions and 8 deletions
+7
View File
@@ -771,3 +771,10 @@
mod_link.end_call()
mod_link.frequency = null
/obj/item/mod/control/proc/get_visor_overlay(mutable_appearance/standing)
var/list/overrides = list()
SEND_SIGNAL(src, COMSIG_MOD_GET_VISOR_OVERLAY, standing, overrides)
if (length(overrides))
return overrides[1]
return mutable_appearance(worn_icon, "[skin]-helmet-visor", layer = standing.layer + 0.1)
+11
View File
@@ -102,6 +102,17 @@
else
REMOVE_TRAIT(mod.wearer, TRAIT_HEAD_INJURY_BLOCKED, REF(src))
/obj/item/mod/module/armor_booster/on_install()
RegisterSignal(mod, COMSIG_MOD_GET_VISOR_OVERLAY, PROC_REF(on_visor_overlay))
/obj/item/mod/module/armor_booster/on_uninstall(deleting)
UnregisterSignal(mod, COMSIG_MOD_GET_VISOR_OVERLAY)
/obj/item/mod/module/armor_booster/proc/on_visor_overlay(datum/source, mutable_appearance/standing, list/overrides)
SIGNAL_HANDLER
if (active)
overrides += mutable_appearance(overlay_icon_file, "module_armorbooster_visor-[mod.skin]", layer = standing.layer + 0.1)
///Energy Shield - Gives you a rechargeable energy shield that nullifies attacks.
/obj/item/mod/module/energy_shield
name = "MOD energy shield module"
+6 -4
View File
@@ -664,13 +664,15 @@
complexity = 1
idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3
incompatible_modules = list(/obj/item/mod/module/plasma_stabilizer)
overlay_state_inactive = "module_plasma"
required_slots = list(ITEM_SLOT_HEAD)
/obj/item/mod/module/plasma_stabilizer/generate_worn_overlay()
if(locate(/obj/item/mod/module/infiltrator) in mod.modules)
/obj/item/mod/module/plasma_stabilizer/generate_worn_overlay(mutable_appearance/standing)
if (!active)
return list()
return ..()
var/mutable_appearance/visor_overlay = mod.get_visor_overlay(standing)
visor_overlay.appearance_flags |= RESET_COLOR
visor_overlay.color = COLOR_VOID_PURPLE
return list(visor_overlay)
/obj/item/mod/module/plasma_stabilizer/on_equip()
ADD_TRAIT(mod.wearer, TRAIT_HEAD_ATMOS_SEALED, REF(src))
+7 -4
View File
@@ -87,7 +87,6 @@
desc = "A Super Cool Awesome Visor (SCAV), intended for modular suits."
icon_state = "rave_visor"
complexity = 1
overlay_state_inactive = "module_rave"
required_slots = list(ITEM_SLOT_HEAD|ITEM_SLOT_MASK)
/// The client colors applied to the wearer.
var/datum/client_colour/rave_screen
@@ -132,9 +131,13 @@
SEND_SOUND(mod.wearer, sound('sound/machines/terminal/terminal_off.ogg', volume = 50, channel = CHANNEL_JUKEBOX))
/obj/item/mod/module/visor/rave/generate_worn_overlay(mutable_appearance/standing)
. = ..()
for(var/mutable_appearance/appearance as anything in .)
appearance.color = isnull(music_player.active_song_sound) ? null : rainbow_order[rave_number]
if (!active)
return list()
var/mutable_appearance/visor_overlay = mod.get_visor_overlay(standing)
visor_overlay.appearance_flags |= RESET_COLOR
if (!isnull(music_player.active_song_sound))
visor_overlay.color = rainbow_order[rave_number]
return list(visor_overlay)
/obj/item/mod/module/visor/rave/on_active_process(seconds_per_tick)
rave_number++