From 216f5589a6bc69cb40f376153fc21dd62b9e20be Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Thu, 29 Feb 2024 00:49:27 -0500 Subject: [PATCH] [MIRROR] Temporary bees animate on death and no longer produce corpses (#1193) * Temporary bees animate on death and no longer produce corpses * Update mutations.dm --------- Co-authored-by: Jacquerel Co-authored-by: Mal <13398309+vinylspiders@users.noreply.github.com> --- .../temporary_visuals/miscellaneous.dm | 4 +- .../changeling/powers/mutations.dm | 124 ++++++++++++++++++ .../mob/living/basic/farm_animals/bee/_bee.dm | 22 +++- .../basic/lavaland/hivelord/hivelord.dm | 2 +- .../basic/lavaland/legion/legion_brood.dm | 2 +- .../modules/mob/living/carbon/alien/organs.dm | 1 - .../chemistry/recipes/pyrotechnics.dm | 2 +- 7 files changed, 146 insertions(+), 11 deletions(-) diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 05ecfeec2ba..f314cfac982 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -685,11 +685,11 @@ duration = 0.4 SECONDS /// Plays a dispersing animation on hivelord and legion minions so they don't just vanish -/obj/effect/temp_visual/hive_spawn_wither +/obj/effect/temp_visual/despawn_effect name = "withering spawn" duration = 1 SECONDS -/obj/effect/temp_visual/hive_spawn_wither/Initialize(mapload, atom/copy_from) +/obj/effect/temp_visual/despawn_effect/Initialize(mapload, atom/copy_from) if (isnull(copy_from)) . = ..() return INITIALIZE_HINT_QDEL diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 7ad2b14448c..63eacdb50a4 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -582,3 +582,127 @@ /obj/item/clothing/head/helmet/changeling/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) +<<<<<<< HEAD +======= + +/datum/action/changeling/suit/hive_head + name = "Hive Head" + desc = "We coat our head in a waxy outing coating similar to a bee hive which can be used to manufacture bees to attack our enemies. Costs 15 chemicals." + helptext = "While the hive head does not provide much in the ways of armor, it does allow the user to send bees out to attack targets. Reagents can poured inside the hive to cause all bees released to inject said reagents." + button_icon_state = "hive_head" + chemical_cost = 15 + dna_cost = 2 + req_human = FALSE + blood_on_castoff = TRUE + + helmet_type = /obj/item/clothing/head/helmet/changeling_hivehead + helmet_name_simple = "hive head" + +/obj/item/clothing/head/helmet/changeling_hivehead + name = "hive head" + desc = "A strange, waxy outer coating covering your head. Gives you tinnitus." + icon_state = "hivehead" + inhand_icon_state = null + flash_protect = FLASH_PROTECTION_FLASH + item_flags = DROPDEL + armor_type = /datum/armor/changeling_hivehead + flags_inv = HIDEEARS|HIDEHAIR|HIDEEYES|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT + actions_types = list(/datum/action/cooldown/hivehead_spawn_minions) + ///Does this hive head hold reagents? + var/holds_reagents = TRUE + +/obj/item/clothing/head/helmet/changeling_hivehead/Initialize(mapload) + . = ..() + if(holds_reagents) + create_reagents(50, REFILLABLE) + +/datum/armor/changeling_hivehead + melee = 10 + bullet = 10 + laser = 10 + energy = 10 + bio = 50 + +/obj/item/clothing/head/helmet/changeling_hivehead/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) + +/obj/item/clothing/head/helmet/changeling_hivehead/attackby(obj/item/attacking_item, mob/user, params) + . = ..() + if(!istype(attacking_item, /obj/item/organ/internal/monster_core/regenerative_core/legion) || !holds_reagents) + return + visible_message(span_boldwarning("As [user] shoves [attacking_item] into [src], [src] begins to mutate.")) + var/mob/living/carbon/wearer = loc + playsound(wearer, 'sound/effects/attackblob.ogg', 60, TRUE) + wearer.temporarilyRemoveItemFromInventory(wearer.head, TRUE) + wearer.equip_to_slot_if_possible(new /obj/item/clothing/head/helmet/changeling_hivehead/legion(wearer), ITEM_SLOT_HEAD, 1, 1, 1) + qdel(attacking_item) + + +/datum/action/cooldown/hivehead_spawn_minions + name = "Release Bees" + desc = "Release a group of bees to attack all other lifeforms." + background_icon_state = "bg_demon" + overlay_icon_state = "bg_demon_border" + button_icon = 'icons/mob/simple/bees.dmi' + button_icon_state = "queen_item" + cooldown_time = 30 SECONDS + ///The mob we're going to spawn + var/spawn_type = /mob/living/basic/bee/timed/short + ///How many are we going to spawn + var/spawn_count = 6 + +/datum/action/cooldown/hivehead_spawn_minions/PreActivate(atom/target) + if(owner.movement_type & VENTCRAWLING) + owner.balloon_alert(owner, "unavailable here") + return + return ..() + +/datum/action/cooldown/hivehead_spawn_minions/Activate(atom/target) + . = ..() + do_tell() + var/spawns = spawn_count + if(owner.stat >= HARD_CRIT) + spawns = 1 + for(var/i in 1 to spawns) + var/mob/living/basic/summoned_minion = new spawn_type(get_turf(owner)) + summoned_minion.faction = list("[REF(owner)]") + minion_additional_changes(summoned_minion) + +///Our tell that we're using this ability. Usually a sound and a visible message.area +/datum/action/cooldown/hivehead_spawn_minions/proc/do_tell() + owner.visible_message(span_warning("[owner]'s head begins to buzz as bees begin to pour out!"), span_warning("We release the bees."), span_hear("You hear a loud buzzing sound!")) + playsound(owner, 'sound/creatures/bee_swarm.ogg', 60, TRUE) + +///Stuff we want to do to our minions. This is in its own proc so subtypes can override this behaviour. +/datum/action/cooldown/hivehead_spawn_minions/proc/minion_additional_changes(mob/living/basic/minion) + var/mob/living/basic/bee/summoned_bee = minion + var/mob/living/carbon/wearer = owner + if(istype(summoned_bee) && length(wearer.head.reagents.reagent_list)) + summoned_bee.assign_reagent(pick(wearer.head.reagents.reagent_list)) + +/obj/item/clothing/head/helmet/changeling_hivehead/legion + name = "legion hive head" + desc = "A strange, boney coating covering your head with a fleshy inside. Surprisingly comfortable." + icon_state = "hivehead_legion" + actions_types = list(/datum/action/cooldown/hivehead_spawn_minions/legion) + holds_reagents = FALSE + +/datum/action/cooldown/hivehead_spawn_minions/legion + name = "Release Legion" + desc = "Release a group of legion to attack all other lifeforms." + button_icon = 'icons/mob/simple/lavaland/lavaland_monsters.dmi' + button_icon_state = "legion_head" + cooldown_time = 15 SECONDS + spawn_type = /mob/living/basic/legion_brood + spawn_count = 4 + +/datum/action/cooldown/hivehead_spawn_minions/legion/do_tell() + owner.visible_message(span_warning("[owner]'s head begins to shake as legion begin to pour out!"), span_warning("We release the legion."), span_hear("You hear a loud squishing sound!")) + playsound(owner, 'sound/effects/attackblob.ogg', 60, TRUE) + +/datum/action/cooldown/hivehead_spawn_minions/legion/minion_additional_changes(mob/living/basic/minion) + var/mob/living/basic/legion_brood/brood = minion + if (istype(brood)) + brood.assign_creator(owner, FALSE) +>>>>>>> 72e5b53107b ([MIRROR] Temporary bees animate on death and no longer produce corpses (#1193)) diff --git a/code/modules/mob/living/basic/farm_animals/bee/_bee.dm b/code/modules/mob/living/basic/farm_animals/bee/_bee.dm index 66c0d129962..6110f0bb527 100644 --- a/code/modules/mob/living/basic/farm_animals/bee/_bee.dm +++ b/code/modules/mob/living/basic/farm_animals/bee/_bee.dm @@ -110,9 +110,13 @@ beegent = null if(flags_1 & HOLOGRAM_1 || gibbed) return ..() - new /obj/item/trash/bee(loc, src) + spawn_corpse() return ..() +/// Leave something to remember us by +/mob/living/basic/bee/proc/spawn_corpse() + new /obj/item/trash/bee(loc, src) + /mob/living/basic/bee/proc/pre_attack(mob/living/puncher, atom/target) SIGNAL_HANDLER @@ -217,12 +221,20 @@ var/datum/reagent/toxin = pick(typesof(/datum/reagent/toxin)) assign_reagent(GLOB.chemical_reagents_list[toxin]) -/mob/living/basic/bee/short - desc = "These bees seem unstable and won't survive for long." +/// A bee which despawns after a short amount of time (beespawns?) +/mob/living/basic/bee/timed + /// How long do we live? + var/lifespan = 50 SECONDS -/mob/living/basic/bee/short/Initialize(mapload, timetolive=50 SECONDS) +/mob/living/basic/bee/timed/short + lifespan = 25 SECONDS + +/mob/living/basic/bee/timed/Initialize(mapload) . = ..() - addtimer(CALLBACK(src, PROC_REF(death)), timetolive) + addtimer(CALLBACK(src, PROC_REF(death)), lifespan) + +/mob/living/basic/bee/timed/spawn_corpse() + new /obj/effect/temp_visual/despawn_effect(get_turf(src), /* copy_from = */ src) /obj/item/queen_bee name = "queen bee" diff --git a/code/modules/mob/living/basic/lavaland/hivelord/hivelord.dm b/code/modules/mob/living/basic/lavaland/hivelord/hivelord.dm index 7b1e461991c..f0de6c3272e 100644 --- a/code/modules/mob/living/basic/lavaland/hivelord/hivelord.dm +++ b/code/modules/mob/living/basic/lavaland/hivelord/hivelord.dm @@ -110,5 +110,5 @@ /mob/living/basic/hivelord_brood/death(gibbed) if (!gibbed) - new /obj/effect/temp_visual/hive_spawn_wither(get_turf(src), /* copy_from = */ src) + new /obj/effect/temp_visual/despawn_effect(get_turf(src), /* copy_from = */ src) return ..() diff --git a/code/modules/mob/living/basic/lavaland/legion/legion_brood.dm b/code/modules/mob/living/basic/lavaland/legion/legion_brood.dm index 7cc5ea06ad8..96c7319380a 100644 --- a/code/modules/mob/living/basic/lavaland/legion/legion_brood.dm +++ b/code/modules/mob/living/basic/lavaland/legion/legion_brood.dm @@ -42,7 +42,7 @@ /mob/living/basic/legion_brood/death(gibbed) if (!gibbed) - new /obj/effect/temp_visual/hive_spawn_wither(get_turf(src), /* copy_from = */ src) + new /obj/effect/temp_visual/despawn_effect(get_turf(src), /* copy_from = */ src) return ..() /mob/living/basic/legion_brood/melee_attack(mob/living/target, list/modifiers, ignore_cooldown) diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm index 66f555b639a..f2af96c8878 100644 --- a/code/modules/mob/living/carbon/alien/organs.dm +++ b/code/modules/mob/living/carbon/alien/organs.dm @@ -209,7 +209,6 @@ RegisterSignal(thing, COMSIG_MOVABLE_MOVED, PROC_REF(content_moved)) RegisterSignal(thing, COMSIG_QDELETING, PROC_REF(content_deleted)) if(isliving(thing)) - var/mob/living/lad = thing RegisterSignal(thing, COMSIG_LIVING_DEATH, PROC_REF(content_died)) if(lad.stat == DEAD) qdel(lad) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 8e74b0ad6f8..f38ddf74b4f 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -194,7 +194,7 @@ beeagents += R var/bee_amount = round(created_volume * 0.2) for(var/i in 1 to bee_amount) - var/mob/living/basic/bee/short/new_bee = new(location) + var/mob/living/basic/bee/timed/new_bee = new(location) if(LAZYLEN(beeagents)) new_bee.assign_reagent(pick(beeagents))