mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-24 16:41:48 +00:00
* Adds hauntium as a reagent with new fun uses. (#77471) ## About The Pull Request Adds the material hauntium as a reagent, along with bringing some unique effects with the reagent. There are a few new ways to get it other than just the camera obscura as before, such as grinding certain ghostly things. Unique effects it brings: - It works in metalgen (I believe the metalgen recipe is still broken as of making this) to make hauntium infused metalgen. https://github.com/tgstation/tgstation/assets/58376695/121ca6b2-00b7-4203-bc6a-48976b1af802 - Any object touched by the chem will temporarily have the haunted effect, letting it teleport around randomly and even attack people. https://github.com/tgstation/tgstation/assets/58376695/103aeee5-ed3e-4fdd-85e4-ac7338823c46 - If you put it in your body, it hurts your "soul" (soul being heart and mood)  ...unless you are morbid or undead, in which it gives a slight mood boost and acts like an addiction-less drug ## Why It's Good For The Game Hauntium previously was super niche and not very useful other than making funny haunted toolboxes from it. This expands it's usage and makes it a lot more interesting. I also know a good few people who have also wished this was available to use in metalgen and now you can! ## Changelog 🆑 add: Lets you grind things into a hauntium reagent which works similarly to the solid form but is versatile and has some unique effects. /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com> * Adds hauntium as a reagent with new fun uses. --------- Co-authored-by: die_amond <58376695+dieamond13@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
///Attaching this element to something will make it float, get a special ai controller, and gives it a spooky outline.
|
|
/datum/element/haunted
|
|
|
|
/datum/element/haunted/Attach(datum/target, haunt_color = "#f8f8ff")
|
|
. = ..()
|
|
if(!isitem(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
var/obj/item/master = target
|
|
if(istype(master.ai_controller, /datum/ai_controller/haunted))
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
//Make em look spooky
|
|
master.add_filter("haunt_glow", 2, list("type" = "outline", "color" = haunt_color, "size" = 1))
|
|
master.ai_controller = new /datum/ai_controller/haunted(master)
|
|
master.AddElement(/datum/element/movetype_handler)
|
|
ADD_TRAIT(master, TRAIT_MOVE_FLYING, ELEMENT_TRAIT(type))
|
|
|
|
/datum/element/haunted/Detach(datum/source)
|
|
. = ..()
|
|
var/atom/movable/master = source
|
|
master.remove_filter("haunt_glow")
|
|
QDEL_NULL(master.ai_controller)
|
|
REMOVE_TRAIT(master, TRAIT_MOVE_FLYING, ELEMENT_TRAIT(type))
|
|
master.RemoveElement(/datum/element/movetype_handler)
|
|
return ..()
|
|
|
|
/atom/movable/proc/make_haunted(source, color) //if not haunted, make haunted
|
|
if(!HAS_TRAIT(src, TRAIT_HAUNTED))
|
|
AddElement(/datum/element/haunted, color)
|
|
ADD_TRAIT(src, TRAIT_HAUNTED, source)
|
|
|
|
/atom/movable/proc/remove_haunted(source) //if haunted, make not haunted
|
|
REMOVE_TRAIT(src, TRAIT_HAUNTED, source)
|
|
if(!HAS_TRAIT(src, TRAIT_HAUNTED))
|
|
RemoveElement(/datum/element/haunted)
|