From 37266978497a5ee69b15fa13ee8a99a0c0f186f6 Mon Sep 17 00:00:00 2001 From: Coll6 Date: Sun, 24 Nov 2024 13:32:13 -0700 Subject: [PATCH 1/5] Adds Membrane Murmur to oozling cores --- .../modules/smithing/oozelings/actions.dm | 36 +++++++++++++++++++ .../modules/smithing/oozelings/body/organs.dm | 6 ++++ 2 files changed, 42 insertions(+) diff --git a/monkestation/code/modules/smithing/oozelings/actions.dm b/monkestation/code/modules/smithing/oozelings/actions.dm index f9442a366d20..ec44e57d5fba 100644 --- a/monkestation/code/modules/smithing/oozelings/actions.dm +++ b/monkestation/code/modules/smithing/oozelings/actions.dm @@ -171,3 +171,39 @@ else to_chat(owner, span_notice("You fine-tune the electromagnetic signals from your core to be picked up by GPS receivers upon it's rejection.")) core.gps_active = TRUE +/////// +/// MEMBRANE MURMUR SPELL +/// Use your core to attempt to call out for help or attention. +/datum/action/cooldown/spell/membrane_murmur + name = "Membrane Murmur" + desc = "Force your core to pass gasses to make noticable sounds." + button_icon = 'icons/mob/actions/actions_slime.dmi' + button_icon_state = "gel_cocoon" + background_icon_state = "bg_alien" + overlay_icon_state = "bg_alien_border" + + cooldown_time = 25 SECONDS + check_flags = NONE + spell_requirements = SPELL_CASTABLE_AS_BRAIN + +/datum/action/cooldown/spell/membrane_murmur/cast(obj/item/organ/internal/brain = usr) + . = ..() + var/bubble = "slime" + var/message = list( + "Blorp... glub... help...", + "Glooop... save me...", + "Alone... burbble too quiet...", + "What’s left... of me...?", + "Can’t feel... can’t... think...", + "Plasma... need... plasma...", + "It’s so... quiet..." + ) + + if(istype(brain, /obj/item/organ/internal/brain/slime)) + var/obj/item/organ/internal/brain/slime/talkingbrain = brain + if(istype(usr, /mob/living/brain) && talkingbrain.brainmob == usr) + talkingbrain.say(pick(message), bubble,list(), TRUE, null, FALSE, null, FALSE, 2, null) + else + return FALSE + else + return FALSE diff --git a/monkestation/code/modules/smithing/oozelings/body/organs.dm b/monkestation/code/modules/smithing/oozelings/body/organs.dm index 6d91bd2b2c3c..3aad5ce9c2a7 100644 --- a/monkestation/code/modules/smithing/oozelings/body/organs.dm +++ b/monkestation/code/modules/smithing/oozelings/body/organs.dm @@ -69,8 +69,12 @@ var/rebuilt = TRUE var/coredeath = TRUE + var/datum/action/cooldown/spell/membrane_murmur/membrane_mur + /obj/item/organ/internal/brain/slime/Initialize(mapload, mob/living/carbon/organ_owner, list/examine_list) . = ..() + membrane_mur = new /datum/action/cooldown/spell/membrane_murmur() + ADD_TRAIT(src, TRAIT_CASTABLE_LOC, INNATE_TRAIT) colorize() transform.Scale(2, 2) @@ -165,6 +169,7 @@ AddComponent(/datum/component/gps, "[victim]'s Core") if(brainmob) + membrane_mur.Grant(brainmob) var/datum/antagonist/changeling/target_ling = brainmob.mind?.has_antag_datum(/datum/antagonist/changeling) if(target_ling) @@ -283,6 +288,7 @@ new_body.visible_message(span_warning("[new_body]'s body fully forms from [new_body.p_their()] core!")) to_chat(owner, span_purple("Your body fully forms from your core!")) + membrane_mur.Remove(brainmob) brainmob?.mind?.transfer_to(new_body) new_body.grab_ghost() transfer_observers_to(new_body) From 43549bc38fd525d3012019f0d867c230a30f88af Mon Sep 17 00:00:00 2001 From: Coll6 Date: Wed, 27 Nov 2024 02:41:03 -0700 Subject: [PATCH 2/5] Ability clean up when brain deleted --- monkestation/code/modules/smithing/oozelings/body/organs.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monkestation/code/modules/smithing/oozelings/body/organs.dm b/monkestation/code/modules/smithing/oozelings/body/organs.dm index 3aad5ce9c2a7..f4b4c73da95d 100644 --- a/monkestation/code/modules/smithing/oozelings/body/organs.dm +++ b/monkestation/code/modules/smithing/oozelings/body/organs.dm @@ -71,6 +71,10 @@ var/datum/action/cooldown/spell/membrane_murmur/membrane_mur +/obj/item/organ/internal/brain/slime/Destroy(force) + QDEL_NULL(membrane_mur) + return ..() + /obj/item/organ/internal/brain/slime/Initialize(mapload, mob/living/carbon/organ_owner, list/examine_list) . = ..() membrane_mur = new /datum/action/cooldown/spell/membrane_murmur() From efb8ff9d08606e4b8ea2cb2ed6a6363d48114d63 Mon Sep 17 00:00:00 2001 From: Coll6 Date: Wed, 27 Nov 2024 10:20:25 -0700 Subject: [PATCH 3/5] Moved ability to cooldown removing unneded checks --- .../modules/smithing/oozelings/actions.dm | 32 ++++++++++--------- .../modules/smithing/oozelings/body/organs.dm | 11 +++---- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/monkestation/code/modules/smithing/oozelings/actions.dm b/monkestation/code/modules/smithing/oozelings/actions.dm index ec44e57d5fba..c7587c7a9075 100644 --- a/monkestation/code/modules/smithing/oozelings/actions.dm +++ b/monkestation/code/modules/smithing/oozelings/actions.dm @@ -174,7 +174,7 @@ /////// /// MEMBRANE MURMUR SPELL /// Use your core to attempt to call out for help or attention. -/datum/action/cooldown/spell/membrane_murmur +/datum/action/cooldown/membrane_murmur name = "Membrane Murmur" desc = "Force your core to pass gasses to make noticable sounds." button_icon = 'icons/mob/actions/actions_slime.dmi' @@ -184,26 +184,28 @@ cooldown_time = 25 SECONDS check_flags = NONE - spell_requirements = SPELL_CASTABLE_AS_BRAIN -/datum/action/cooldown/spell/membrane_murmur/cast(obj/item/organ/internal/brain = usr) - . = ..() - var/bubble = "slime" - var/message = list( + var/static/list/possible_cries = list( "Blorp... glub... help...", "Glooop... save me...", "Alone... burbble too quiet...", "What’s left... of me...?", "Can’t feel... can’t... think...", "Plasma... need... plasma...", - "It’s so... quiet..." - ) + "It’s so... quiet...", + ) - if(istype(brain, /obj/item/organ/internal/brain/slime)) - var/obj/item/organ/internal/brain/slime/talkingbrain = brain - if(istype(usr, /mob/living/brain) && talkingbrain.brainmob == usr) - talkingbrain.say(pick(message), bubble,list(), TRUE, null, FALSE, null, FALSE, 2, null) - else +/datum/action/cooldown/membrane_murmur/IsAvailable(feedback = FALSE) + . = ..() + if(.) + var/mob/living/brain/brainmob = owner + if(!istype(brainmob) || !istype(brainmob.loc, /obj/item/organ/internal/brain/slime)) return FALSE - else - return FALSE + +/datum/action/cooldown/membrane_murmur/Activate() + . = ..() + var/mob/living/brain/brainmob = owner + if(!istype(brainmob)) + CRASH("[src] cast by non-brainmob [owner?.type || "(null)"]") + var/obj/item/organ/internal/brain/slime/brainitem = brainmob.loc + brainitem.say(pick(possible_cries), "slime", forced = "[src]", message_range = 2) diff --git a/monkestation/code/modules/smithing/oozelings/body/organs.dm b/monkestation/code/modules/smithing/oozelings/body/organs.dm index f4b4c73da95d..bc0c3376c339 100644 --- a/monkestation/code/modules/smithing/oozelings/body/organs.dm +++ b/monkestation/code/modules/smithing/oozelings/body/organs.dm @@ -69,16 +69,15 @@ var/rebuilt = TRUE var/coredeath = TRUE - var/datum/action/cooldown/spell/membrane_murmur/membrane_mur + var/datum/action/cooldown/membrane_murmur/membrane_mur -/obj/item/organ/internal/brain/slime/Destroy(force) - QDEL_NULL(membrane_mur) +/obj/item/organ/internal/brain/slime/Destroy(force) + QDEL_NULL(membrane_mur) return ..() - + /obj/item/organ/internal/brain/slime/Initialize(mapload, mob/living/carbon/organ_owner, list/examine_list) . = ..() - membrane_mur = new /datum/action/cooldown/spell/membrane_murmur() - ADD_TRAIT(src, TRAIT_CASTABLE_LOC, INNATE_TRAIT) + membrane_mur = new /datum/action/cooldown/membrane_murmur() colorize() transform.Scale(2, 2) From 3b887f7da969911e6fbc2055e947c8695a5c6ea9 Mon Sep 17 00:00:00 2001 From: Coll6 Date: Wed, 27 Nov 2024 10:41:26 -0700 Subject: [PATCH 4/5] Adds Ellipsis filter to the message picked. --- monkestation/code/modules/smithing/oozelings/actions.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkestation/code/modules/smithing/oozelings/actions.dm b/monkestation/code/modules/smithing/oozelings/actions.dm index c7587c7a9075..4ed04d749891 100644 --- a/monkestation/code/modules/smithing/oozelings/actions.dm +++ b/monkestation/code/modules/smithing/oozelings/actions.dm @@ -208,4 +208,5 @@ if(!istype(brainmob)) CRASH("[src] cast by non-brainmob [owner?.type || "(null)"]") var/obj/item/organ/internal/brain/slime/brainitem = brainmob.loc - brainitem.say(pick(possible_cries), "slime", forced = "[src]", message_range = 2) + var/final_cry = brainmob.Ellipsis(pick(possible_cries), chance = 30) + brainitem.say(final_cry, "slime", forced = "[src]", message_range = 2) From 45d2eee33a9fce51ba6e48ced77ede50459f064c Mon Sep 17 00:00:00 2001 From: Coll6 Date: Sat, 30 Nov 2024 06:14:07 -0700 Subject: [PATCH 5/5] Slight organization. --- .../code/modules/smithing/oozelings/body/organs.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monkestation/code/modules/smithing/oozelings/body/organs.dm b/monkestation/code/modules/smithing/oozelings/body/organs.dm index bc0c3376c339..6e33ac028af9 100644 --- a/monkestation/code/modules/smithing/oozelings/body/organs.dm +++ b/monkestation/code/modules/smithing/oozelings/body/organs.dm @@ -71,16 +71,16 @@ var/datum/action/cooldown/membrane_murmur/membrane_mur -/obj/item/organ/internal/brain/slime/Destroy(force) - QDEL_NULL(membrane_mur) - return ..() - /obj/item/organ/internal/brain/slime/Initialize(mapload, mob/living/carbon/organ_owner, list/examine_list) . = ..() membrane_mur = new /datum/action/cooldown/membrane_murmur() colorize() transform.Scale(2, 2) +/obj/item/organ/internal/brain/slime/Destroy(force) + QDEL_NULL(membrane_mur) + return ..() + /obj/item/organ/internal/brain/slime/examine() . = ..() if(gps_active)