From b36878665558f580990b8766968bae89bc2562f6 Mon Sep 17 00:00:00 2001 From: ynot01 Date: Fri, 23 Jul 2021 02:44:54 -0400 Subject: [PATCH 1/8] initial commit --- code/__HELPERS/game.dm | 25 ++++++++++ code/datums/brain_damage/mrat.dm | 48 +++++++++++++++++++ .../code/modules/mentor/mentor_verbs.dm | 9 ++++ 3 files changed, 82 insertions(+) create mode 100644 code/datums/brain_damage/mrat.dm diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 1cc419e39020..c44a8dd00f64 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -484,6 +484,31 @@ return pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates) +/** + * Poll all mentor ghosts for looking for a candidate + * + * Poll all mentor ghosts a question + * returns people who voted yes in a list + * Arguments: + * * Question: String, what do you want to ask them + * * jobbanType: List, Which roles/jobs to exclude from being asked + * * gametypeCheck: Datum, Check if they have the time required for that role + * * be_special_flag: Bool, Only notify ghosts with special antag on + * * poll_time: Integer, How long to poll for in deciseconds(0.1s) + * * ignore_category: Define, ignore_category: People with this category(defined in poll_ignore.dm) turned off dont get the message + * * flashwindow: Bool, Flash their window to grab their attention + */ +/proc/pollMentorGhostCandidates(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, ignore_category = null, flashwindow = TRUE) + var/list/candidates = list() + if(!(GLOB.ghost_role_flags & GHOSTROLE_STATION_SENTIENCE)) + return candidates + + for(var/mob/dead/observer/G in GLOB.player_list) + if(!is_mentor(G)) + candidates += G + + return pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates) + /** * Poll all in the group for a candidate * diff --git a/code/datums/brain_damage/mrat.dm b/code/datums/brain_damage/mrat.dm new file mode 100644 index 000000000000..94a26fd2c580 --- /dev/null +++ b/code/datums/brain_damage/mrat.dm @@ -0,0 +1,48 @@ +/datum/brain_trauma/special/imaginary_friend/mrat + name = "Epistemania" + desc = "Patient suffers from a manic pursuit of knowlewdge." + scan_desc = "epistemania" + gain_text = "Requesting mentor rat..." + lose_text = "Mentor rat not found. Either your mentor rat left you or you didn't find one." + resilience = TRAUMA_RESILIENCE_ABSOLUTE + +/datum/brain_trauma/special/imaginary_friend/mrat/proc/get_ghost() + set waitfor = FALSE + var/list/mob/dead/observer/candidates = pollMentorCandidatesForMob("Do you want to play as [owner]'s mentor rat?", ROLE_PAI, null, null, 75, friend, POLL_IGNORE_IMAGINARYFRIEND) + if(LAZYLEN(candidates)) + var/mob/dead/observer/C = pick(candidates) + friend.key = C.key + friend_initialized = TRUE + to_chat(owner, "You have acquired the mentor rat known as [friend.key], ask them any question you like.") + else + qdel(src) + +/mob/camera/imaginary_friend/mrat + name = "Mentor Rat" + real_name = "Mentor Rat" + desc = "A mentor." + + var/datum/action/innate/mrat_leave/join + +/mob/camera/imaginary_friend/mrat/proc/greet() + to_chat(src, "You are the mentor rat of [owner]!") + to_chat(src, "Do not give [owner] any OOC information from your time as a ghost.") + to_chat(src, "Your job is to answer [owner]'s question(s) and you are given this form to assist in that.") + to_chat(src, "Don't be stupid with this or you will face the consequences.") + +/mob/camera/imaginary_friend/mrat/proc/setup_friend() + var/gender = NEUTER + real_name = src.ckey + name = real_name + human_image = icon('icons/mob/animal.dmi', icon_state = "mouse_gray") + +/datum/action/innate/mrat_leave + name = "Leave" + desc = "Leave and return to your ghost form." + icon_icon = 'icons/mob/actions/actions_minor_antag.dmi' + background_icon_state = "bg_revenant" + button_icon_state = "beam_up" + +/datum/action/innate/mrat_leave/Activate() + var/mob/camera/imaginary_friend/I = owner + qdel(I.trauma) diff --git a/yogstation/code/modules/mentor/mentor_verbs.dm b/yogstation/code/modules/mentor/mentor_verbs.dm index 7a8e85dca6c1..db9869a7eeba 100644 --- a/yogstation/code/modules/mentor/mentor_verbs.dm +++ b/yogstation/code/modules/mentor/mentor_verbs.dm @@ -70,6 +70,15 @@ GLOBAL_PROTECT(mentor_verbs) msg += "Mentorhelps are also seen by admins. If no mentors are available in game adminhelp instead and an admin will see it and respond." to_chat(src, msg, confidential=TRUE) +/client/proc/mrat() + set name = "Request Mentor Rat" + set category = "Mentor" + + if(src.mob.stat == DEAD) + to_chat(src, "You must be alive to get a mentor rat!") + else + src.mob.gain_trauma(/datum/brain_trauma/special/imaginary_friend/mrat) + /client/proc/dementor() set name = "Dementor" set category = "Mentor" From 79238a6cdc9e3e10054a9aace68db425a4a69d4a Mon Sep 17 00:00:00 2001 From: ynot01 Date: Fri, 23 Jul 2021 03:10:36 -0400 Subject: [PATCH 2/8] fixes a whole buncha things --- code/__HELPERS/game.dm | 22 +++++++++++++++- code/datums/brain_damage/mrat.dm | 25 +++++++++++++++---- yogstation.dme | 1 + .../code/modules/mentor/mentor_verbs.dm | 6 +++-- 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index c44a8dd00f64..ebe47d3a3f42 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -504,7 +504,7 @@ return candidates for(var/mob/dead/observer/G in GLOB.player_list) - if(!is_mentor(G)) + if(is_mentor(G)) candidates += G return pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates) @@ -575,6 +575,26 @@ return list() return L +/** + * Poll mentor ghosts to take control of a mob + * + * Poll mentor ghosts for mob control + * returns people who voted yes in a list + * Arguments: + * * Question: String, what do you want to ask them + * * jobbanType: List, Which roles/jobs to exclude from being asked + * * gametypeCheck: Datum, Check if they have the time required for that role + * * be_special_flag: Bool, Only notify ghosts with special antag on + * * poll_time: Integer, How long to poll for in deciseconds(0.1s) + * * M: Mob, /mob to offer + * * ignore_category: Unknown + */ +/proc/pollMentorCandidatesForMob(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, mob/M, ignore_category = null) + var/list/L = pollMentorGhostCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category) + if(!M || QDELETED(M) || !M.loc) + return list() + return L + /** * Poll ghosts to take control of a mob * diff --git a/code/datums/brain_damage/mrat.dm b/code/datums/brain_damage/mrat.dm index 94a26fd2c580..4cf62bb4649c 100644 --- a/code/datums/brain_damage/mrat.dm +++ b/code/datums/brain_damage/mrat.dm @@ -6,7 +6,7 @@ lose_text = "Mentor rat not found. Either your mentor rat left you or you didn't find one." resilience = TRAUMA_RESILIENCE_ABSOLUTE -/datum/brain_trauma/special/imaginary_friend/mrat/proc/get_ghost() +/datum/brain_trauma/special/imaginary_friend/mrat/get_ghost() set waitfor = FALSE var/list/mob/dead/observer/candidates = pollMentorCandidatesForMob("Do you want to play as [owner]'s mentor rat?", ROLE_PAI, null, null, 75, friend, POLL_IGNORE_IMAGINARYFRIEND) if(LAZYLEN(candidates)) @@ -22,16 +22,31 @@ real_name = "Mentor Rat" desc = "A mentor." - var/datum/action/innate/mrat_leave/join + var/datum/action/innate/mrat_leave/leave -/mob/camera/imaginary_friend/mrat/proc/greet() +/mob/camera/imaginary_friend/mrat/greet() to_chat(src, "You are the mentor rat of [owner]!") to_chat(src, "Do not give [owner] any OOC information from your time as a ghost.") to_chat(src, "Your job is to answer [owner]'s question(s) and you are given this form to assist in that.") to_chat(src, "Don't be stupid with this or you will face the consequences.") -/mob/camera/imaginary_friend/mrat/proc/setup_friend() - var/gender = NEUTER +/mob/camera/imaginary_friend/mrat/Initialize(mapload, _trauma) + . = ..() + + trauma = _trauma + owner = trauma.owner + + setup_friend() + + join = new + join.Grant(src) + hide = new + hide.Grant(src) + leave = new + leave.Grant(src) + + +/mob/camera/imaginary_friend/mrat/setup_friend() real_name = src.ckey name = real_name human_image = icon('icons/mob/animal.dmi', icon_state = "mouse_gray") diff --git a/yogstation.dme b/yogstation.dme index 51435b3a2f91..df5920d57f70 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -386,6 +386,7 @@ #include "code\datums\brain_damage\imaginary_friend.dm" #include "code\datums\brain_damage\magic.dm" #include "code\datums\brain_damage\mild.dm" +#include "code\datums\brain_damage\mrat.dm" #include "code\datums\brain_damage\phobia.dm" #include "code\datums\brain_damage\severe.dm" #include "code\datums\brain_damage\special.dm" diff --git a/yogstation/code/modules/mentor/mentor_verbs.dm b/yogstation/code/modules/mentor/mentor_verbs.dm index db9869a7eeba..51be3d54048a 100644 --- a/yogstation/code/modules/mentor/mentor_verbs.dm +++ b/yogstation/code/modules/mentor/mentor_verbs.dm @@ -74,10 +74,12 @@ GLOBAL_PROTECT(mentor_verbs) set name = "Request Mentor Rat" set category = "Mentor" - if(src.mob.stat == DEAD) + var/mob/living/carbon/human/C = src.mob + + if(C.stat == DEAD) to_chat(src, "You must be alive to get a mentor rat!") else - src.mob.gain_trauma(/datum/brain_trauma/special/imaginary_friend/mrat) + C.gain_trauma(/datum/brain_trauma/special/imaginary_friend/mrat) /client/proc/dementor() set name = "Dementor" From e757fd6e88c3095ee529052984c5c5d9633854e3 Mon Sep 17 00:00:00 2001 From: ynot01 Date: Fri, 23 Jul 2021 03:18:29 -0400 Subject: [PATCH 3/8] changes proc to verb --- yogstation/code/modules/mentor/mentor_verbs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yogstation/code/modules/mentor/mentor_verbs.dm b/yogstation/code/modules/mentor/mentor_verbs.dm index 51be3d54048a..f56731c425d0 100644 --- a/yogstation/code/modules/mentor/mentor_verbs.dm +++ b/yogstation/code/modules/mentor/mentor_verbs.dm @@ -70,7 +70,7 @@ GLOBAL_PROTECT(mentor_verbs) msg += "Mentorhelps are also seen by admins. If no mentors are available in game adminhelp instead and an admin will see it and respond." to_chat(src, msg, confidential=TRUE) -/client/proc/mrat() +/client/verb/mrat() set name = "Request Mentor Rat" set category = "Mentor" From da377bdc1059595bbc6ea6ef801cc581ff1d24aa Mon Sep 17 00:00:00 2001 From: ynot01 Date: Fri, 23 Jul 2021 05:05:35 -0400 Subject: [PATCH 4/8] fixes a bunch of other things TESTED AND WORKING --- code/datums/brain_damage/mrat.dm | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/code/datums/brain_damage/mrat.dm b/code/datums/brain_damage/mrat.dm index 4cf62bb4649c..12dc4ccc483e 100644 --- a/code/datums/brain_damage/mrat.dm +++ b/code/datums/brain_damage/mrat.dm @@ -6,14 +6,19 @@ lose_text = "Mentor rat not found. Either your mentor rat left you or you didn't find one." resilience = TRAUMA_RESILIENCE_ABSOLUTE +/datum/brain_trauma/special/imaginary_friend/mrat/make_friend() + friend = new /mob/camera/imaginary_friend/mrat(get_turf(owner), src) + /datum/brain_trauma/special/imaginary_friend/mrat/get_ghost() set waitfor = FALSE var/list/mob/dead/observer/candidates = pollMentorCandidatesForMob("Do you want to play as [owner]'s mentor rat?", ROLE_PAI, null, null, 75, friend, POLL_IGNORE_IMAGINARYFRIEND) if(LAZYLEN(candidates)) var/mob/dead/observer/C = pick(candidates) friend.key = C.key + friend.real_name = friend.key + friend.name = friend.real_name friend_initialized = TRUE - to_chat(owner, "You have acquired the mentor rat known as [friend.key], ask them any question you like.") + to_chat(owner, "You have acquired the mentor rat [friend.key], ask them any question you like. They will leave your presence when they are done.") else qdel(src) @@ -25,30 +30,17 @@ var/datum/action/innate/mrat_leave/leave /mob/camera/imaginary_friend/mrat/greet() - to_chat(src, "You are the mentor rat of [owner]!") - to_chat(src, "Do not give [owner] any OOC information from your time as a ghost.") - to_chat(src, "Your job is to answer [owner]'s question(s) and you are given this form to assist in that.") - to_chat(src, "Don't be stupid with this or you will face the consequences.") + to_chat(src, "You are the mentor rat of [owner]!") + to_chat(src, "Do not give [owner] any OOC information from your time as a ghost.") + to_chat(src, "Your job is to answer [owner]'s question(s) and you are given this form to assist in that.") + to_chat(src, "Don't be stupid with this or you will face the consequences.") /mob/camera/imaginary_friend/mrat/Initialize(mapload, _trauma) . = ..() - - trauma = _trauma - owner = trauma.owner - - setup_friend() - - join = new - join.Grant(src) - hide = new - hide.Grant(src) leave = new leave.Grant(src) - /mob/camera/imaginary_friend/mrat/setup_friend() - real_name = src.ckey - name = real_name human_image = icon('icons/mob/animal.dmi', icon_state = "mouse_gray") /datum/action/innate/mrat_leave From 4058ac18d1df4f1f7ab51a6c6f68ffc86a0a1bd0 Mon Sep 17 00:00:00 2001 From: ynot01 Date: Fri, 23 Jul 2021 05:11:39 -0400 Subject: [PATCH 5/8] humans only --- yogstation/code/modules/mentor/mentor_verbs.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yogstation/code/modules/mentor/mentor_verbs.dm b/yogstation/code/modules/mentor/mentor_verbs.dm index f56731c425d0..98c8662feb56 100644 --- a/yogstation/code/modules/mentor/mentor_verbs.dm +++ b/yogstation/code/modules/mentor/mentor_verbs.dm @@ -78,6 +78,8 @@ GLOBAL_PROTECT(mentor_verbs) if(C.stat == DEAD) to_chat(src, "You must be alive to get a mentor rat!") + else if(!istype(C, /mob/living/carbon/human)) + to_chat(src, "You must be humanoid to get a mentor rat!") else C.gain_trauma(/datum/brain_trauma/special/imaginary_friend/mrat) From 974a389cc772cb84c242e778ba961d3d15ce4edd Mon Sep 17 00:00:00 2001 From: ynot01 Date: Fri, 23 Jul 2021 07:12:11 -0400 Subject: [PATCH 6/8] more things see desc adjusted verb name & other things referencing the rat, let the rat pseudo-point, made the rat squeak whenever it talks, added a check for if someone already has an mrat --- code/datums/brain_damage/imaginary_friend.dm | 2 ++ code/datums/brain_damage/mrat.dm | 11 ++++++-- .../code/modules/mentor/mentor_verbs.dm | 27 +++++++++++++------ 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index 0640c8fa3978..6f1d20c178c9 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -164,6 +164,8 @@ to_chat(owner, "[rendered]") to_chat(src, "[rendered]") + SEND_SOUND(owner, sound('sound/effects/mousesqueek.ogg')) + SEND_SOUND(src, sound('sound/effects/mousesqueek.ogg')) //speech bubble if(owner.client) diff --git a/code/datums/brain_damage/mrat.dm b/code/datums/brain_damage/mrat.dm index 12dc4ccc483e..0838b41f5135 100644 --- a/code/datums/brain_damage/mrat.dm +++ b/code/datums/brain_damage/mrat.dm @@ -2,8 +2,8 @@ name = "Epistemania" desc = "Patient suffers from a manic pursuit of knowlewdge." scan_desc = "epistemania" - gain_text = "Requesting mentor rat..." - lose_text = "Mentor rat not found. Either your mentor rat left you or you didn't find one." + gain_text = "Requesting mentor..." + lose_text = "Mentor not found. Either your mentor left you or one didn't respond." resilience = TRAUMA_RESILIENCE_ABSOLUTE /datum/brain_trauma/special/imaginary_friend/mrat/make_friend() @@ -53,3 +53,10 @@ /datum/action/innate/mrat_leave/Activate() var/mob/camera/imaginary_friend/I = owner qdel(I.trauma) + +/mob/camera/imaginary_friend/mrat/pointed(atom/A as mob|obj|turf in view()) + if(!..()) + return FALSE + to_chat(owner, "[src] points at [A].") + to_chat(src, "You point at [A].") + return TRUE diff --git a/yogstation/code/modules/mentor/mentor_verbs.dm b/yogstation/code/modules/mentor/mentor_verbs.dm index 98c8662feb56..1234f67f7c5e 100644 --- a/yogstation/code/modules/mentor/mentor_verbs.dm +++ b/yogstation/code/modules/mentor/mentor_verbs.dm @@ -71,17 +71,28 @@ GLOBAL_PROTECT(mentor_verbs) to_chat(src, msg, confidential=TRUE) /client/verb/mrat() - set name = "Request Mentor Rat" + set name = "Request Mentor Assistance" set category = "Mentor" - var/mob/living/carbon/human/C = src.mob + if(!istype(src.mob, /mob/living/carbon/human)) + to_chat(src, "You must be humanoid to use this!") + return - if(C.stat == DEAD) - to_chat(src, "You must be alive to get a mentor rat!") - else if(!istype(C, /mob/living/carbon/human)) - to_chat(src, "You must be humanoid to get a mentor rat!") - else - C.gain_trauma(/datum/brain_trauma/special/imaginary_friend/mrat) + var/mob/living/carbon/human/M = src.mob + + if(M.stat == DEAD) + to_chat(src, "You must be alive to use this!") + return + + if(M.has_trauma_type(/datum/brain_trauma/special/imaginary_friend/mrat)) + to_chat(src, "You already have or are requesting a mentor rat!") + return + + var/alertresult = alert(M, "This will create a rat-shaped avatar that a mentor can possess and guide you in person. Do you wish to continue?",,"Yes", "No") + if(alertresult == "No" || QDELETED(M) || !istype(M) || !M.key) + return + + M.gain_trauma(/datum/brain_trauma/special/imaginary_friend/mrat) /client/proc/dementor() set name = "Dementor" From 0fb741835ea43f04dd5f13ffbaef548c657b9fcc Mon Sep 17 00:00:00 2001 From: ynot01 Date: Fri, 23 Jul 2021 23:52:03 -0400 Subject: [PATCH 7/8] mcolor --- code/datums/brain_damage/mrat.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/datums/brain_damage/mrat.dm b/code/datums/brain_damage/mrat.dm index 0838b41f5135..890d2ae7bb9b 100644 --- a/code/datums/brain_damage/mrat.dm +++ b/code/datums/brain_damage/mrat.dm @@ -37,6 +37,7 @@ /mob/camera/imaginary_friend/mrat/Initialize(mapload, _trauma) . = ..() + color = "#1ABC9C" leave = new leave.Grant(src) From 4e737cdc9ef55fa1e481992d4e25bd2ca4376bbf Mon Sep 17 00:00:00 2001 From: ynot01 Date: Sat, 24 Jul 2021 02:44:30 -0400 Subject: [PATCH 8/8] radial appearance options, more adjustments --- code/datums/brain_damage/imaginary_friend.dm | 2 - code/datums/brain_damage/mrat.dm | 91 ++++++++++++++++++- .../code/modules/mentor/mentor_verbs.dm | 2 +- 3 files changed, 88 insertions(+), 7 deletions(-) diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index 6f1d20c178c9..0640c8fa3978 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -164,8 +164,6 @@ to_chat(owner, "[rendered]") to_chat(src, "[rendered]") - SEND_SOUND(owner, sound('sound/effects/mousesqueek.ogg')) - SEND_SOUND(src, sound('sound/effects/mousesqueek.ogg')) //speech bubble if(owner.client) diff --git a/code/datums/brain_damage/mrat.dm b/code/datums/brain_damage/mrat.dm index 890d2ae7bb9b..557339d478a4 100644 --- a/code/datums/brain_damage/mrat.dm +++ b/code/datums/brain_damage/mrat.dm @@ -3,7 +3,7 @@ desc = "Patient suffers from a manic pursuit of knowlewdge." scan_desc = "epistemania" gain_text = "Requesting mentor..." - lose_text = "Mentor not found. Either your mentor left you or one didn't respond." + lose_text = "" resilience = TRAUMA_RESILIENCE_ABSOLUTE /datum/brain_trauma/special/imaginary_friend/mrat/make_friend() @@ -17,17 +17,86 @@ friend.key = C.key friend.real_name = friend.key friend.name = friend.real_name + + var/mob/camera/imaginary_friend/mrat/I = friend + I.Costume() + friend_initialized = TRUE to_chat(owner, "You have acquired the mentor rat [friend.key], ask them any question you like. They will leave your presence when they are done.") else + to_chat(owner, "No mentor responded to your request. Try again later.") qdel(src) /mob/camera/imaginary_friend/mrat name = "Mentor Rat" real_name = "Mentor Rat" - desc = "A mentor." + desc = "Your personal mentor assistant." + var/datum/action/innate/mrat_costume/costume var/datum/action/innate/mrat_leave/leave + var/list/icons_available = list() + var/current_costume = FALSE + +/mob/camera/imaginary_friend/mrat/proc/update_available_icons() + icons_available = list() + + icons_available += list("Mouse" = image(icon = 'icons/mob/animal.dmi', icon_state = "mouse_white")) + icons_available += list("Moonrat" = image(icon = 'yogstation/icons/mob/pets.dmi', icon_state = "moonrat")) + icons_available += list("Hologram" = image(icon = 'icons/mob/ai.dmi', icon_state = "default")) + icons_available += list("Spaceman" = image(icon = 'icons/mob/animal.dmi', icon_state = "old")) + icons_available += list("Cheese" = image(icon = 'icons/mob/animal.dmi', icon_state = "parmesan")) + +/mob/camera/imaginary_friend/mrat/proc/Costume() + update_available_icons() + if(icons_available) + var/selection = show_radial_menu(src, src, icons_available, radius = 38) + if(!selection) + return + + current_costume = selection + + switch(selection) + if("Mouse") + human_image = icon('icons/mob/animal.dmi', icon_state = "mouse_white") + color = "#1ABC9C" + Show() + if("Moonrat") + human_image = icon('yogstation/icons/mob/pets.dmi', icon_state = "moonrat") + color = "#1ABC9C" + Show() + if("Hologram") + human_image = icon('icons/mob/ai.dmi', icon_state = "default") + color = "#1ABC9C" + Show() + if("Spaceman") + human_image = icon('icons/mob/animal.dmi', icon_state = "old") + color = null + Show() + if("Cheese") + human_image = icon('icons/mob/animal.dmi', icon_state = "parmesan") + color = null + Show() + +/mob/camera/imaginary_friend/mrat/friend_talk() + . = ..() + if(!current_costume) + return + switch(current_costume) + if("Mouse") + SEND_SOUND(owner, sound('sound/effects/mousesqueek.ogg')) + SEND_SOUND(src, sound('sound/effects/mousesqueek.ogg')) + if("Moonrat") + SEND_SOUND(owner, sound('sound/machines/uplinkpurchase.ogg')) + SEND_SOUND(src, sound('sound/machines/uplinkpurchase.ogg')) + if("Hologram") + SEND_SOUND(owner, sound('sound/machines/ping.ogg')) + SEND_SOUND(src, sound('sound/machines/ping.ogg')) + if("Spaceman") + SEND_SOUND(owner, sound('sound/machines/buzz-sigh.ogg')) + SEND_SOUND(src, sound('sound/machines/buzz-sigh.ogg')) + if("Cheese") + SEND_SOUND(owner, sound('sound/misc/soggy.ogg')) + SEND_SOUND(src, sound('sound/misc/soggy.ogg')) /mob/camera/imaginary_friend/mrat/greet() to_chat(src, "You are the mentor rat of [owner]!") @@ -37,12 +106,24 @@ /mob/camera/imaginary_friend/mrat/Initialize(mapload, _trauma) . = ..() - color = "#1ABC9C" + costume = new + costume.Grant(src) leave = new leave.Grant(src) /mob/camera/imaginary_friend/mrat/setup_friend() - human_image = icon('icons/mob/animal.dmi', icon_state = "mouse_gray") + human_image = null + +/datum/action/innate/mrat_costume + name = "Change Appearance" + desc = "Shape your appearance to whatever you desire." + icon_icon = 'icons/mob/actions/actions_minor_antag.dmi' + background_icon_state = "bg_revenant" + button_icon_state = "ninja_phase" + +/datum/action/innate/mrat_costume/Activate() + var/mob/camera/imaginary_friend/mrat/I = owner + I.Costume() /datum/action/innate/mrat_leave name = "Leave" @@ -53,6 +134,8 @@ /datum/action/innate/mrat_leave/Activate() var/mob/camera/imaginary_friend/I = owner + to_chat(I, "You have ejected yourself from [I.owner].") + to_chat(I.owner, "Your mentor has left.") qdel(I.trauma) /mob/camera/imaginary_friend/mrat/pointed(atom/A as mob|obj|turf in view()) diff --git a/yogstation/code/modules/mentor/mentor_verbs.dm b/yogstation/code/modules/mentor/mentor_verbs.dm index 1234f67f7c5e..946ae9e6a2eb 100644 --- a/yogstation/code/modules/mentor/mentor_verbs.dm +++ b/yogstation/code/modules/mentor/mentor_verbs.dm @@ -85,7 +85,7 @@ GLOBAL_PROTECT(mentor_verbs) return if(M.has_trauma_type(/datum/brain_trauma/special/imaginary_friend/mrat)) - to_chat(src, "You already have or are requesting a mentor rat!") + to_chat(src, "You already have or are requesting a mentor!") return var/alertresult = alert(M, "This will create a rat-shaped avatar that a mentor can possess and guide you in person. Do you wish to continue?",,"Yes", "No")