Files
Bubberstation/code/game/objects/items/implants/implant_spell.dm
John Willard fa9a2a701a Implant pad TGUI (#80978)
## About The Pull Request

I was messing a little bit with TGUI stuff and ended up turning the
implant pad TGUI, so why not.
On top of the new UI, I replaced the messages to chat with nice and
consistent balloon alerts which will hopefully make it not seem like an
ancient piece of shit.

Video demonstration


https://github.com/tgstation/tgstation/assets/53777086/a1ebe0d4-005b-4e29-a623-2c1b352cd017

I also removed ``INTERACT_MACHINE_SET_MACHINE`` from the prisoner
console, because it was accidentally left in when the console was moved
to TGUI

## Why It's Good For The Game

I'm still going down the list of things that need to be TGUI, and I
ended up doing this cause I just felt like it while messing with some
other stuff.
Rest of the list is visible here:
https://hackmd.io/@sClqlHM0T4yZfn-qa5KnAg/S152Tl2hh

## Changelog

🆑
refactor: Implant pads now use TGUI
/🆑
2024-01-17 04:37:03 -05:00

64 lines
1.9 KiB
Plaintext

/obj/item/implant/spell
name = "spell implant"
desc = "Allows you to cast a spell as if you were a wizard."
actions_types = null
/// Whether to make the spell robeless
var/make_robeless = TRUE
/// The typepath of the spell we give to people. Instantiated in Initialize
var/datum/action/cooldown/spell/spell_type
/// The actual spell we give to the person on implant
var/datum/action/cooldown/spell/spell_to_give
/obj/item/implant/spell/Initialize(mapload)
. = ..()
if(!spell_type)
return
spell_to_give = new spell_type(src)
if(make_robeless && (spell_to_give.spell_requirements & SPELL_REQUIRES_WIZARD_GARB))
spell_to_give.spell_requirements &= ~SPELL_REQUIRES_WIZARD_GARB
/obj/item/implant/spell/Destroy()
QDEL_NULL(spell_to_give)
return ..()
/obj/item/implant/spell/get_data()
return "<b>Implant Specifications:</b><BR> \
<b>Name:</b> Spell Implant<BR> \
<b>Life:</b> 4 hours after death of host<BR> \
<b>Implant Details:</b> <BR> \
<b>Function:</b> [spell_to_give ? "Allows a non-wizard to cast [spell_to_give] as if they were a wizard." : "None."]"
/obj/item/implant/spell/implant(mob/living/target, mob/user, silent = FALSE, force = FALSE)
. = ..()
if (!.)
return
if (!spell_to_give)
return FALSE
spell_to_give.Grant(target)
return TRUE
/obj/item/implant/spell/removed(mob/living/source, silent = FALSE, special = 0)
. = ..()
if (!.)
return FALSE
if(spell_to_give)
spell_to_give.Remove(source)
if(source.stat != DEAD && !silent)
to_chat(source, span_boldnotice("The knowledge of how to cast [spell_to_give] slips out from your mind."))
return TRUE
/obj/item/implanter/spell
name = "implanter (spell)"
imp_type = /obj/item/implant/spell
/obj/item/implantcase/spell
name = "implant case - 'Wizardry'"
desc = "A glass case containing an implant that can teach the user the arts of Wizardry."
imp_type = /obj/item/implant/spell