[MIRROR] Admin-Distributable Cloaking Ability (#9711)

Co-authored-by: Aroliacue <96730930+Aroliacue@users.noreply.github.com>
Co-authored-by: Aroliacue <avaylaiss34@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2024-12-28 06:49:29 -07:00
committed by GitHub
parent f6d491f30c
commit 5fee898ae7
3 changed files with 29 additions and 0 deletions

View File

@@ -610,6 +610,12 @@
add_verb(Tar, /mob/living/proc/eat_trash)
add_verb(Tar, /mob/living/proc/toggle_trash_catching)
if("active_cloaking")
var/mob/living/Tar = target
if(!istype(Tar))
return
add_verb(Tar, /mob/living/proc/toggle_active_cloaking)
////////INVENTORY//////////////

View File

@@ -60,3 +60,23 @@
else
to_chat(src, span_warning("You do not have enough chemicals stored to reproduce."))
return
/mob/living/proc/toggle_active_cloaking() // Borrowed from Rogue Star, thanks guys!
set category = "Abilities.General"
set name = "Toggle Active Cloaking"
if(invisibility == INVISIBILITY_OBSERVER)
invisibility = initial(invisibility)
to_chat(src, span_notice("You are now visible."))
alpha = max(alpha + 100, 255)
else
invisibility = INVISIBILITY_OBSERVER
to_chat(src, span_notice("You are now invisible."))
alpha = max(alpha - 100, 0)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(5, 0, src)
sparks.attach(loc)
sparks.start()
visible_message(span_warning("Electrical sparks manifest around \the [src] as they suddenly appear!"))
qdel(sparks)

View File

@@ -45,6 +45,9 @@ export const ControlAbilities = (props) => {
<Button fluid onClick={() => act('trash_eater')}>
Give Trash Eater
</Button>
<Button fluid onClick={() => act('active_cloaking')}>
Give Active Cloaking
</Button>
</Section>
);
};