diff --git a/code/datums/greyscale/config_types/greyscale_configs.dm b/code/datums/greyscale/config_types/greyscale_configs.dm index f044285b19b..752db0d6062 100644 --- a/code/datums/greyscale/config_types/greyscale_configs.dm +++ b/code/datums/greyscale/config_types/greyscale_configs.dm @@ -985,3 +985,8 @@ name = "Quantum Keycard" icon_file = 'icons/obj/device.dmi' json_config = 'code/datums/greyscale/json_configs/quantum_keycard.json' + +/datum/greyscale_config/heretic_rune + name = "Transmutation Rune" + icon_file = 'icons/effects/96x96.dmi' + json_config = 'code/datums/greyscale/json_configs/heretic_rune.json' diff --git a/code/datums/greyscale/json_configs/heretic_rune.json b/code/datums/greyscale/json_configs/heretic_rune.json new file mode 100644 index 00000000000..b9d349ef40f --- /dev/null +++ b/code/datums/greyscale/json_configs/heretic_rune.json @@ -0,0 +1,62 @@ +{ + "transmutation_rune": [ + { + "type": "icon_state", + "icon_state": "transmutation_rune", + "blend_mode": "overlay", + "color_ids": [ 1 ] + } + ], + "transmutation_rune_active": [ + { + "type": "icon_state", + "icon_state": "transmutation_rune_activate_colour", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "transmutation_rune_activate_white", + "blend_mode": "overlay" + } + ], + "transmutation_rune_draw": [ + { + "type": "icon_state", + "icon_state": "transmutation_rune_draw_colour", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "transmutation_rune_draw_white", + "blend_mode": "overlay" + } + ], + "transmutation_rune_fast": [ + { + "type": "icon_state", + "icon_state": "transmutation_rune_fast_colour", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "transmutation_rune_fast_white", + "blend_mode": "overlay" + } + ], + "transmutation_rune_fail": [ + { + "type": "icon_state", + "icon_state": "transmutation_rune_fail_colour", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "transmutation_rune_fail_white", + "blend_mode": "overlay" + } + ] +} diff --git a/code/modules/antagonists/heretic/heretic_antag.dm b/code/modules/antagonists/heretic/heretic_antag.dm index 7fca29460b1..3dbc9f502d1 100644 --- a/code/modules/antagonists/heretic/heretic_antag.dm +++ b/code/modules/antagonists/heretic/heretic_antag.dm @@ -59,6 +59,14 @@ PATH_VOID = "blue", PATH_BLADE = "label", // my favorite color is label ) + var/static/list/path_to_rune_color = list( + PATH_START = COLOR_LIME, + PATH_RUST = COLOR_CARGO_BROWN, + PATH_FLESH = COLOR_SOFT_RED, + PATH_ASH = COLOR_VIVID_RED, + PATH_VOID = COLOR_CYAN, + PATH_BLADE = COLOR_SILVER + ) /datum/antagonist/heretic/Destroy() LAZYNULL(sac_targets) @@ -308,14 +316,24 @@ /datum/antagonist/heretic/proc/draw_rune(mob/living/user, turf/target_turf, drawing_time = 30 SECONDS, additional_checks) drawing_rune = TRUE + var/rune_colour = path_to_rune_color[heretic_path] target_turf.balloon_alert(user, "drawing rune...") + var/obj/effect/temp_visual/drawing_heretic_rune/drawing_effect + if (drawing_time >= (30 SECONDS)) + drawing_effect = new(target_turf, rune_colour) + else + drawing_effect = new /obj/effect/temp_visual/drawing_heretic_rune/fast(target_turf, rune_colour) + if(!do_after(user, drawing_time, target_turf, extra_checks = additional_checks)) target_turf.balloon_alert(user, "interrupted!") + new /obj/effect/temp_visual/drawing_heretic_rune/fail(target_turf, rune_colour) + qdel(drawing_effect) drawing_rune = FALSE return + qdel(drawing_effect) target_turf.balloon_alert(user, "rune created") - new /obj/effect/heretic_rune/big(target_turf) + new /obj/effect/heretic_rune/big(target_turf, rune_colour) drawing_rune = FALSE /** diff --git a/code/modules/antagonists/heretic/items/forbidden_book.dm b/code/modules/antagonists/heretic/items/forbidden_book.dm index cd764f292bf..84cd42462e0 100644 --- a/code/modules/antagonists/heretic/items/forbidden_book.dm +++ b/code/modules/antagonists/heretic/items/forbidden_book.dm @@ -13,8 +13,13 @@ AddComponent(/datum/component/effect_remover, \ success_feedback = "You remove %THEEFFECT.", \ tip_text = "Clear rune", \ + on_clear_callback = CALLBACK(src, PROC_REF(after_clear_rune)), \ effects_we_clear = list(/obj/effect/heretic_rune)) +/// Callback for effect_remover component after a rune is deleted +/obj/item/codex_cicatrix/proc/after_clear_rune(obj/effect/target, mob/living/user) + new /obj/effect/temp_visual/drawing_heretic_rune/fail(target.loc, target.greyscale_colors) + /obj/item/codex_cicatrix/examine(mob/user) . = ..() if(!IS_HERETIC(user)) diff --git a/code/modules/antagonists/heretic/magic/mansus_grasp.dm b/code/modules/antagonists/heretic/magic/mansus_grasp.dm index c7065bcebd2..0ddeb4c41b7 100644 --- a/code/modules/antagonists/heretic/magic/mansus_grasp.dm +++ b/code/modules/antagonists/heretic/magic/mansus_grasp.dm @@ -75,6 +75,7 @@ * Callback for effect_remover component. */ /obj/item/melee/touch_attack/mansus_fist/proc/after_clear_rune(obj/effect/target, mob/living/user) + new /obj/effect/temp_visual/drawing_heretic_rune/fail(target.loc, target.greyscale_colors) var/datum/action/cooldown/spell/touch/mansus_grasp/grasp = spell_which_made_us?.resolve() grasp?.spell_feedback() diff --git a/code/modules/antagonists/heretic/transmutation_rune.dm b/code/modules/antagonists/heretic/transmutation_rune.dm index f1c4b0d4b7a..5720b5ae8b8 100644 --- a/code/modules/antagonists/heretic/transmutation_rune.dm +++ b/code/modules/antagonists/heretic/transmutation_rune.dm @@ -180,6 +180,37 @@ /// A 3x3 heretic rune. The kind heretics actually draw in game. /obj/effect/heretic_rune/big icon = 'icons/effects/96x96.dmi' - icon_state = "eldritch_rune1" - pixel_x = -32 //So the big ol' 96x96 sprite shows up right + icon_state = "transmutation_rune" + pixel_x = -33 //So the big ol' 96x96 sprite shows up right pixel_y = -32 + greyscale_config = /datum/greyscale_config/heretic_rune + +/obj/effect/heretic_rune/big/Initialize(mapload, path_colour) + . = ..() + if (path_colour) + set_greyscale(colors = list(path_colour)) + +/obj/effect/temp_visual/drawing_heretic_rune + duration = 30 SECONDS + icon = 'icons/effects/96x96.dmi' + icon_state = "transmutation_rune" + pixel_x = -33 + pixel_y = -32 + plane = GAME_PLANE + layer = SIGIL_LAYER + greyscale_config = /datum/greyscale_config/heretic_rune + /// We only set this state after setting the colour, otherwise the animation doesn't colour correctly + var/animation_state = "transmutation_rune_draw" + +/obj/effect/temp_visual/drawing_heretic_rune/Initialize(mapload, path_colour = COLOR_WHITE) + . = ..() + set_greyscale(colors = list(path_colour)) + icon_state = animation_state + +/obj/effect/temp_visual/drawing_heretic_rune/fast + duration = 12 SECONDS + animation_state = "transmutation_rune_fast" + +/obj/effect/temp_visual/drawing_heretic_rune/fail + duration = 0.25 SECONDS + animation_state = "transmutation_rune_fail" diff --git a/icons/effects/96x96.dmi b/icons/effects/96x96.dmi index 0e28a0f642b..e803dbcb259 100644 Binary files a/icons/effects/96x96.dmi and b/icons/effects/96x96.dmi differ