diff --git a/code/game/objects/effects/countdown.dm b/code/game/objects/effects/countdown.dm index 1c7377bd50a..ab422dda3d1 100644 --- a/code/game/objects/effects/countdown.dm +++ b/code/game/objects/effects/countdown.dm @@ -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 diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 580d2a66f96..bbf320a999f 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -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 diff --git a/icons/obj/machines/engine/supermatter.dmi b/icons/obj/machines/engine/supermatter.dmi index 874773ef085..12b6aff39f6 100644 Binary files a/icons/obj/machines/engine/supermatter.dmi and b/icons/obj/machines/engine/supermatter.dmi differ diff --git a/modular_zubbers/modules/seasons/christmas/code/supermatter.dm b/modular_zubbers/modules/seasons/christmas/code/supermatter.dm deleted file mode 100644 index b18279db75d..00000000000 --- a/modular_zubbers/modules/seasons/christmas/code/supermatter.dm +++ /dev/null @@ -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 diff --git a/modular_zubbers/modules/seasons/christmas/icons/supermatter.dmi b/modular_zubbers/modules/seasons/christmas/icons/supermatter.dmi deleted file mode 100644 index 19daa46acad..00000000000 Binary files a/modular_zubbers/modules/seasons/christmas/icons/supermatter.dmi and /dev/null differ diff --git a/tgstation.dme b/tgstation.dme index 8b21d5d8061..3b77cfcf347 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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