mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Creep fluff completely rewritten (#42675)
* hang in there! * Apply suggestions from code review - rewrite P1 Co-Authored-By: tralezab <40974010+tralezab@users.noreply.github.com> * most creep > obsessed - rewrite P2 * removes creep_inlove, last edit to greet
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
/datum/brain_trauma/special/creep
|
||||
name = "Erotomania"
|
||||
/datum/brain_trauma/special/obsessed
|
||||
name = "Psychotic Schizophrenia"
|
||||
desc = "Patient has a subtype of delusional disorder, becoming irrationally attached to someone."
|
||||
scan_desc = "erotomaniac delusions"
|
||||
scan_desc = "psychotic schizophrenic delusions"
|
||||
gain_text = "If you see this message, make a github issue report. The trauma initialized wrong."
|
||||
lose_text = "<span class='warning'>You no longer feel so attached.</span>"
|
||||
lose_text = "<span class='warning'>The voices in your head fall silent.</span>"
|
||||
can_gain = TRUE
|
||||
random_gain = FALSE
|
||||
resilience = TRAUMA_RESILIENCE_SURGERY
|
||||
var/mob/living/obsession
|
||||
var/datum/objective/spendtime/attachedcreepobj
|
||||
var/datum/antagonist/creep/antagonist
|
||||
var/datum/objective/spendtime/attachedobsessedobj
|
||||
var/datum/antagonist/obsessed/antagonist
|
||||
var/viewing = FALSE //it's a lot better to store if the owner is watching the obsession than checking it twice between two procs
|
||||
|
||||
var/total_time_creeping = 0 //just for roundend fun
|
||||
var/time_spent_away = 0
|
||||
var/obsession_hug_count = 0
|
||||
|
||||
/datum/brain_trauma/special/creep/on_gain()
|
||||
/datum/brain_trauma/special/obsessed/on_gain()
|
||||
|
||||
//setup, linking, etc//
|
||||
if(!obsession)//admins didn't set one
|
||||
@@ -24,17 +24,16 @@
|
||||
if(!obsession)//we didn't find one
|
||||
lose_text = ""
|
||||
qdel(src)
|
||||
gain_text = "<span class='warning'>You feel a strange attachment to [obsession].</span>"
|
||||
owner.apply_status_effect(STATUS_EFFECT_INLOVE, obsession)
|
||||
owner.mind.add_antag_datum(/datum/antagonist/creep)
|
||||
antagonist = owner.mind.has_antag_datum(/datum/antagonist/creep)
|
||||
gain_text = "<span class='warning'>You hear a sickening, raspy voice in your head. It wants one small task of you...</span>"
|
||||
owner.mind.add_antag_datum(/datum/antagonist/obsessed)
|
||||
antagonist = owner.mind.has_antag_datum(/datum/antagonist/obsessed)
|
||||
antagonist.trauma = src
|
||||
..()
|
||||
//antag stuff//
|
||||
antagonist.forge_objectives(obsession.mind)
|
||||
antagonist.greet()
|
||||
|
||||
/datum/brain_trauma/special/creep/on_life()
|
||||
/datum/brain_trauma/special/obsessed/on_life()
|
||||
if(!obsession || obsession.stat == DEAD)
|
||||
viewing = FALSE//important, makes sure you no longer stutter when happy if you murdered them while viewing
|
||||
return
|
||||
@@ -50,12 +49,12 @@
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "creeping", /datum/mood_event/creeping, obsession.name)
|
||||
total_time_creeping += 20
|
||||
time_spent_away = 0
|
||||
if(attachedcreepobj)//if an objective needs to tick down, we can do that since traumas coexist with the antagonist datum
|
||||
attachedcreepobj.timer -= 20 //mob subsystem ticks every 2 seconds(?), remove 20 deciseconds from the timer. sure, that makes sense.
|
||||
if(attachedobsessedobj)//if an objective needs to tick down, we can do that since traumas coexist with the antagonist datum
|
||||
attachedobsessedobj.timer -= 20 //mob subsystem ticks every 2 seconds(?), remove 20 deciseconds from the timer. sure, that makes sense.
|
||||
else
|
||||
out_of_view()
|
||||
|
||||
/datum/brain_trauma/special/creep/proc/out_of_view()
|
||||
/datum/brain_trauma/special/obsessed/proc/out_of_view()
|
||||
time_spent_away += 20
|
||||
if(time_spent_away > 1800) //3 minutes
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "creeping", /datum/mood_event/notcreepingsevere, obsession.name)
|
||||
@@ -63,10 +62,9 @@
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "creeping", /datum/mood_event/notcreeping, obsession.name)
|
||||
/datum/brain_trauma/special/creep/on_lose()
|
||||
..()
|
||||
owner.remove_status_effect(STATUS_EFFECT_INLOVE)
|
||||
owner.mind.remove_antag_datum(/datum/antagonist/creep)
|
||||
owner.mind.remove_antag_datum(/datum/antagonist/obsessed)
|
||||
|
||||
/datum/brain_trauma/special/creep/on_say(message)
|
||||
/datum/brain_trauma/special/obsessed/on_say(message)
|
||||
if(!viewing)
|
||||
return message
|
||||
var/choked_up
|
||||
@@ -78,11 +76,11 @@
|
||||
return ""
|
||||
return message
|
||||
|
||||
/datum/brain_trauma/special/creep/on_hug(mob/living/hugger, mob/living/hugged)
|
||||
/datum/brain_trauma/special/obsessed/on_hug(mob/living/hugger, mob/living/hugged)
|
||||
if(hugged == obsession)
|
||||
obsession_hug_count++
|
||||
|
||||
/datum/brain_trauma/special/creep/proc/social_interaction()
|
||||
/datum/brain_trauma/special/obsessed/proc/social_interaction()
|
||||
var/fail = FALSE //whether you can finish a sentence while doing it
|
||||
owner.stuttering = max(3, owner.stuttering)
|
||||
owner.blur_eyes(10)
|
||||
@@ -106,7 +104,7 @@
|
||||
return fail
|
||||
|
||||
|
||||
/datum/brain_trauma/special/creep/proc/find_obsession()
|
||||
/datum/brain_trauma/special/obsessed/proc/find_obsession()
|
||||
var/chosen_victim
|
||||
var/list/possible_targets = list()
|
||||
var/list/viable_minds = list()
|
||||
|
||||
Reference in New Issue
Block a user