From 74f49349d9cdc16cf31ea0aaa710eee8a8094fd9 Mon Sep 17 00:00:00 2001 From: Uristthedorf <40842973+Uristthedorf@users.noreply.github.com> Date: Sun, 11 Aug 2024 19:54:18 -0700 Subject: [PATCH] Maintenance God Glow Up (#2347) * Ritual for Maint God * Update maint_god.dm * Update tgstation.dme * Update maint_god.dm * granter * Easier rat cubes, and new rituals. * Wow, maintenance addiction shouldn't be that bad. * Update MaintenanceEncyclopedia.dm * Update maint_god.dm * Update biogenerator_designs.dm * Update maint_god.dm * Rename MaintenanceEncyclopedia.dm to maintenanceencyclopedia.dm Git decided to be yucky and ignore my earlier change. * Expands pallet a bit more. * Flavor * Revert "Merge remote-tracking branch 'upstream/master' into MaintGod" This reverts commit b1ce833da48250bf9d5bec0181a0117c3e4fa8cf, reversing changes made to e44493e0d73eff9f2b6228291ddd2228ed8258b0. * Reapply "Merge remote-tracking branch 'upstream/master' into MaintGod" This reverts commit cccdb0221e6d7206f96bdab8d44f6c008cfaf716. * Apply suggestions from code review Co-authored-by: wraith-54321 <69217972+wraith-54321@users.noreply.github.com> * Update biogenerator_designs.dm * turf thing, spacing, modularization * Update maintenance_loot.dm --------- Co-authored-by: wraith-54321 <69217972+wraith-54321@users.noreply.github.com> --- code/_globalvars/lists/maintenance_loot.dm | 7 ++ .../reagents/withdrawal/generic_addictions.dm | 6 +- .../items/granters/maintenanceencyclopedia.dm | 20 +++++ .../code/modules/religion/maint_god.dm | 87 +++++++++++++++++++ .../research/designs/biogenerator_designs.dm | 7 ++ .../code/modules/virology/cargo/pathology.dm | 5 +- tgstation.dme | 3 + 7 files changed, 129 insertions(+), 6 deletions(-) create mode 100644 monkestation/code/game/objects/items/granters/maintenanceencyclopedia.dm create mode 100644 monkestation/code/modules/religion/maint_god.dm create mode 100644 monkestation/code/modules/research/designs/biogenerator_designs.dm diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index 0e084209fe43..d19a62c5b13f 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -405,6 +405,13 @@ GLOBAL_LIST_INIT(maintenance_loot, list( GLOB.maint_fauna = maint_fauna_weight, )) +//Monke, loot pool of uncommon or better loot, used in maint god rituals +GLOBAL_LIST_INIT(good_maintenance_loot, list( + GLOB.uncommon_loot = maint_uncommon_weight, + GLOB.rarity_loot = maint_rarity_weight, + GLOB.oddity_loot = maint_oddity_weight, + )) + GLOBAL_LIST_INIT(ratking_trash, list(//Garbage: used by the regal rat mob when spawning garbage. /obj/item/cigbutt, /obj/item/trash/candy, diff --git a/code/modules/reagents/withdrawal/generic_addictions.dm b/code/modules/reagents/withdrawal/generic_addictions.dm index 8efd0b3d4755..9e79ec350fec 100644 --- a/code/modules/reagents/withdrawal/generic_addictions.dm +++ b/code/modules/reagents/withdrawal/generic_addictions.dm @@ -95,7 +95,7 @@ /datum/addiction/maintenance_drugs/withdrawal_enters_stage_1(mob/living/carbon/affected_carbon) . = ..() - affected_carbon.apply_status_effect(/datum/status_effect/grouped/screwy_hud/fake_healthy, type) +// affected_carbon.apply_status_effect(/datum/status_effect/grouped/screwy_hud/fake_healthy, type) // Monke disable, this has nothing to do with maintenance. /datum/addiction/maintenance_drugs/withdrawal_stage_1_process(mob/living/carbon/affected_carbon, seconds_per_tick) . = ..() @@ -113,8 +113,8 @@ affected_human.update_body_parts() //Only like gross food affected_human.dna?.species.liked_food = GROSS - affected_human.dna?.species.disliked_food = NONE - affected_human.dna?.species.toxic_food = ~GROSS + affected_human.dna?.species.disliked_food = TOXIC // Toxic food won't kill you, but it doesn't taste good still. + affected_human.dna?.species.toxic_food = ~(GROSS | RAW | GORE | MEAT | BUGS | TOXIC | ALCOHOL) // Monke, you can eat raw rats and whatnot. /datum/addiction/maintenance_drugs/withdrawal_enters_stage_3(mob/living/carbon/affected_carbon) . = ..() diff --git a/monkestation/code/game/objects/items/granters/maintenanceencyclopedia.dm b/monkestation/code/game/objects/items/granters/maintenanceencyclopedia.dm new file mode 100644 index 000000000000..c2761091bd32 --- /dev/null +++ b/monkestation/code/game/objects/items/granters/maintenanceencyclopedia.dm @@ -0,0 +1,20 @@ +/obj/item/book/granter/crafting_recipe/maintgodgranter + name = "maintenance encyclopedia" + icon_state = "book1" + desc = "A burnt and damaged tome? Where did this come from?" + crafting_recipe_types = list( + /datum/crafting_recipe/pipegun_prime, + /datum/crafting_recipe/laser_musket_prime, + /datum/crafting_recipe/smoothbore_disabler_prime, + /datum/crafting_recipe/trash_cannon, + /datum/crafting_recipe/trashball, + ) + remarks = list( + "I never knew assistants could be this creative.", + "You can make that with what?", + "Why would I make these when I can just buy a gun from cargo?", // Maybe needs more. + ) + +/obj/item/book/granter/crafting_recipe/maintgodgranter/recoil(mob/living/user) + to_chat(user, span_warning("The book turns to dust in your hands.")) + qdel(src) diff --git a/monkestation/code/modules/religion/maint_god.dm b/monkestation/code/modules/religion/maint_god.dm new file mode 100644 index 000000000000..e35acdd6d4b2 --- /dev/null +++ b/monkestation/code/modules/religion/maint_god.dm @@ -0,0 +1,87 @@ +/datum/religion_sect/maintenance + rites_list = list(/datum/religion_rites/maint_adaptation, /datum/religion_rites/shadowascension, /datum/religion_rites/maint_loot, /datum/religion_rites/adapted_food, /datum/religion_rites/weapon_granter, /datum/religion_rites/ritual_totem) + +/datum/religion_rites/weapon_granter + name = "Maintenance Knowledge" + desc = "Creates a tome teaching you how to make improved improvised weapons." + favor_cost = 100 //You still have to make the weapon afterwards, might want to change this though. + invoke_msg = "Grant me your ingenuity!" + ritual_length = 5 SECONDS + +/datum/religion_rites/weapon_granter/invoke_effect(mob/living/user, atom/movable/religious_tool) + ..() + new /obj/item/book/granter/crafting_recipe/maintgodgranter(get_turf(religious_tool)) + return TRUE + +/datum/religion_rites/shadowascension + name = "Shadow Descent" + desc = "Descends a maintenance adapted being into a shadowperson. Buckle a human to convert them, otherwise it will convert you." // Quite a bit copied from android conversion. + ritual_length = 15 SECONDS + invoke_msg = "I no longer want to see the light!" + favor_cost = 300 + +/datum/religion_rites/shadowascension/perform_rite(mob/living/user, atom/religious_tool) + if(!ismovable(religious_tool)) + to_chat(user, span_warning("This rite requires a religious device that individuals can be buckled to.")) + return FALSE + + if(!HAS_TRAIT_FROM(user, TRAIT_HOPELESSLY_ADDICTED, "maint_adaptation")) + to_chat(user, span_warning("You need to adapt to maintenance first.")) + return FALSE + var/atom/movable/movable_reltool = religious_tool + + if(!movable_reltool) + return FALSE + + if(LAZYLEN(movable_reltool.buckled_mobs)) + to_chat(user, span_warning("You're going to convert the one buckled on [movable_reltool].")) + else + if(!movable_reltool.can_buckle) //yes, if you have somehow managed to have someone buckled to something that now cannot buckle, we will still let you perform the rite! + to_chat(user, span_warning("This rite requires a religious device that individuals can be buckled to.")) + return FALSE + if((is_species(user, /datum/species/shadow))) // There is no isshadow() helper + to_chat(user, span_warning("You've already converted yourself. To convert others, they must be buckled to [movable_reltool].")) + return FALSE + to_chat(user, span_warning("You're going to convert yourself with this ritual.")) + return ..() + +/datum/religion_rites/shadowascension/invoke_effect(mob/living/user, atom/religious_tool) + ..() + if(!ismovable(religious_tool)) + CRASH("[name]'s perform_rite had a movable atom that has somehow turned into a non-movable!") + var/atom/movable/movable_reltool = religious_tool + var/mob/living/carbon/human/rite_target + + if(!length(movable_reltool.buckled_mobs)) + rite_target = user + else + for(var/buckled in movable_reltool.buckled_mobs) + if(ishuman(buckled)) + rite_target = buckled + break + + if(!rite_target) + return FALSE + rite_target.set_species(/datum/species/shadow) + rite_target.visible_message(span_notice("[rite_target] has been converted by the rite of [name]!")) + return TRUE + +/datum/religion_rites/maint_loot //Useful for when maintenance has been picked clean of anything interesting. + name = "Maintenance apparition" + desc = "Summons a pile of loot from the depths of maintenance." + ritual_length = 5 SECONDS + ritual_invocations =list( "The tunnels are an infinite bounty.", + "They nourish us.") + invoke_msg = "Let us reap the harvest!" + favor_cost = 50 + var/amount = 5 + +/datum/religion_rites/maint_loot/invoke_effect(mob/living/user, atom/movable/religious_tool) + ..() + var/altar_turf = get_turf(religious_tool) // Like an assistant, I steal code from other functions. + for(var/i in 1 to amount) + var/lootspawn = pick_weight(GLOB.good_maintenance_loot) + while(islist(lootspawn)) + lootspawn = pick_weight(lootspawn) + new lootspawn(altar_turf) + return TRUE diff --git a/monkestation/code/modules/research/designs/biogenerator_designs.dm b/monkestation/code/modules/research/designs/biogenerator_designs.dm new file mode 100644 index 000000000000..c9a78c3e4c1d --- /dev/null +++ b/monkestation/code/modules/research/designs/biogenerator_designs.dm @@ -0,0 +1,7 @@ +/datum/design/rat_cube // Monkestation, useful for chaplain and pathologist. + name = "Mouse Cube" + id = "rcube" // R for Rat + build_type = BIOGENERATOR + materials = list(/datum/material/biomass = SMALL_MATERIAL_AMOUNT * 0.4) + build_path = /obj/item/food/monkeycube/mouse + category = list(RND_CATEGORY_INITIAL, RND_CATEGORY_BIO_FOOD) diff --git a/monkestation/code/modules/virology/cargo/pathology.dm b/monkestation/code/modules/virology/cargo/pathology.dm index d31fd8450c7f..ee63107284e8 100644 --- a/monkestation/code/modules/virology/cargo/pathology.dm +++ b/monkestation/code/modules/virology/cargo/pathology.dm @@ -16,8 +16,7 @@ /datum/supply_pack/medical/rat_cubes name = "Crate of Rat Cube Boxes" desc = "A pack of 5 boxes of rat-cubes" - cost = CARGO_CRATE_VALUE * 5 - access = ACCESS_VIROLOGY + cost = CARGO_CRATE_VALUE * 4 contains = list( /obj/item/storage/box/monkeycubes/mousecubes, /obj/item/storage/box/monkeycubes/mousecubes, @@ -26,4 +25,4 @@ /obj/item/storage/box/monkeycubes/mousecubes, ) crate_name = "rat cube crates" - crate_type = /obj/structure/closet/crate/secure/science + crate_type = /obj/structure/closet/crate diff --git a/tgstation.dme b/tgstation.dme index 6ed185c45ab2..69a55a7acfa6 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5903,6 +5903,7 @@ #include "monkestation\code\game\objects\items\food\snacks.dm" #include "monkestation\code\game\objects\items\food\spaghetti.dm" #include "monkestation\code\game\objects\items\granters\elance.dm" +#include "monkestation\code\game\objects\items\granters\maintenanceencyclopedia.dm" #include "monkestation\code\game\objects\items\grenades\monkey_barrel.dm" #include "monkestation\code\game\objects\items\guns\crank_guns.dm" #include "monkestation\code\game\objects\items\guns\shotguns.dm" @@ -7376,8 +7377,10 @@ #include "monkestation\code\modules\reagents\reagent_containers\cups\glassbottle.dm" #include "monkestation\code\modules\reagents\recipes\fun.dm" #include "monkestation\code\modules\reagents\recipes\medical.dm" +#include "monkestation\code\modules\religion\maint_god.dm" #include "monkestation\code\modules\replays\hooks\generic_hooks.dm" #include "monkestation\code\modules\replays\subsystem\replay.dm" +#include "monkestation\code\modules\research\designs\biogenerator_designs.dm" #include "monkestation\code\modules\research\designs\computer_designs.dm" #include "monkestation\code\modules\research\designs\electronic_designs.dm" #include "monkestation\code\modules\research\designs\machine_designs.dm"