From 4598a40ee8320dc91a8c4fd7fed94a7e89cf23bc Mon Sep 17 00:00:00 2001 From: ivanmixo Date: Thu, 31 Mar 2022 22:58:50 +0200 Subject: [PATCH] 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 --- 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 92f3d1c50c4..4c97a81bcd3 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -867,7 +867,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" @@ -881,8 +881,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 @@ -902,6 +900,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