This repository was archived by the owner on May 22, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 456
[Bounty] mrat #11876
Merged
Merged
[Bounty] mrat #11876
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b368786
initial commit
ynot01 79238a6
fixes a whole buncha things
ynot01 e757fd6
changes proc to verb
ynot01 da377bd
fixes a bunch of other things
ynot01 4058ac1
humans only
ynot01 974a389
more things see desc
ynot01 0fb7418
mcolor
ynot01 4e737cd
radial appearance options, more adjustments
ynot01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| /datum/brain_trauma/special/imaginary_friend/mrat | ||
| name = "Epistemania" | ||
| desc = "Patient suffers from a manic pursuit of knowlewdge." | ||
| scan_desc = "epistemania" | ||
| gain_text = "<span class='notice'>Requesting mentor...</span>" | ||
| lose_text = "" | ||
| 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 | ||
|
|
||
| var/mob/camera/imaginary_friend/mrat/I = friend | ||
| I.Costume() | ||
|
|
||
| friend_initialized = TRUE | ||
| to_chat(owner, "<span class='notice'>You have acquired the mentor rat [friend.key], ask them any question you like. They will leave your presence when they are done.</span>") | ||
| else | ||
ynot01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| to_chat(owner, "<span class='warning'>No mentor responded to your request. Try again later.</span>") | ||
| qdel(src) | ||
|
|
||
| /mob/camera/imaginary_friend/mrat | ||
| name = "Mentor Rat" | ||
| real_name = "Mentor Rat" | ||
| 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, "<span class='notice'><b>You are the mentor rat of [owner]!</b></span>") | ||
| to_chat(src, "<span class='notice'>Do not give [owner] any OOC information from your time as a ghost.</span>") | ||
| to_chat(src, "<span class='notice'>Your job is to answer [owner]'s question(s) and you are given this form to assist in that.</span>") | ||
| to_chat(src, "<span class='notice'>Don't be stupid with this or you will face the consequences.</span>") | ||
|
|
||
| /mob/camera/imaginary_friend/mrat/Initialize(mapload, _trauma) | ||
| . = ..() | ||
| costume = new | ||
| costume.Grant(src) | ||
| leave = new | ||
| leave.Grant(src) | ||
|
|
||
| /mob/camera/imaginary_friend/mrat/setup_friend() | ||
| 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" | ||
| 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 | ||
| to_chat(I, "<span class='warning'>You have ejected yourself from [I.owner].</span>") | ||
| to_chat(I.owner, "<span class='warning'>Your mentor has left.</span>") | ||
| qdel(I.trauma) | ||
|
|
||
| /mob/camera/imaginary_friend/mrat/pointed(atom/A as mob|obj|turf in view()) | ||
| if(!..()) | ||
| return FALSE | ||
| to_chat(owner, "<b>[src]</b> points at [A].") | ||
| to_chat(src, "<span class='notice'>You point at [A].</span>") | ||
| return TRUE | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.