[READY] Adds monkey sentience caps! (#51621)

* monkey mind caps!

* sprites 1/2 + polish checklist

* athath suggestions

Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>

* weird, this file says it was changed i wonder what that is

* review (conflict fixes next)

* conflicts + all the colors of hats

* remove

* done

* k

* done, but must readd sprites

* sprotes back

* Update helmet.dm

Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
This commit is contained in:
tralezab
2020-07-10 01:36:55 -07:00
committed by GitHub
parent 41440f1081
commit caa6f771fe
5 changed files with 96 additions and 0 deletions
+8
View File
@@ -1411,6 +1411,14 @@
crate_type = /obj/structure/closet/crate/secure/science
dangerous = TRUE
/datum/supply_pack/science/monkey_helmets
name = "Monkey Mind Magnification Helmet crate"
desc = "Some research is best done with monkeys, yet sometimes they're just too dumb to complete more complicated tasks. These helmets should help."
cost = 1500
contains = list(/obj/item/clothing/head/helmet/monkey_sentience,
/obj/item/clothing/head/helmet/monkey_sentience)
crate_name = "monkey mind magnification crate"
//////////////////////////////////////////////////////////////////////////////
/////////////////////////////// Service //////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
+87
View File
@@ -335,6 +335,93 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
strip_delay = 80
//monkey sentience caps
/obj/item/clothing/head/helmet/monkey_sentience
name = "monkey mind magnification helmet"
desc = "A fragile, circuitry embedded helmet for boosting the intelligence of a monkey to a higher level. You see several warning labels..."
icon_state = "monkeymind"
inhand_icon_state = "monkeymind"
strip_delay = 100
var/mob/living/carbon/monkey/magnification = null ///if the helmet is on a valid target (just works like a normal helmet if not (cargo please stop))
var/polling = FALSE///if the helmet is currently polling for targets (special code for removal)
/obj/item/clothing/head/helmet/monkey_sentience/Initialize()
. = ..()
icon_state = "[icon_state][rand(1,3)]"
/obj/item/clothing/head/helmet/monkey_sentience/examine(mob/user)
. = ..()
. += "<span class='boldwarning'>---WARNING: REMOVAL OF HELMET ON SUBJECT MAY LEAD TO:---</span>"
. += "<span class='warning'>BLOOD RAGE</span>"
. += "<span class='warning'>BRAIN DEATH</span>"
. += "<span class='warning'>PRIMAL GENE ACTIVATION</span>"
. += "<span class='warning'>GENETIC MAKEUP MASS SUSCEPTIBILITY</span>"
. += "<span class='boldnotice'>Ask your CMO if mind magnification is right for you.</span>"
/obj/item/clothing/head/helmet/monkey_sentience/equipped(mob/user, slot)
. = ..()
if(slot != ITEM_SLOT_HEAD)
return
if(!ismonkey(user) || user.ckey)
var/mob/living/something = user
to_chat(something, "<span class='boldnotice'>You feel a stabbing pain in the back of your head for a moment.</span>")
something.apply_damage(5,BRUTE,BODY_ZONE_HEAD,FALSE,FALSE,FALSE) //notably: no damage resist (it's in your helmet), no damage spread (it's in your helmet)
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
return
magnification = user //this polls ghosts
visible_message("<span class='warning'>[src] powers up!</span>")
playsound(src, 'sound/machines/ping.ogg', 30, TRUE)
polling = TRUE
var/list/candidates = pollCandidatesForMob("Do you want to play as a mind magnified monkey?", ROLE_SENTIENCE, null, ROLE_SENTIENCE, 50, magnification, POLL_IGNORE_SENTIENCE_POTION)
polling = FALSE
if(!candidates.len)
magnification = null
visible_message("<span class='notice'>[src] falls silent. Maybe you should try again later?</span>")
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
var/mob/picked = pick(candidates)
magnification.key = picked.key
playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, FALSE)
to_chat(magnification, "<span class='notice'>You're a mind magnified monkey! Protect your helmet with your life- if you lose it, your sentience goes with it!</span>")
var/policy = get_policy(ROLE_MONKEY_HELMET)
if(policy)
to_chat(magnification, policy)
icon_state = "[icon_state]up"
/obj/item/clothing/head/helmet/monkey_sentience/Destroy()
. = ..()
disconnect()
/obj/item/clothing/head/helmet/monkey_sentience/proc/disconnect()
if(!magnification) //not put on a viable head
return
if(!polling)//put on a viable head, but taken off after polling finished.
if(magnification.client)
to_chat(magnification, "<span class='userdanger'>You feel your flicker of sentience ripped away from you, as everything becomes dim...</span>")
magnification.ghostize(FALSE)
if(prob(10))
switch(rand(1,4))
if(1) //blood rage
magnification.aggressive = TRUE
if(2) //brain death
magnification.apply_damage(500,BRAIN,BODY_ZONE_HEAD,FALSE,FALSE,FALSE)
if(3) //primal gene (gorilla)
magnification.gorillize()
if(4) //genetic mass susceptibility (gib)
magnification.gib()
//either used up correctly or taken off before polling finished (punish this by destroying the helmet)
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
playsound(src, "sparks", 100, TRUE)
visible_message("<span class='warning'>[src] fizzles and breaks apart!</span>")
magnification = null
new /obj/effect/decal/cleanable/ash/crematorium(drop_location()) //just in case they're in a locker or other containers it needs to use crematorium ash, see the path itself for an explanation
/obj/item/clothing/head/helmet/monkey_sentience/dropped(mob/user)
. = ..()
if(magnification || polling)
qdel(src)//runs disconnect code
//LightToggle