Skip to content

Commit

Permalink
Hallucinations Fixes & Tweaks (#3017)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
This PR resolves #1500,
finally allowing delusions to pass without the player having to relog
(Big thanks to GenericDM and Theos for the help here!)

This PR also changes the pool of delusions to be better suited towards
Shiptest's sensibilities.

Lastly, this PR ports
BeeStation/BeeStation-Hornet#10421, hopefully
allowing RDS to be treatable in-game again!
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
These bugs have been haunting RDS players for nearly two years straight.
I want it GONE. Plus, narrative consistency good.
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
fix: rds based delusions now pass without the player having to relog,
thank god
fix: rds can once again be treated with mindbreaker toxin (hopefully)
tweak: the pool of possible delusions has been changed to better reflect
shiptest's narrative
add: a base ramzi sprite to simple_human.dmi to be used in the changed
delusion pool
del: chat warning message for rds users not to grief. Just be cool about
it, okay?
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
Skies-Of-Blue authored May 31, 2024
1 parent 7e7ffe1 commit 1db1dda
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 41 deletions.
5 changes: 0 additions & 5 deletions code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,6 @@
/datum/quirk/insanity/proc/madness()
quirk_holder.hallucination += rand(10, 25)

/datum/quirk/insanity/post_add() //I don't /think/ we'll need this but for newbies who think "roleplay as insane" = "license to kill" it's probably a good thing to have
if(!quirk_holder.mind || quirk_holder.mind.special_role)
return
to_chat(quirk_holder, "<span class='big bold info'>Please note that your dissociation syndrome does NOT give you the right to attack people or otherwise cause any interference to \
the round. You are not an antagonist, and the rules will treat you the same as other crewmembers.</span>")

/datum/quirk/social_anxiety
name = "Social Anxiety"
Expand Down
69 changes: 34 additions & 35 deletions code/modules/flufftext/Hallucination.dm
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,11 @@ GLOBAL_LIST_INIT(hallucination_list, list(
/datum/hallucination/delusion
var/list/image/delusions = list()

/datum/hallucination/delusion/New(mob/living/carbon/C, forced, force_kind = null , duration = 300,skip_nearby = TRUE, custom_icon = null, custom_icon_file = null, custom_name = null)
/datum/hallucination/delusion/New(mob/living/carbon/C, forced, force_kind = null , duration = rand(30,300),skip_nearby = TRUE, custom_icon = null, custom_icon_file = null, custom_name = null)
set waitfor = FALSE
. = ..()
var/image/A = null
var/kind = force_kind ? force_kind : pick("nothing","monkey","corgi","carp","skeleton","demon","zombie")
var/kind = force_kind ? force_kind : pick("doe","mi-go","carp","hermit","frontiersman","ramzi")
feedback_details += "Type: [kind]"
var/list/nearby
if(skip_nearby)
Expand All @@ -540,36 +540,32 @@ GLOBAL_LIST_INIT(hallucination_list, list(
if(skip_nearby && (H in nearby))
continue
switch(kind)
if("nothing")
A = image('icons/effects/effects.dmi',H,"nothing")
A.name = "..."
if("monkey")//Monkey
A = image('icons/mob/monkey.dmi',H,"monkey1")
A.name = "Monkey ([rand(1,999)])"
if("doe")//Doe
A = image('icons/mob/animal.dmi',H,"deer-doe")
A.name = "Doe"
if("carp")//Carp
A = image('icons/mob/carp.dmi',H,"carp")
A.name = "Space Carp"
if("corgi")//Corgi
A = image('icons/mob/pets.dmi',H,"corgi")
A.name = "Corgi"
if("skeleton")//Skeletons
A = image('icons/mob/human.dmi',H,"skeleton")
A.name = "Skeleton"
if("zombie")//Zombies
A = image('icons/mob/human.dmi',H,"zombie")
A.name = "Zombie"
if("demon")//Demon
A = image('icons/mob/mob.dmi',H,"daemon")
A.name = "Demon"
if("mi-go")//Mi-go
A = image('icons/mob/animal.dmi',H,"mi-go")
A.name = "Mi-go"
if("hermit")//Hermit
A = image('icons/mob/simple_human.dmi',H,"survivor_gunslinger")
A.name = "Hermit Soldier"
if("frontiersman")//Frontiersman
A = image('icons/mob/simple_human.dmi',H,"frontiersmanrangedminigun")
A.name = "Frontiersman"
if("ramzi")//Ramzi
A = image('icons/mob/simple_human.dmi',H,"ramzi_base")
A.name = "Ramzi Commando"
if("custom")
A = image(custom_icon_file, H, custom_icon)
A.name = custom_name
A.override = 1
if(target.client)
delusions |= A
target.client.images |= A
if(duration)
QDEL_IN(src, duration)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), src), duration)

/datum/hallucination/delusion/Destroy()
for(var/image/I in delusions)
Expand All @@ -580,25 +576,28 @@ GLOBAL_LIST_INIT(hallucination_list, list(
/datum/hallucination/self_delusion
var/image/delusion

/datum/hallucination/self_delusion/New(mob/living/carbon/C, forced, force_kind = null , duration = 300, custom_icon = null, custom_icon_file = null, wabbajack = TRUE) //set wabbajack to false if you want to use another fake source
/datum/hallucination/self_delusion/New(mob/living/carbon/C, forced, force_kind = null , duration = rand(30,300), custom_icon = null, custom_icon_file = null, wabbajack = TRUE) //set wabbajack to false if you want to use another fake source
set waitfor = FALSE
..()
var/image/A = null
var/kind = force_kind ? force_kind : pick("monkey","corgi","carp","skeleton","demon","zombie","robot")
var/kind = force_kind ? force_kind : pick("doe","mi-go","carp","hermit","frontiersman","ramzi","pai","robot")
feedback_details += "Type: [kind]"
switch(kind)
if("monkey")//Monkey
A = image('icons/mob/monkey.dmi',target,"monkey1")
if("doe")//Doe
A = image('icons/mob/animal.dmi',target,"deer-doe")
if("carp")//Carp
A = image('icons/mob/animal.dmi',target,"carp")
if("corgi")//Corgi
A = image('icons/mob/pets.dmi',target,"corgi")
if("skeleton")//Skeletons
A = image('icons/mob/human.dmi',target,"skeleton")
if("zombie")//Zombies
A = image('icons/mob/human.dmi',target,"zombie")
if("demon")//Demon
A = image('icons/mob/mob.dmi',target,"daemon")
if("mi-go")//Mi-go
A = image('icons/mob/animal.dmi',target,"mi-go")
if("hermit")//Hermit
A = image('icons/mob/simple_human.dmi',target,"survivor_base")
if("frontiersman")//Frontiersman
A = image('icons/mob/simple_human.dmi',target,"frontiersmanranged")
if("ramzi")//Ramzi
A = image('icons/mob/simple_human.dmi',target,"ramzi_base")
if("pai")//pAI
A = image('icons/mob/pai.dmi',target,"repairbot")
target.playsound_local(target,'sound/effects/pai_boot.ogg', 75, 1)
if("robot")//Cyborg
A = image('icons/mob/robots.dmi',target,"robot")
target.playsound_local(target,'sound/voice/liveagain.ogg', 75, 1)
Expand All @@ -610,7 +609,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
to_chat(target, "<span class='hear'>...you look down and notice... you aren't the same as you used to be...</span>")
delusion = A
target.client.images |= A
QDEL_IN(src, duration)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), src), duration)

/datum/hallucination/self_delusion/Destroy()
if(target.client)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/reagents/chemistry/reagents/toxin_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@
taste_description = "sourness"

/datum/reagent/toxin/mindbreaker/on_mob_life(mob/living/carbon/M)
M.hallucination += 5
if(!M.has_quirk(/datum/quirk/insanity))
M.hallucination += 5
return ..()

/datum/reagent/toxin/plantbgone
Expand Down
Binary file modified icons/mob/simple_human.dmi
Binary file not shown.

0 comments on commit 1db1dda

Please sign in to comment.