[EARLY MIRROR] Holiday Supermatter (#842)

## About The Pull Request

Early mirror of improved upstream Christmas SM.
https://github.com/tgstation/tgstation/pull/80254
Removes the modular override.

Thanks to @Majkl-J for the original concept.


![dreamseeker_OR0HVPqRxF](https://github.com/Bubberstation/Bubberstation/assets/83487515/b391dc89-d4c3-461e-9697-d931458d7a77)

## Changelog

None required, it'll create a duplicate when the mirror makes it through
someday
This commit is contained in:
lessthanthree
2023-12-14 16:25:15 -05:00
committed by GitHub
parent 7596a403aa
commit d2df1e09b5
6 changed files with 47 additions and 22 deletions
+6
View File
@@ -103,6 +103,12 @@
/obj/effect/countdown/supermatter
name = "supermatter damage"
color = "#00ff80"
pixel_y = 8
/obj/effect/countdown/supermatter/attach(atom/A)
. = ..()
if(istype(A, /obj/machinery/power/supermatter_crystal/shard))
pixel_y = -12
/obj/effect/countdown/supermatter/get_value()
var/obj/machinery/power/supermatter_crystal/S = attached_to
@@ -177,6 +177,10 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/// If a sliver of the supermatter has been removed. Almost certainly by a traitor. Lowers the delamination countdown time.
var/supermatter_sliver_removed = FALSE
/// If the SM is decorated with holiday lights
var/holiday_lights = FALSE
/// Cooldown for sending emergency alerts to the common radio channel
COOLDOWN_DECLARE(common_radio_cooldown)
@@ -212,6 +216,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
AddComponent(/datum/component/supermatter_crystal, CALLBACK(src, PROC_REF(wrench_act_callback)), CALLBACK(src, PROC_REF(consume_callback)))
soundloop = new(src, TRUE)
if(!isnull(check_holidays(FESTIVE_SEASON)))
holiday_lights()
if (!moveable)
move_resist = MOVE_FORCE_OVERPOWERING // Avoid being moved by statues or other memes
@@ -245,6 +252,10 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/immune = HAS_MIND_TRAIT(user, TRAIT_MADNESS_IMMUNE)
if(isliving(user) && !immune && (get_dist(user, src) < SM_HALLUCINATION_RANGE(internal_energy)))
. += span_danger("You get headaches just from looking at it.")
if(holiday_lights)
. += span_notice("Radiating both festive cheer and actual radiation, it has a dazzling spectacle lights wrapped lovingly around the base transforming it from a potential doomsday device into a cosmic yuletide centerpiece.")
. += delamination_strategy.examine(src)
return .
@@ -489,6 +500,13 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
. += mutable_appearance(icon = icon, icon_state = "[base_icon_state]-psy", layer = FLOAT_LAYER - 1, alpha = psy_coeff * 255)
if(delamination_strategy)
. += delamination_strategy.overlays(src)
if(holiday_lights)
if(istype(src, /obj/machinery/power/supermatter_crystal/shard))
. += mutable_appearance(icon, "holiday_lights_shard")
. += emissive_appearance(icon, "holiday_lights_shard_e", src, alpha = src.alpha)
else
. += mutable_appearance(icon, "holiday_lights")
. += emissive_appearance(icon, "holiday_lights_e", src, alpha = src.alpha)
return .
/obj/machinery/power/supermatter_crystal/update_icon(updates)
@@ -1019,6 +1037,29 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
COOLDOWN_START(src, common_radio_cooldown, SUPERMATTER_COMMON_RADIO_DELAY)
return TRUE
/obj/machinery/power/supermatter_crystal/proc/holiday_lights()
holiday_lights = TRUE
RegisterSignal(src, COMSIG_ATOM_ATTACKBY, PROC_REF(holiday_item_interaction))
update_appearance()
/// Consume the santa hat and add it as an overlay
/obj/machinery/power/supermatter_crystal/proc/holiday_item_interaction(datum/source, obj/item/item, mob/living/user)
SIGNAL_HANDLER
if(istype(item, /obj/item/clothing/head/costume/santa) || istype(item, /obj/item/clothing/head/costume/skyrat/christmas)) // SKYRAT EDIT CHANGE - Loadouts
QDEL_NULL(item)
RegisterSignal(src, COMSIG_ATOM_EXAMINE, PROC_REF(holiday_hat_examine))
if(istype(src, /obj/machinery/power/supermatter_crystal/shard))
add_overlay(mutable_appearance(icon, "santa_hat_shard"))
else
add_overlay(mutable_appearance(icon, "santa_hat"))
return COMPONENT_CANCEL_ATTACK_CHAIN
return NONE
/// Adds the hat flavor text when examined
/obj/machinery/power/supermatter_crystal/proc/holiday_hat_examine(atom/source, mob/user, list/examine_list)
SIGNAL_HANDLER
examine_list += span_info("There's a santa hat placed atop it. How it got there without being dusted is a mystery.")
#undef BIKE
#undef COIL
#undef ROD
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@@ -1,21 +0,0 @@
/obj/machinery/power/supermatter_crystal/Initialize(mapload)
. = ..()
if(check_holidays(FESTIVE_SEASON) && (type == /obj/machinery/power/supermatter_crystal || type == /obj/machinery/power/supermatter_crystal/engine))
christmasify()
/obj/machinery/power/supermatter_crystal/proc/christmasify()
name = "Smassmatter crystal"
desc += "\nThis one seems to be decorated with Christmas lights"
add_overlay(image('modular_zubbers/modules/seasons/christmas/icons/supermatter.dmi', "sm-overlay-christmas-lights"))
RegisterSignal(src, COMSIG_ATOM_ATTACKBY, PROC_REF(christmasify_attackby))
/obj/machinery/power/supermatter_crystal/proc/christmasify_attackby(datum/source, obj/item/item, mob/living/user)
SIGNAL_HANDLER
if(istype(item, /obj/item/clothing/head/costume/skyrat/christmas))
balloon_alert(user, "Placed hat.")
QDEL_NULL(item)
add_overlay(image('modular_zubbers/modules/seasons/christmas/icons/supermatter.dmi', "sm-overlay-christmas-hat"))
desc += "\n\nThere's a Christmas hat placed atop it. How it got there and why it didn't dust yet is a mystery"
update_overlays()
return COMPONENT_CANCEL_ATTACK_CHAIN
return FALSE
Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

-1
View File
@@ -8224,7 +8224,6 @@
#include "modular_zubbers\modules\modular_weapons\code\company_and_or_faction_based\carwo_defense_systems\ammo\pistol.dm"
#include "modular_zubbers\modules\modular_weapons\code\company_and_or_faction_based\carwo_defense_systems\ammo\rifle.dm"
#include "modular_zubbers\modules\modular_weapons\code\company_and_or_faction_based\trappiste_fabriek\ammo.dm"
#include "modular_zubbers\modules\seasons\christmas\code\supermatter.dm"
#include "modular_zubbers\modules\vetted\examine.dm"
#include "modular_zubbers\modules\vetted\vetted.dm"
// END_INCLUDE