From 2c0def4a82546accd5475e0c6bca6e92bcdf1ce4 Mon Sep 17 00:00:00 2001 From: Certhic Date: Wed, 31 Oct 2018 20:01:45 +0100 Subject: [PATCH] button-iy --- code/_onclick/hud/diona_nymph.dm | 26 +++++++++++++------ .../living/simple_animal/friendly/diona.dm | 4 +-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/code/_onclick/hud/diona_nymph.dm b/code/_onclick/hud/diona_nymph.dm index 6609e9a2093..fac671bfade 100644 --- a/code/_onclick/hud/diona_nymph.dm +++ b/code/_onclick/hud/diona_nymph.dm @@ -5,14 +5,24 @@ /datum/hud/diona/New() ..() - var/obj/screen/diona/blood = new /obj/screen/diona/blood() - var/obj/screen/diona/merge = new /obj/screen/diona/merge() - var/obj/screen/diona/evolve = new /obj/screen/diona/evolve() - var/obj/screen/diona/intent = new /obj/screen/diona/intent() - static_inventory += blood - static_inventory += merge - static_inventory += evolve - toggleable_inventory += intent + static_inventory += diona_button(new /obj/screen/diona/blood()) + static_inventory += diona_button(new /obj/screen/diona/merge()) + static_inventory += diona_button(new /obj/screen/diona/evolve()) + toggleable_inventory += new /obj/screen/diona/intent() + +datum/hud/diona/proc/diona_button(var/obj/screen/diona/D) + var/obj/screen/diona/button/B = new /obj/screen/diona/button + B.overlays += D + B.master = D + B.screen_loc = D.screen_loc + return B + +/obj/screen/diona/button + icon = 'icons/mob/actions.dmi' + icon_state = "bg_default" + +/obj/screen/diona/button/Click(location, control, params) + return usr.client.Click(master, location, control, params) /obj/screen/diona/intent name = "Intent" diff --git a/code/modules/mob/living/simple_animal/friendly/diona.dm b/code/modules/mob/living/simple_animal/friendly/diona.dm index 4a067cf9fd6..6e0d8f2f1c7 100644 --- a/code/modules/mob/living/simple_animal/friendly/diona.dm +++ b/code/modules/mob/living/simple_animal/friendly/diona.dm @@ -73,7 +73,7 @@ if(isdiona(M)) to_chat(M, "You feel your being twine with that of [src] as it merges with your biomass.") to_chat(src, "You feel your being twine with that of [M] as you merge with its biomass.") - throw_alert(gestalt_alert, /obj/screen/alert/nymph) //adds a screen alert that can call resist + throw_alert(gestalt_alert, /obj/screen/alert/nymph, new_master = src) //adds a screen alert that can call resist forceMove(M) else get_scooped(M) @@ -102,7 +102,7 @@ M.status_flags |= PASSEMOTES to_chat(src, "You feel your being twine with that of [M] as you merge with its biomass.") forceMove(M) - throw_alert(gestalt_alert, /obj/screen/alert/nymph) //adds a screen alert that can call resist + throw_alert(gestalt_alert, /obj/screen/alert/nymph, new_master = src) //adds a screen alert that can call resist return TRUE else return FALSE