diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index ed7bbe2e4996..c48b869eca89 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -458,3 +458,12 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE)) //Misc text define. Does 4 spaces. Used as a makeshift tabulator. #define FOURSPACES "    " + +//Religion + +#define HOLY_ROLE_PRIEST 1 //default priestly role +#define HOLY_ROLE_HIGHPRIEST 2 //the one who designates the religion + +#define ALIGNMENT_GOOD "good" +#define ALIGNMENT_NEUT "neutral" +#define ALIGNMENT_EVIL "evil" \ No newline at end of file diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index edd22ec242fe..7931d91acb50 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -18,12 +18,3 @@ GLOBAL_LIST_EMPTY(powernets) GLOBAL_VAR_INIT(bsa_unlock, FALSE) //BSA unlocked by head ID swipes GLOBAL_LIST_EMPTY(player_details) // ckey -> /datum/player_details - -// All religion stuff -GLOBAL_VAR(religion) -GLOBAL_VAR(deity) -GLOBAL_VAR(bible_name) -GLOBAL_VAR(bible_icon_state) -GLOBAL_VAR(bible_item_state) -GLOBAL_VAR(holy_weapon_type) -GLOBAL_VAR(holy_armor_type) diff --git a/code/_globalvars/religion.dm b/code/_globalvars/religion.dm new file mode 100644 index 000000000000..4eb08d438494 --- /dev/null +++ b/code/_globalvars/religion.dm @@ -0,0 +1,14 @@ +// All religion stuff +GLOBAL_VAR(religion) +GLOBAL_VAR(deity) +GLOBAL_DATUM(religious_sect, /datum/religion_sect) +GLOBAL_VAR(favor) + +//bible +GLOBAL_VAR(bible_name) +GLOBAL_VAR(bible_icon_state) +GLOBAL_VAR(bible_item_state) + +//gear +GLOBAL_VAR(holy_weapon_type) +GLOBAL_VAR(holy_armor_type) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 8bdb84ae6b82..3e5ac8f91bf3 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -53,7 +53,7 @@ var/damnation_type = 0 var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src var/hasSoul = TRUE // If false, renders the character unable to sell their soul. - var/isholy = FALSE //is this person a chaplain or admin role allowed to use bibles + var/holy_role = NONE //is this person a chaplain or admin role allowed to use bibles, Any rank besides 'NONE' allows for this. var/mob/living/enslaved_to //If this mind's master is another mob (i.e. adamantine golems) var/datum/language_holder/language_holder @@ -778,4 +778,4 @@ /mob/living/silicon/pai/mind_initialize() ..() mind.assigned_role = ROLE_PAI - mind.special_role = "" + mind.special_role = "" \ No newline at end of file diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 91fdd90439f3..3cf5c67b061b 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -16,7 +16,7 @@ if(!istype(M)) return FALSE if(M.mind) - if(ishuman(M) && (M.mind.isholy)) + if(ishuman(M) && (M.mind.holy_role)) return FALSE if(specific_cult && specific_cult.is_sacrifice_target(M.mind)) return FALSE diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 2b1eca503b22..063fe4e06e32 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -79,7 +79,7 @@ desc = "Contains a set of armaments for the chaplain." /obj/item/choice_beacon/holy/canUseBeacon(mob/living/user) - if(user.mind && user.mind.isholy) + if(user.mind && user.mind.holy_role) return ..() else playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1) @@ -252,7 +252,7 @@ return (BRUTELOSS|FIRELOSS) /obj/item/nullrod/attack_self(mob/user) - if(user.mind && (user.mind.isholy) && !reskinned) + if(user.mind && (user.mind.holy_role) && !reskinned) reskin_holy_weapon(user) /* @@ -675,11 +675,13 @@ /obj/item/nullrod/carp/attack_self(mob/living/user) if(used_blessing) - else if(user.mind && (user.mind.isholy)) + else if(user.mind && (user.mind.holy_role)) to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.") user.faction |= "carp" used_blessing = TRUE + + /obj/item/nullrod/claymore/bostaff //May as well make it a "claymore" and inherit the blocking name = "monk's staff" desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts, it is now used to harass the clown." diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index a107693fd6fd..254618a24d4b 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -55,8 +55,9 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning", if(!H.can_read(src)) return FALSE // If H is the Chaplain, we can set the icon_state of the bible (but only once!) - if(!GLOB.bible_icon_state && H.job == "Chaplain") + if(!GLOB.bible_icon_state && H.mind.holy_role == HOLY_ROLE_HIGHPRIEST) var/dat = "Pick Bible Style

Pick a bible style

" + for(var/i in 1 to GLOB.biblestates.len) var/icon/bibleicon = icon('icons/obj/storage.dmi', GLOB.biblestates[i]) var/nicename = GLOB.biblenames[i] @@ -91,7 +92,12 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning", SSblackbox.record_feedback("text", "religion_book", 1, "[biblename]") usr << browse(null, "window=editicon") -/obj/item/storage/book/bible/proc/bless(mob/living/carbon/human/H, mob/living/user) +/obj/item/storage/book/bible/proc/bless(mob/living/L, mob/living/user) + if(GLOB.religious_sect) + return GLOB.religious_sect.sect_bless(L,user) + if(!ishuman(L)) + return + var/mob/living/carbon/human/H = L for(var/X in H.bodyparts) var/obj/item/bodypart/BP = X if(BP.status == BODYPART_ROBOTIC) @@ -125,7 +131,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning", return var/chaplain = 0 - if(user.mind && (user.mind.isholy)) + if(user.mind && (user.mind.holy_role)) chaplain = 1 if(!chaplain) @@ -143,7 +149,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning", to_chat(user, "You can't heal yourself!") return - if(ishuman(M) && prob(60) && bless(M, user)) + if(prob(60) && bless(M, user)) smack = 0 else if(iscarbon(M)) var/mob/living/carbon/C = M @@ -167,10 +173,10 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning", return if(isfloorturf(A)) to_chat(user, "You hit the floor with the bible.") - if(user.mind && (user.mind.isholy)) + if(user.mind && (user.mind.holy_role)) for(var/obj/effect/rune/R in orange(2,user)) R.invisibility = 0 - if(user.mind && (user.mind.isholy)) + if(user?.mind?.holy_role) if(A.reagents && A.reagents.has_reagent(/datum/reagent/water)) // blesses all the water in the holder to_chat(user, "You bless [A].") var/water2holy = A.reagents.get_reagent_amount(/datum/reagent/water) @@ -245,7 +251,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning", /obj/item/storage/book/bible/syndicate/attack_self(mob/living/carbon/human/H) if (uses) - H.mind.isholy = TRUE + H.mind.holy_role = HOLY_ROLE_PRIEST uses -= 1 to_chat(H, "You try to open the book AND IT BITES YOU!") playsound(src.loc, 'sound/effects/snap.ogg', 50, 1) diff --git a/code/modules/antagonists/clockcult/clock_items/clock_components.dm b/code/modules/antagonists/clockcult/clock_items/clock_components.dm index caf8a97de58d..ed66f7fc4e11 100644 --- a/code/modules/antagonists/clockcult/clock_items/clock_components.dm +++ b/code/modules/antagonists/clockcult/clock_items/clock_components.dm @@ -24,9 +24,9 @@ /obj/item/clockwork/component/pickup(mob/living/user) ..() - if(iscultist(user) || (user.mind && user.mind.isholy)) + if(iscultist(user) || (user.mind && user.mind.holy_role)) to_chat(user, "[cultist_message]") - if(user.mind && user.mind.isholy) + if(user.mind && user.mind.holy_role) to_chat(user, "The power of your faith melts away [src]!") var/obj/item/stack/ore/slag/wrath = new /obj/item/stack/ore/slag qdel(src) diff --git a/code/modules/antagonists/ert/ert.dm b/code/modules/antagonists/ert/ert.dm index e7017777b25b..41c0225135b0 100644 --- a/code/modules/antagonists/ert/ert.dm +++ b/code/modules/antagonists/ert/ert.dm @@ -74,9 +74,17 @@ /datum/antagonist/ert/medic/inquisitor outfit = /datum/outfit/ert/medic/inquisitor +/datum/antagonist/ert/medic/inquisitor/on_gain() + . = ..() + owner.holy_role = HOLY_ROLE_PRIEST + /datum/antagonist/ert/security/inquisitor outfit = /datum/outfit/ert/security/inquisitor +/datum/antagonist/ert/security/inquisitor/on_gain() + . = ..() + owner.holy_role = HOLY_ROLE_PRIEST + /datum/antagonist/ert/chaplain role = "Chaplain" outfit = /datum/outfit/ert/chaplain @@ -86,14 +94,14 @@ /datum/antagonist/ert/chaplain/on_gain() . = ..() - owner.isholy = TRUE + owner.holy_role = HOLY_ROLE_PRIEST /datum/antagonist/ert/commander/inquisitor outfit = /datum/outfit/ert/commander/inquisitor /datum/antagonist/ert/commander/inquisitor/on_gain() . = ..() - owner.isholy = TRUE + owner.holy_role = HOLY_ROLE_PRIEST /datum/antagonist/ert/janitor role = "Janitor" diff --git a/code/modules/jobs/job_types/chaplain.dm b/code/modules/jobs/job_types/chaplain.dm index c98cdce089d4..611e1ba2360d 100644 --- a/code/modules/jobs/job_types/chaplain.dm +++ b/code/modules/jobs/job_types/chaplain.dm @@ -21,12 +21,12 @@ /datum/job/chaplain/after_spawn(mob/living/H, mob/M) . = ..() - if(H.mind) - H.mind.isholy = TRUE var/obj/item/storage/book/bible/booze/B = new if(GLOB.religion) + if(H.mind) + H.mind.holy_role = HOLY_ROLE_PRIEST B.deity_name = GLOB.deity B.name = GLOB.bible_name B.icon_state = GLOB.bible_icon_state @@ -36,7 +36,11 @@ var/nrt = GLOB.holy_weapon_type || /obj/item/nullrod var/obj/item/nullrod/N = new nrt(H) H.put_in_hands(N) + if(GLOB.religious_sect) + GLOB.religious_sect.on_conversion(H) return + if(H.mind) + H.mind.holy_role = HOLY_ROLE_HIGHPRIEST var/new_religion = DEFAULT_RELIGION if(M.client && M.client.prefs.custom_names["religion"]) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 6bdc73c82dc4..59d9945422d3 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -277,7 +277,7 @@ msg += "" - if(HAS_TRAIT(user, TRAIT_SPIRITUAL) && mind?.isholy) + if(HAS_TRAIT(user, TRAIT_SPIRITUAL) && mind?.holy_role) msg += "[t_He] [t_has] a holy aura about [t_him].\n" SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "religious_comfort", /datum/mood_event/religiously_comforted) @@ -362,4 +362,4 @@ new_text = replacetext(new_text, "[pronoun_replacement] is", "[pronoun_replacement] [p_are()]") //To make sure something become "They are" or "She is", not "They are" and "She are" dat += "[new_text]\n" //dat.Join("\n") doesn't work here, for some reason if(dat.len) - return dat.Join() + return dat.Join() \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index bb8fc6ab513a..98f487b1e3c3 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -2054,7 +2054,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "boozy Catholicism in a glass." /datum/reagent/consumable/ethanol/trappist/on_mob_life(mob/living/carbon/M) - if(M.mind.isholy) + if(M.mind.holy_role) M.adjustFireLoss(-2.5, 0) M.jitteriness = max(0, M.jitteriness-1) M.stuttering = max(0, M.stuttering-1) diff --git a/code/modules/religion/religion_sects.dm b/code/modules/religion/religion_sects.dm new file mode 100644 index 000000000000..58fc0c35dea3 --- /dev/null +++ b/code/modules/religion/religion_sects.dm @@ -0,0 +1,181 @@ + /* + Religious Sects are a way to convert the fun of having an active 'god' (admin) to code-mechanics so you aren't having to press adminwho. + + Sects are not meant to overwrite the fun of choosing a custom god/religion, but meant to enhance it. + The idea is that Space Jesus (or whoever you worship) can be an evil bloodgod who takes the lifeforce out of people, a nature lover, or all things righteous and good. You decide! + */ +/datum/religion_sect + var/name = "Religious Sect Base Type" // Name of the religious sect + var/desc = "Oh My! What Do We Have Here?!!?!?!?" // Description of the religious sect, Presents itself in the selection menu (AKA be brief) + var/convert_opener // Opening message when someone gets converted + var/alignment = ALIGNMENT_GOOD // holder for alignments. + var/starter = TRUE // Does this require something before being available as an option? + var/favor = 0 // The Sect's 'Mana' + var/max_favor = 1000 // The max amount of favor the sect can have + var/default_item_favor = 5 // The default value for an item that can be sacrificed + var/list/desired_items // Turns into 'desired_items_typecache', lists the types that can be sacrificed barring optional features in can_sacrifice() + var/list/desired_items_typecache // Autopopulated by `desired_items` + var/list/rites_list // Lists of rites by type. Converts itself into a list of rites with "name - desc (favor_cost)" = type + var/altar_icon // Changes the Altar of Gods icon + var/altar_icon_state // Changes the Altar of Gods icon_state + +/datum/religion_sect/New() + if(desired_items) + desired_items_typecache = typecacheof(desired_items) + if(rites_list) + var/listylist = generate_rites_list() + rites_list = listylist + on_select() + +///Generates a list of rites with 'name' = 'type' +/datum/religion_sect/proc/generate_rites_list() + . = list() + for(var/i in rites_list) + if(!ispath(i)) + continue + var/datum/religion_rites/RI = i + var/name_entry = "[initial(RI.name)]" + if(initial(RI.desc)) + name_entry += " - [initial(RI.desc)]" + if(initial(RI.favor_cost)) + name_entry += " ([initial(RI.favor_cost)] favor)" + + . += list("[name_entry]" = i) + +/// Activates once selected +/datum/religion_sect/proc/on_select() + +/// Activates once selected and on newjoins, oriented around people who become holy. +/datum/religion_sect/proc/on_conversion(mob/living/L) + if(convert_opener) + to_chat(L, "[convert_opener][GLOB.deity] refuses to heal this metallic taint!") + return TRUE + + var/heal_amt = 10 + var/list/hurt_limbs = H.get_damaged_bodyparts(1, 1, null, BODYPART_ORGANIC) + + if(hurt_limbs.len) + for(var/X in hurt_limbs) + var/obj/item/bodypart/affecting = X + if(affecting.heal_damage(heal_amt, heal_amt, null, BODYPART_ORGANIC)) + H.update_damage_overlays() + H.visible_message("[user] heals [H] with the power of [GLOB.deity]!") + to_chat(H, "May the power of [GLOB.deity] compel you to be healed!") + playsound(user, "punch", 25, TRUE, -1) + SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing) + return FALSE + +/datum/religion_sect/puritanism + name = "Puritanism (Default)" + desc = "Nothing special." + convert_opener = "Your run-of-the-mill sect, there are no benefits or boons associated. Praise normalcy!" + +/datum/religion_sect/technophile + name = "Technophile" + desc = "A sect oriented around technology." + convert_opener = "May you find peace in a metal shell, acolyte.
Bibles now recharge cyborgs and heal robotic limbs if targeted, but they do not heal organic limbs. You can now sacrifice cells, with favor depending on their charge." + alignment = ALIGNMENT_NEUT + desired_items = list(/obj/item/stock_parts/cell) + rites_list = list(/datum/religion_rites/synthconversion) + altar_icon_state = "convertaltar-blue" + +/datum/religion_sect/technophile/sect_bless(mob/living/L, mob/living/user) + if(iscyborg(L)) + var/mob/living/silicon/robot/R = L + var/charge_amt = 50 + if(L.mind?.holy_role == HOLY_ROLE_HIGHPRIEST) + charge_amt *= 2 + R.cell?.charge += charge_amt + R.visible_message("[user] charges [R] with the power of [GLOB.deity]!") + to_chat(R, "You are charged by the power of [GLOB.deity]!") + SEND_SIGNAL(R, COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing) + playsound(user, 'sound/effects/bang.ogg', 25, TRUE, -1) + return TRUE + if(!ishuman(L)) + return + var/mob/living/carbon/human/H = L + + //first we determine if we can charge them + var/did_we_charge = FALSE + var/obj/item/organ/stomach/ethereal/eth_stomach = H.getorganslot(ORGAN_SLOT_STOMACH) + if(istype(eth_stomach)) + eth_stomach.adjust_charge(3) + did_we_charge = TRUE + if(ispreternis(H)) + var/datum/species/preternis/preternis = H.dna.species + preternis.charge = clamp(preternis.charge + 3, PRETERNIS_LEVEL_NONE, PRETERNIS_LEVEL_FULL) + did_we_charge = TRUE + + //if we're not targetting a robot part we stop early + var/obj/item/bodypart/BP = H.get_bodypart(user.zone_selected) + if(BP.status != BODYPART_ROBOTIC) + if(!did_we_charge) + to_chat(user, "[GLOB.deity] scoffs at the idea of healing such fleshy matter!") + else + H.visible_message("[user] charges [H] with the power of [GLOB.deity]!") + to_chat(H, "You feel charged by the power of [GLOB.deity]!") + SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing) + playsound(user, 'sound/machines/synth_yes.ogg', 25, TRUE, -1) + return TRUE + + //charge(?) and go + if(BP.heal_damage(5,5,null,BODYPART_ROBOTIC)) + H.update_damage_overlays() + + H.visible_message("[user] [did_we_charge ? "repairs" : "repairs and charges"] [H] with the power of [GLOB.deity]!") + to_chat(H, "The inner machinations of [GLOB.deity] [did_we_charge ? "repairs" : "repairs and charges"] you!") + playsound(user, 'sound/effects/bang.ogg', 25, TRUE, -1) + SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing) + return TRUE + +/datum/religion_sect/technophile/can_sacrifice(obj/item/I, mob/living/L) + if(!..()) + return FALSE + var/obj/item/stock_parts/cell/the_cell = I + if(the_cell.charge < 3000) + to_chat("[GLOB.deity] does not accept pity amounts of power.") + return FALSE + return TRUE + + +/datum/religion_sect/technophile/on_sacrifice(obj/item/I, mob/living/L) + if(!is_type_in_typecache(I, desired_items_typecache)) + return + var/obj/item/stock_parts/cell/the_cell = I + adjust_favor(round(the_cell.charge/3000), L) + to_chat(L, "You offer [the_cell]'s power to [GLOB.deity], pleasing them.") + qdel(I) diff --git a/code/modules/religion/religion_structures.dm b/code/modules/religion/religion_structures.dm new file mode 100644 index 000000000000..6da222e88db1 --- /dev/null +++ b/code/modules/religion/religion_structures.dm @@ -0,0 +1,123 @@ +/obj/structure/altar_of_gods + name = "\improper Altar of the Gods" + desc = "An altar which allows the head of the church to choose a sect of religious teachings as well as provide sacrifices to earn favor." + icon = 'icons/obj/hand_of_god_structures.dmi' + icon_state = "convertaltar" + density = TRUE + anchored = TRUE + layer = TABLE_LAYER + climbable = TRUE + pass_flags = LETPASSTHROW + can_buckle = TRUE + buckle_lying = 90 //we turn to you! + var/datum/religion_sect/sect_to_altar // easy access! + var/datum/religion_rites/performing_rite + +/obj/structure/altar_of_gods/examine(mob/user) + . = ..() + var/can_i_see = FALSE + if(isobserver(user)) + can_i_see = TRUE + else if(isliving(user)) + var/mob/living/L = user + if(L.mind?.holy_role) + can_i_see = TRUE + + if(!can_i_see || !sect_to_altar) + return + + . += "The sect currently has [round(sect_to_altar.favor)] favor with [GLOB.deity]." + if(!sect_to_altar.rites_list) + return + . += "List of available Rites:" + . += sect_to_altar.rites_list + + +/obj/structure/altar_of_gods/Initialize(mapload) + . = ..() + if(GLOB.religious_sect) + sect_to_altar = GLOB.religious_sect + if(sect_to_altar.altar_icon) + icon = sect_to_altar.altar_icon + if(sect_to_altar.altar_icon_state) + icon_state = sect_to_altar.altar_icon_state + +/obj/structure/altar_of_gods/attack_hand(mob/living/user) + if(!Adjacent(user) || !user.pulling) + return ..() + if(!isliving(user.pulling)) + return ..() + var/mob/living/pushed_mob = user.pulling + if(pushed_mob.buckled) + to_chat(user, "[pushed_mob] is buckled to [pushed_mob.buckled]!") + return ..() + to_chat(user,"Your sect doesn't have any rites to perform!") + return + var/rite_select = input(user,"Select a rite to perform!","Select a rite",null) in sect_to_altar.rites_list + if(!rite_select || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + to_chat(user,"You cannot perform the rite at this time.") + return + var/selection2type = sect_to_altar.rites_list[rite_select] + performing_rite = new selection2type(src) + if(!performing_rite.perform_rite(user, src)) + QDEL_NULL(performing_rite) + else + performing_rite.invoke_effect(user, src) + sect_to_altar.adjust_favor(-performing_rite.favor_cost) + QDEL_NULL(performing_rite) + return + + if(user.mind?.holy_role != HOLY_ROLE_HIGHPRIEST) + to_chat(user, "You are not the high priest, and therefore cannot select a religious sect. ") + return + + var/list/available_options = generate_available_sects(user) + if(!available_options) + to_chat(user, "There are currently no religious sects to chose from. ") + return + + var/sect_select = input(user,"Select a sect (You CANNOT revert this decision!)","Select a Sect",null) in available_options + if(!sect_select || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + to_chat(user,"You cannot select a sect at this time.") + return + var/type_selected = available_options[sect_select] + GLOB.religious_sect = new type_selected() + for(var/i in GLOB.player_list) + if(!isliving(i)) + continue + var/mob/living/am_i_holy_living = i + if(!am_i_holy_living.mind?.holy_role) + continue + GLOB.religious_sect.on_conversion(am_i_holy_living) + sect_to_altar = GLOB.religious_sect + if(sect_to_altar.altar_icon) + icon = sect_to_altar.altar_icon + if(sect_to_altar.altar_icon_state) + icon_state = sect_to_altar.altar_icon_state + + + +/obj/structure/altar_of_gods/proc/generate_available_sects(mob/user) //eventually want to add sects you get from unlocking certain achievements + . = list() + for(var/i in subtypesof(/datum/religion_sect)) + var/datum/religion_sect/not_a_real_instance_rs = i + if(initial(not_a_real_instance_rs.starter)) + . += list(initial(not_a_real_instance_rs.name) = i) diff --git a/code/modules/religion/rites.dm b/code/modules/religion/rites.dm new file mode 100644 index 000000000000..d5447941bc20 --- /dev/null +++ b/code/modules/religion/rites.dm @@ -0,0 +1,77 @@ +/datum/religion_rites + var/name = "religious rite" // name of the religious rite + var/desc = "immm gonna rooon" // Description of the religious rite + var/ritual_length = (10 SECONDS) // length it takes to complete the ritual + var/list/ritual_invocations // list of invocations said (strings) throughout the rite + var/invoke_msg // message when you invoke + var/favor_cost = 0 + +///Called to perform the invocation of the rite, with args being the performer and the altar where it's being performed. Maybe you want it to check for something else? +/datum/religion_rites/proc/perform_rite(mob/living/user, obj/structure/altar_of_gods/AOG) + if(GLOB.religious_sect?.favor < favor_cost) + to_chat(user, "This rite requires more favor!") + return FALSE + to_chat(user, "You begin to perform the rite of [name]...") + if(!ritual_invocations) + if(do_after(user, target = user, delay = ritual_length)) + if(invoke_msg) + user.say(invoke_msg, forced = "ritual") + return TRUE + return FALSE + var/first_invoke = TRUE + for(var/i in ritual_invocations) + if(first_invoke) //instant invoke + user.say(i) + first_invoke = FALSE + continue + if(!ritual_invocations.len) //we divide so we gotta protect + return FALSE + if(!do_after(user, target = user, delay = ritual_length/ritual_invocations.len)) + return FALSE + user.say(i, forced = "ritual") + if(!do_after(user, target = user, delay = ritual_length/ritual_invocations.len)) //because we start at 0 and not the first fraction in invocations, we still have another fraction of ritual_length to complete + return FALSE + if(invoke_msg) + user.say(invoke_msg, forced = "ritual") + return TRUE + + +///Does the thing if the rite was successfully performed. return value denotes that the effect successfully (IE a harm rite does harm) +/datum/religion_rites/proc/invoke_effect(mob/living/user, obj/structure/altar_of_gods/AOG) + GLOB.religious_sect.on_riteuse(user,AOG) + return TRUE + + +/*********Technophiles**********/ + +/datum/religion_rites/synthconversion + name = "Synthetic Conversion" + desc = "Convert a human-esque individual into a (superior) Android." + ritual_length = 1 MINUTES + ritual_invocations = list( + "By the inner workings of our god...", + "... We call upon you, in the face of adversity...", + "... to complete us, removing that which is undesirable..." + ) + invoke_msg = "... Arise, our champion! Become that which your soul craves, live in the world as your true form!!" + favor_cost = 500 + +/datum/religion_rites/synthconversion/perform_rite(mob/living/user, obj/structure/altar_of_gods/AOG) + if(!AOG?.buckled_mobs?.len) + to_chat(user, "This rite requires an individual to be buckled to [AOG].") + return FALSE + return ..() + +/datum/religion_rites/synthconversion/invoke_effect(mob/living/user, obj/structure/altar_of_gods/AOG) + if(!AOG?.buckled_mobs?.len) + return FALSE + var/mob/living/carbon/human/human2borg + for(var/i in AOG.buckled_mobs) + if(istype(i,/mob/living/carbon/human)) + human2borg = i + break + if(!human2borg) + return FALSE + human2borg.set_species(/datum/species/android) + human2borg.visible_message("[human2borg] has been converted by the rite of [name]!") + return TRUE diff --git a/yogstation.dme b/yogstation.dme index e42c115ef3a6..9bef809c25fd 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -178,6 +178,7 @@ #include "code\_globalvars\logging.dm" #include "code\_globalvars\misc.dm" #include "code\_globalvars\regexes.dm" +#include "code\_globalvars\religion.dm" #include "code\_globalvars\lists\flavor_misc.dm" #include "code\_globalvars\lists\maintenance_loot.dm" #include "code\_globalvars\lists\mapping.dm" @@ -2590,6 +2591,9 @@ #include "code\modules\recycling\disposal\outlet.dm" #include "code\modules\recycling\disposal\pipe.dm" #include "code\modules\recycling\disposal\pipe_sorting.dm" +#include "code\modules\religion\religion_sects.dm" +#include "code\modules\religion\religion_structures.dm" +#include "code\modules\religion\rites.dm" #include "code\modules\research\designs.dm" #include "code\modules\research\destructive_analyzer.dm" #include "code\modules\research\experimentor.dm" diff --git a/yogstation/code/game/gamemodes/vampire/vampire_other.dm b/yogstation/code/game/gamemodes/vampire/vampire_other.dm index 342ae88caa30..84fa4bc64b21 100644 --- a/yogstation/code/game/gamemodes/vampire/vampire_other.dm +++ b/yogstation/code/game/gamemodes/vampire/vampire_other.dm @@ -46,7 +46,7 @@ /obj/item/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE) . = ..() - if(!(user.mind && user.mind.isholy) && is_vampire(user)) + if(!(user.mind && user.mind.holy_role) && is_vampire(user)) to_chat(user, "[deity_name] channels through \the [src] and sets you ablaze for your blasphemy!") user.fire_stacks += 5 user.IgniteMob()