diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 69fba583577..a77d984d8e6 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -21,6 +21,7 @@ #define ROLE_BLOB "Blob" #define ROLE_NINJA "Space Ninja" #define ROLE_MONKEY "Monkey" +#define ROLE_MONKEY_HELMET "Monkey Mind Magnification Helmet" #define ROLE_ABDUCTOR "Abductor" #define ROLE_REVENANT "Revenant" #define ROLE_DEVIL "Devil" diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 0efe6662816..8833d3b9c9f 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -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 ////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 9cec2e37a5c..c724332ecc8 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -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) + . = ..() + . += "---WARNING: REMOVAL OF HELMET ON SUBJECT MAY LEAD TO:---" + . += "BLOOD RAGE" + . += "BRAIN DEATH" + . += "PRIMAL GENE ACTIVATION" + . += "GENETIC MAKEUP MASS SUSCEPTIBILITY" + . += "Ask your CMO if mind magnification is right for you." + +/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, "You feel a stabbing pain in the back of your head for a moment.") + 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("[src] powers up!") + 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("[src] falls silent. Maybe you should try again later?") + 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, "You're a mind magnified monkey! Protect your helmet with your life- if you lose it, your sentience goes with it!") + 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, "You feel your flicker of sentience ripped away from you, as everything becomes dim...") + 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("[src] fizzles and breaks apart!") + 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 diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi index 32ab3796592..f87616a15d2 100644 Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 2a9640df6fa..1cc9dd0a3f4 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ