Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance God Glow Up #2347

Merged
merged 21 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions code/_globalvars/lists/maintenance_loot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,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,
Expand Down
6 changes: 3 additions & 3 deletions code/modules/reagents/withdrawal/generic_addictions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
wraith-54321 marked this conversation as resolved.
Show resolved Hide resolved

/datum/addiction/maintenance_drugs/withdrawal_stage_1_process(mob/living/carbon/affected_carbon, seconds_per_tick)
. = ..()
Expand All @@ -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)
. = ..()
Expand Down
Original file line number Diff line number Diff line change
@@ -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(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of just giving all of them it should pick 1 you dont already have to randomly give

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would the best way to do this? Are there any examples of this from other granters?

Copy link
Collaborator

@wraith-54321 wraith-54321 Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like uh
var/static/list/possible_recipes = [this list here]
and then on init do
crafting_recipe_types = list(pick(possible_recipes))
might also want to add a check for if they already know the recipe or not

/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)
87 changes: 87 additions & 0 deletions monkestation/code/modules/religion/maint_god.dm
Original file line number Diff line number Diff line change
@@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add some spacing to all the things here to make them more readable

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
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 2 additions & 3 deletions monkestation/code/modules/virology/cargo/pathology.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
3 changes: 3 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5830,6 +5830,7 @@
#include "monkestation\code\game\objects\items\food\misc.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"
Expand Down Expand Up @@ -6976,8 +6977,10 @@
#include "monkestation\code\modules\reagents\reagent_containers\cups\bottle.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"
Expand Down
Loading