From e9cd7506a09ddcea129aa62bee28b2a6e8a41c70 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 1 Apr 2022 01:28:25 +0200 Subject: [PATCH] [MIRROR] Give space dragon ability to make it's sprite small [MDB IGNORE] (#12429) * Give space dragon ability to make it's sprite small (#65311) About The Pull Request Allows space dragon to replace it's sprite with a carp sprite like the xeno queen can turn it's sprite into a drone. This means only the dragon sees itself as small. Others still see it as giant. Why It's Good For The Game The space dragon sprite is pretty big, so you can't attack stuff directly north of you. This solves that. Changelog cl qol: space dragon can now make it's sprite smaller /cl * Give space dragon ability to make it's sprite small Co-authored-by: ivanmixo --- code/datums/action.dm | 10 +++++++--- .../mob/living/simple_animal/hostile/space_dragon.dm | 9 +++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/code/datums/action.dm b/code/datums/action.dm index 9dede2540a2..7e152b1131e 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -861,7 +861,7 @@ //Small sprites /datum/action/small_sprite name = "Toggle Giant Sprite" - desc = "Others will always see you as giant" + desc = "Others will always see you as giant." icon_icon = 'icons/mob/actions/actions_xeno.dmi' button_icon_state = "smallqueen" background_icon_state = "bg_alien" @@ -875,8 +875,6 @@ /datum/action/small_sprite/megafauna icon_icon = 'icons/mob/actions/actions_xeno.dmi' - button_icon_state = "smallqueen" - background_icon_state = "bg_alien" small_icon = 'icons/mob/lavaland/lavaland_monsters.dmi' /datum/action/small_sprite/megafauna/drake @@ -896,6 +894,12 @@ small_icon_state = "arachnid_mini" background_icon_state = "bg_demon" +/datum/action/small_sprite/space_dragon + small_icon = 'icons/mob/carp.dmi' + small_icon_state = "carp" + icon_icon = 'icons/mob/carp.dmi' + button_icon_state = "carp" + /datum/action/small_sprite/Trigger(trigger_flags) ..() if(!small) diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm index 0997df14537..51882876fa0 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm @@ -91,6 +91,8 @@ var/objective_complete = FALSE /// The innate ability to summon rifts var/datum/action/innate/summon_rift/rift + /// The ability to make your sprite smaller + var/datum/action/small_sprite/space_dragon/small_sprite /// The color of the space dragon. var/chosen_color /// Minimum devastation damage dealt coefficient based on max health @@ -106,6 +108,9 @@ ADD_TRAIT(src, TRAIT_HEALS_FROM_CARP_RIFTS, INNATE_TRAIT) rift = new rift.Grant(src) + small_sprite = new + small_sprite.Grant(src) + RegisterSignal(small_sprite, COMSIG_ACTION_TRIGGER, .proc/add_dragon_overlay) /mob/living/simple_animal/hostile/space_dragon/Login() . = ..() @@ -201,10 +206,12 @@ destroy_rifts() ..() add_dragon_overlay() + UnregisterSignal(small_sprite, COMSIG_ACTION_TRIGGER) /mob/living/simple_animal/hostile/space_dragon/revive(full_heal, admin_revive) . = ..() add_dragon_overlay() + RegisterSignal(small_sprite, COMSIG_ACTION_TRIGGER, .proc/add_dragon_overlay) /mob/living/simple_animal/hostile/space_dragon/wabbajack_act(mob/living/new_mob) empty_contents() @@ -252,6 +259,8 @@ */ /mob/living/simple_animal/hostile/space_dragon/proc/add_dragon_overlay() cut_overlays() + if(!small_sprite.small) + return if(stat == DEAD) var/mutable_appearance/overlay = mutable_appearance(icon, "overlay_dead") overlay.appearance_flags = RESET_COLOR