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 c38036e6eab..48f81adc96d 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 @@ -252,6 +259,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) living_user.electrocute_act(shock_damage = 15, source = src, flags = SHOCK_KNOCKDOWN | SHOCK_NOGLOVES) . += span_notice("It could use a little more Sodium Chloride...") + 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 . @@ -496,6 +506,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) @@ -1026,6 +1043,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_ITEM_INTERACTION, 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(source, mob/living/user, obj/item/item, list/modifiers) + 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 6db38f80476..12b6aff39f6 100644 Binary files a/icons/obj/machines/engine/supermatter.dmi and b/icons/obj/machines/engine/supermatter.dmi differ