From 91aad127dd3045436fdf99cd015f7ef8f6f53826 Mon Sep 17 00:00:00 2001
From: Ghom <42542238+Ghommie@users.noreply.github.com>
Date: Wed, 25 Mar 2020 13:54:41 +0100
Subject: [PATCH 1/6] Quick webedit fixing an issue with the split personality.
---
code/datums/brain_damage/split_personality.dm | 21 ++++++++-----------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/code/datums/brain_damage/split_personality.dm b/code/datums/brain_damage/split_personality.dm
index 6586a065d0..1115a878f8 100644
--- a/code/datums/brain_damage/split_personality.dm
+++ b/code/datums/brain_damage/split_personality.dm
@@ -20,6 +20,7 @@
..()
make_backseats()
get_ghost()
+ RegisterSignal(M, COMSIG_MOB_DEATH, .proc/revert_to_normal)
/datum/brain_trauma/severe/split_personality/proc/make_backseats()
stranger_backseat = new(owner, src)
@@ -37,23 +38,23 @@
qdel(src)
/datum/brain_trauma/severe/split_personality/on_life()
- if(owner.stat == DEAD)
- if(current_controller != OWNER)
- switch_personalities()
- qdel(src)
- else if(prob(3))
+ if(prob(3))
switch_personalities()
..()
/datum/brain_trauma/severe/split_personality/on_lose()
if(current_controller != OWNER) //it would be funny to cure a guy only to be left with the other personality, but it seems too cruel
- switch_personalities()
+ switch_personalities(TRUE)
QDEL_NULL(stranger_backseat)
QDEL_NULL(owner_backseat)
+ UnregisterSignal(M, COMSIG_MOB_DEATH)
..()
-/datum/brain_trauma/severe/split_personality/proc/switch_personalities()
- if(QDELETED(owner) || owner.stat == DEAD || QDELETED(stranger_backseat) || QDELETED(owner_backseat))
+/datum/brain_trauma/severe/split_personality/proc/revert_to_normal()
+ qdel(src)
+
+/datum/brain_trauma/severe/split_personality/proc/switch_personalities(forced = FALSE)
+ if(QDELETED(owner) || (owner.stat == DEAD && !forced) || QDELETED(stranger_backseat) || QDELETED(owner_backseat))
return
var/mob/living/split_personality/current_backseat
@@ -126,10 +127,6 @@
if(QDELETED(body))
qdel(src) //in case trauma deletion doesn't already do it
- if((body.stat == DEAD && trauma.owner_backseat == src))
- trauma.switch_personalities()
- qdel(trauma)
-
//if one of the two ghosts, the other one stays permanently
if(!body.client && trauma.initialized)
trauma.switch_personalities()
From 3c42e9eefd14f0944d2a9c46a3de4f33ba95826a Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Thu, 26 Mar 2020 23:22:51 +0100
Subject: [PATCH 2/6] Moderately unoriginal PR title about runtime errors.
---
code/modules/client/preferences.dm | 2 ++
code/modules/mob/living/brain/brain_item.dm | 2 +-
code/modules/mob/living/carbon/carbon.dm | 2 ++
code/modules/mob/living/living.dm | 2 +-
code/modules/projectiles/guns/energy.dm | 8 ++++----
.../code/datums/status_effects/chems.dm | 20 +++++++++----------
6 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 87330ce42c..23f45de99b 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -2131,6 +2131,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
toggles ^= MEMBER_PUBLIC
if("gender")
var/chosengender = input(user, "Select your character's gender.", "Gender Selection", gender) as null|anything in list(MALE,FEMALE,"nonbinary","object")
+ if(!chosengender)
+ return
switch(chosengender)
if("nonbinary")
chosengender = PLURAL
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index 3b64c35969..f32d84ae73 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -88,7 +88,7 @@
brainmob.stored_dna = new /datum/dna/stored(brainmob)
C.dna.copy_dna(brainmob.stored_dna)
if(HAS_TRAIT(L, TRAIT_NOCLONE))
- brainmob.status_traits[TRAIT_NOCLONE] = L.status_traits[TRAIT_NOCLONE]
+ LAZYSET(brainmob.status_traits, TRAIT_NOCLONE, L.status_traits[TRAIT_NOCLONE])
var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE)
if(ZI)
brainmob.set_species(ZI.old_species) //For if the brain is cloned
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 938f6531f1..8270bc7156 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -283,6 +283,8 @@
/mob/living/carbon/resist_buckle()
. = FALSE
+ if(!buckled)
+ return
if(restrained())
// too soon.
if(last_special > world.time)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 1309fae60c..2002fa638b 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -715,7 +715,7 @@
return TRUE
/mob/living/proc/resist_buckle()
- buckled.user_unbuckle_mob(src,src)
+ buckled?.user_unbuckle_mob(src,src)
/mob/living/proc/resist_fire()
return
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index be43bc48fd..36a9bba295 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -65,10 +65,10 @@
update_icon()
/obj/item/gun/energy/Destroy()
- if(flags_1 & INITIALIZED_1)
- QDEL_NULL(cell)
- QDEL_LIST(ammo_type)
- STOP_PROCESSING(SSobj, src)
+ //no need to delete them, since contents are already deleted in atom/movable/Destroy().
+ cell = null
+ ammo_type = null
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/examine(mob/user)
diff --git a/modular_citadel/code/datums/status_effects/chems.dm b/modular_citadel/code/datums/status_effects/chems.dm
index 82b3c39bb6..369fb377a5 100644
--- a/modular_citadel/code/datums/status_effects/chems.dm
+++ b/modular_citadel/code/datums/status_effects/chems.dm
@@ -23,11 +23,10 @@
owner.remove_status_effect(src)
..()
-/datum/status_effect/chem/SGDF/on_remove(mob/living/carbon/M)
+/datum/status_effect/chem/SGDF/on_remove()
log_game("FERMICHEM: SGDF mind shift applied. [owner] is now playing as their clone and should not have memories after their clone split (look up SGDF status applied). ID: [owner.key]")
originalmind.transfer_to(fermi_Clone)
to_chat(owner, "Lucidity shoots to your previously blank mind as your mind suddenly finishes the cloning process. You marvel for a moment at yourself, as your mind subconciously recollects all your memories up until the point when you cloned yourself. Curiously, you find that you memories are blank after you ingested the synthetic serum, leaving you to wonder where the other you is.")
- to_chat(M, "Lucidity shoots to your previously blank mind as your mind suddenly finishes the cloning process. You marvel for a moment at yourself, as your mind subconciously recollects all your memories up until the point when you cloned yourself. Curiously, you find that you memories are blank after you ingested the synthetic serum, leaving you to wonder where the other you is.")
fermi_Clone = null
return ..()
@@ -193,15 +192,14 @@
log_game("FERMICHEM: [M]'s possesser has been booted out into a astral ghost!")
originalmind.transfer_to(original)
-/datum/status_effect/chem/astral_insurance/on_remove(mob/living/carbon/M) //God damnit get them home!
- if(owner.mind == originalmind) //If they're home, HOORAY
- return ..()
- if(owner.mind)
- var/mob/living/simple_animal/astral/G = new(get_turf(M.loc))
- owner.mind.transfer_to(G)//Just in case someone else is inside of you, it makes them a ghost and should hopefully bring them home at the end.
- to_chat(G, "[M]'s conciousness snaps back to them as their astrogen runs out, kicking your projected mind out!'")
- log_game("FERMICHEM: [M]'s possesser has been booted out into a astral ghost!")
- originalmind.transfer_to(original)
+/datum/status_effect/chem/astral_insurance/on_remove() //God damnit get them home!
+ if(owner.mind != originalmind) //If they're home, HOORAY
+ if(owner.mind)
+ var/mob/living/simple_animal/astral/G = new(get_turf(owner))
+ owner.mind.transfer_to(G)//Just in case someone else is inside of you, it makes them a ghost and should hopefully bring them home at the end.
+ to_chat(G, "[owner]'s conciousness snaps back to them as their astrogen runs out, kicking your projected mind out!'")
+ log_game("FERMICHEM: [owner]'s possesser has been booted out into a astral ghost!")
+ originalmind.transfer_to(original)
return ..()
/*//////////////////////////////////////////
From aa07bf262a3191c96ed383b2fa4da6896cf81056 Mon Sep 17 00:00:00 2001
From: BlackMajor
Date: Fri, 27 Mar 2020 20:32:53 +1300
Subject: [PATCH 3/6] lmao one line fix
---
code/game/objects/structures/crates_lockers/closets.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 71fcef753c..a9e7347657 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -441,7 +441,7 @@
/obj/structure/closet/relaymove(mob/user)
if(user.stat || !isturf(loc) || !isliving(user))
return
- if(locked)
+ if(locked || welded)
if(message_cooldown <= world.time)
message_cooldown = world.time + 50
to_chat(user, "[src]'s door won't budge!")
From 1a6107a51846085dcc24fca70d3acf82049699c7 Mon Sep 17 00:00:00 2001
From: Putnam3145
Date: Fri, 27 Mar 2020 06:03:05 -0700
Subject: [PATCH 4/6] Removed nymphomania, plus code cleanup (#11641)
---
code/controllers/subsystem/processing/quirks.dm | 6 +++---
code/datums/traits/neutral.dm | 8 --------
code/modules/client/preferences_savefile.dm | 1 -
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm
index 5aeaf43bab..c57bac5526 100644
--- a/code/controllers/subsystem/processing/quirks.dm
+++ b/code/controllers/subsystem/processing/quirks.dm
@@ -37,11 +37,11 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
if(job?.blacklisted_quirks)
cut = filter_quirks(my_quirks, job.blacklisted_quirks)
for(var/V in my_quirks)
- var/datum/quirk/Q = quirks[V]
- if(Q)
+ if(V in quirks)
+ var/datum/quirk/Q = quirks[V]
user.add_quirk(Q, spawn_effects)
else
- stack_trace("Invalid quirk \"[V]\" in client [cli.ckey] preferences")
+ log_admin("Invalid quirk \"[V]\" in client [cli.ckey] preferences")
cli.prefs.all_quirks -= V
badquirk = TRUE
if(badquirk)
diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm
index ab2a69e7e9..d1b5240798 100644
--- a/code/datums/traits/neutral.dm
+++ b/code/datums/traits/neutral.dm
@@ -88,14 +88,6 @@
if(quirk_holder)
quirk_holder.remove_client_colour(/datum/client_colour/monochrome)
-/datum/quirk/libido
- name = "Nymphomania"
- desc = "You're always feeling a bit in heat. Also, you get aroused faster than usual."
- value = 0
- mob_trait = TRAIT_PERMABONER
- gain_text = "You are feeling extra wild."
- lose_text = "You don't feel that burning sensation anymore."
-
/datum/quirk/maso
name = "Masochism"
desc = "You are aroused by pain."
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index 749ac8c6db..7858bc099b 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -438,7 +438,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Citadel code
S["feature_genitals_use_skintone"] >> features["genitals_use_skintone"]
- S["feature_exhibitionist"] >> features["exhibitionist"]
S["feature_mcolor2"] >> features["mcolor2"]
S["feature_mcolor3"] >> features["mcolor3"]
S["feature_mam_body_markings"] >> features["mam_body_markings"]
From bff77480d1d34172e3356ff938fb69c2c977ae78 Mon Sep 17 00:00:00 2001
From: CitadelStationBot
Date: Fri, 27 Mar 2020 08:03:08 -0500
Subject: [PATCH 5/6] Automatic changelog generation for PR #11641 [ci skip]
---
html/changelogs/AutoChangeLog-pr-11641.yml | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 html/changelogs/AutoChangeLog-pr-11641.yml
diff --git a/html/changelogs/AutoChangeLog-pr-11641.yml b/html/changelogs/AutoChangeLog-pr-11641.yml
new file mode 100644
index 0000000000..27729e62e6
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-11641.yml
@@ -0,0 +1,6 @@
+author: "Putnam3145"
+delete-after: True
+changes:
+ - rscdel: "Nymphomania removed"
+ - code_imp: "Exhibitionism ignored by preferences now, since it was also removed"
+ - code_imp: "Quirk migration now does an admin log instead of a stack trace"
From 15895db20dc0f47f9c0d8ac56efec814b818bf11 Mon Sep 17 00:00:00 2001
From: CitadelStationBot
Date: Fri, 27 Mar 2020 18:32:32 -0500
Subject: [PATCH 6/6] Automatic changelog generation for PR #11614 [ci skip]
---
html/changelogs/AutoChangeLog-pr-11614.yml | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 html/changelogs/AutoChangeLog-pr-11614.yml
diff --git a/html/changelogs/AutoChangeLog-pr-11614.yml b/html/changelogs/AutoChangeLog-pr-11614.yml
new file mode 100644
index 0000000000..c478cc0df7
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-11614.yml
@@ -0,0 +1,4 @@
+author: "Ghommie"
+delete-after: True
+changes:
+ - bugfix: "Fixing an issue with the split personality removing the original owner from the round if the body died while the stranger was in control."