mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[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:
committed by
GitHub
parent
f6d491f30c
commit
5fee898ae7
@@ -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//////////////
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user