mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Adds Religious Sects and Basic Technophile Sect for Proof of Concept (#49434)
* このコミットの中が未来です * Adds Rites * 💻 * remove bible global * last minute code changes 😏 * review brah * waaa_fb * ⛪ Review stuff, Doc stuff, You can now coax a user to the platform for !!FUN!! * Update code/modules/religion/religion_sects.dm Co-authored-by: spookydonut <github@spooksoftware.com>
This commit is contained in:
@@ -471,3 +471,12 @@ GLOBAL_LIST_INIT(pda_styles, sortList(list(MONO, VT, ORBITRON, SHARE)))
|
|||||||
#define FALL_INTERCEPTED (1<<0) //Stops the movable from falling further and crashing on the ground
|
#define FALL_INTERCEPTED (1<<0) //Stops the movable from falling further and crashing on the ground
|
||||||
#define FALL_NO_MESSAGE (1<<1) //Used to suppress the "[A] falls through [old_turf]" messages where it'd make little sense at all, like going downstairs.
|
#define FALL_NO_MESSAGE (1<<1) //Used to suppress the "[A] falls through [old_turf]" messages where it'd make little sense at all, like going downstairs.
|
||||||
#define FALL_STOP_INTERCEPTING (1<<2) //Used in situations where halting the whole "intercept" loop would be better, like supermatter dusting (and thus deleting) the atom.
|
#define FALL_STOP_INTERCEPTING (1<<2) //Used in situations where halting the whole "intercept" loop would be better, like supermatter dusting (and thus deleting) the atom.
|
||||||
|
|
||||||
|
//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"
|
||||||
|
|||||||
@@ -16,12 +16,3 @@ GLOBAL_LIST_EMPTY(powernets)
|
|||||||
GLOBAL_VAR_INIT(bsa_unlock, FALSE) //BSA unlocked by head ID swipes
|
GLOBAL_VAR_INIT(bsa_unlock, FALSE) //BSA unlocked by head ID swipes
|
||||||
|
|
||||||
GLOBAL_LIST_EMPTY(player_details) // ckey -> /datum/player_details
|
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)
|
|
||||||
|
|||||||
14
code/_globalvars/religion.dm
Normal file
14
code/_globalvars/religion.dm
Normal file
@@ -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)
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
var/damnation_type = 0
|
var/damnation_type = 0
|
||||||
var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src
|
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/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/mob/living/enslaved_to //If this mind's master is another mob (i.e. adamantine golems)
|
||||||
var/datum/language_holder/language_holder
|
var/datum/language_holder/language_holder
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
return FALSE
|
return FALSE
|
||||||
if(M.mind)
|
if(M.mind)
|
||||||
if(ishuman(M) && (M.mind.isholy))
|
if(ishuman(M) && (M.mind.holy_role))
|
||||||
return FALSE
|
return FALSE
|
||||||
if(specific_cult && specific_cult.is_sacrifice_target(M.mind))
|
if(specific_cult && specific_cult.is_sacrifice_target(M.mind))
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
desc = "Contains a set of armaments for the chaplain."
|
desc = "Contains a set of armaments for the chaplain."
|
||||||
|
|
||||||
/obj/item/choice_beacon/holy/canUseBeacon(mob/living/user)
|
/obj/item/choice_beacon/holy/canUseBeacon(mob/living/user)
|
||||||
if(user.mind && user.mind.isholy)
|
if(user.mind && user.mind.holy_role)
|
||||||
return ..()
|
return ..()
|
||||||
else
|
else
|
||||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, TRUE)
|
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, TRUE)
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
return (BRUTELOSS|FIRELOSS)
|
return (BRUTELOSS|FIRELOSS)
|
||||||
|
|
||||||
/obj/item/nullrod/attack_self(mob/user)
|
/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)
|
reskin_holy_weapon(user)
|
||||||
|
|
||||||
/obj/item/nullrod/proc/reskin_holy_weapon(mob/M)
|
/obj/item/nullrod/proc/reskin_holy_weapon(mob/M)
|
||||||
@@ -607,7 +607,7 @@
|
|||||||
|
|
||||||
/obj/item/nullrod/carp/attack_self(mob/living/user)
|
/obj/item/nullrod/carp/attack_self(mob/living/user)
|
||||||
if(used_blessing)
|
if(used_blessing)
|
||||||
else if(user.mind && (user.mind.isholy))
|
else if(user.mind && (user.mind.holy_role))
|
||||||
to_chat(user, "<span class='boldnotice'>You are blessed by Carp-Sie. Wild space carp will no longer attack you.</span>")
|
to_chat(user, "<span class='boldnotice'>You are blessed by Carp-Sie. Wild space carp will no longer attack you.</span>")
|
||||||
user.faction |= "carp"
|
user.faction |= "carp"
|
||||||
used_blessing = TRUE
|
used_blessing = TRUE
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
|
|||||||
if(!H.can_read(src))
|
if(!H.can_read(src))
|
||||||
return FALSE
|
return FALSE
|
||||||
// If H is the Chaplain, we can set the icon_state of the bible (but only once!)
|
// 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 = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Pick Bible Style</title></head><body><center><h2>Pick a bible style</h2></center><table>"
|
var/dat = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Pick Bible Style</title></head><body><center><h2>Pick a bible style</h2></center><table>"
|
||||||
for(var/i in 1 to GLOB.biblestates.len)
|
for(var/i in 1 to GLOB.biblestates.len)
|
||||||
var/icon/bibleicon = icon('icons/obj/storage.dmi', GLOB.biblestates[i])
|
var/icon/bibleicon = icon('icons/obj/storage.dmi', GLOB.biblestates[i])
|
||||||
@@ -91,7 +91,12 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
|
|||||||
SSblackbox.record_feedback("text", "religion_book", 1, "[biblename]")
|
SSblackbox.record_feedback("text", "religion_book", 1, "[biblename]")
|
||||||
usr << browse(null, "window=editicon")
|
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)
|
for(var/X in H.bodyparts)
|
||||||
var/obj/item/bodypart/BP = X
|
var/obj/item/bodypart/BP = X
|
||||||
if(BP.status == BODYPART_ROBOTIC)
|
if(BP.status == BODYPART_ROBOTIC)
|
||||||
@@ -125,7 +130,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/chaplain = 0
|
var/chaplain = 0
|
||||||
if(user.mind && (user.mind.isholy))
|
if(user.mind && (user.mind.holy_role))
|
||||||
chaplain = 1
|
chaplain = 1
|
||||||
|
|
||||||
if(!chaplain)
|
if(!chaplain)
|
||||||
@@ -143,7 +148,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
|
|||||||
to_chat(user, "<span class='warning'>You can't heal yourself!</span>")
|
to_chat(user, "<span class='warning'>You can't heal yourself!</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(ishuman(M) && prob(60) && bless(M, user))
|
if(prob(60) && bless(M, user))
|
||||||
smack = 0
|
smack = 0
|
||||||
else if(iscarbon(M))
|
else if(iscarbon(M))
|
||||||
var/mob/living/carbon/C = M
|
var/mob/living/carbon/C = M
|
||||||
@@ -167,10 +172,10 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
|
|||||||
return
|
return
|
||||||
if(isfloorturf(A))
|
if(isfloorturf(A))
|
||||||
to_chat(user, "<span class='notice'>You hit the floor with the bible.</span>")
|
to_chat(user, "<span class='notice'>You hit the floor with the bible.</span>")
|
||||||
if(user.mind && (user.mind.isholy))
|
if(user.mind && (user.mind.holy_role))
|
||||||
for(var/obj/effect/rune/R in orange(2,user))
|
for(var/obj/effect/rune/R in orange(2,user))
|
||||||
R.invisibility = 0
|
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
|
if(A.reagents && A.reagents.has_reagent(/datum/reagent/water)) // blesses all the water in the holder
|
||||||
to_chat(user, "<span class='notice'>You bless [A].</span>")
|
to_chat(user, "<span class='notice'>You bless [A].</span>")
|
||||||
var/water2holy = A.reagents.get_reagent_amount(/datum/reagent/water)
|
var/water2holy = A.reagents.get_reagent_amount(/datum/reagent/water)
|
||||||
@@ -260,7 +265,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
|
|||||||
|
|
||||||
/obj/item/storage/book/bible/syndicate/attack_self(mob/living/carbon/human/H)
|
/obj/item/storage/book/bible/syndicate/attack_self(mob/living/carbon/human/H)
|
||||||
if (uses)
|
if (uses)
|
||||||
H.mind.isholy = TRUE
|
H.mind.holy_role = HOLY_ROLE_PRIEST
|
||||||
uses -= 1
|
uses -= 1
|
||||||
to_chat(H, "<span class='userdanger'>You try to open the book AND IT BITES YOU!</span>")
|
to_chat(H, "<span class='userdanger'>You try to open the book AND IT BITES YOU!</span>")
|
||||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, TRUE)
|
playsound(src.loc, 'sound/effects/snap.ogg', 50, TRUE)
|
||||||
|
|||||||
@@ -80,14 +80,14 @@
|
|||||||
|
|
||||||
/datum/antagonist/ert/medic/inquisitor/on_gain()
|
/datum/antagonist/ert/medic/inquisitor/on_gain()
|
||||||
. = ..()
|
. = ..()
|
||||||
owner.isholy = TRUE
|
owner.holy_role = HOLY_ROLE_PRIEST
|
||||||
|
|
||||||
/datum/antagonist/ert/security/inquisitor
|
/datum/antagonist/ert/security/inquisitor
|
||||||
outfit = /datum/outfit/centcom/ert/security/inquisitor
|
outfit = /datum/outfit/centcom/ert/security/inquisitor
|
||||||
|
|
||||||
/datum/antagonist/ert/security/inquisitor/on_gain()
|
/datum/antagonist/ert/security/inquisitor/on_gain()
|
||||||
. = ..()
|
. = ..()
|
||||||
owner.isholy = TRUE
|
owner.holy_role = HOLY_ROLE_PRIEST
|
||||||
|
|
||||||
/datum/antagonist/ert/chaplain
|
/datum/antagonist/ert/chaplain
|
||||||
role = "Chaplain"
|
role = "Chaplain"
|
||||||
@@ -98,14 +98,14 @@
|
|||||||
|
|
||||||
/datum/antagonist/ert/chaplain/on_gain()
|
/datum/antagonist/ert/chaplain/on_gain()
|
||||||
. = ..()
|
. = ..()
|
||||||
owner.isholy = TRUE
|
owner.holy_role = HOLY_ROLE_PRIEST
|
||||||
|
|
||||||
/datum/antagonist/ert/commander/inquisitor
|
/datum/antagonist/ert/commander/inquisitor
|
||||||
outfit = /datum/outfit/centcom/ert/commander/inquisitor
|
outfit = /datum/outfit/centcom/ert/commander/inquisitor
|
||||||
|
|
||||||
/datum/antagonist/ert/commander/inquisitor/on_gain()
|
/datum/antagonist/ert/commander/inquisitor/on_gain()
|
||||||
. = ..()
|
. = ..()
|
||||||
owner.isholy = TRUE
|
owner.holy_role = HOLY_ROLE_PRIEST
|
||||||
|
|
||||||
/datum/antagonist/ert/janitor
|
/datum/antagonist/ert/janitor
|
||||||
role = "Janitor"
|
role = "Janitor"
|
||||||
|
|||||||
@@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
/datum/job/chaplain/after_spawn(mob/living/H, mob/M)
|
/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
|
var/obj/item/storage/book/bible/booze/B = new
|
||||||
|
|
||||||
if(GLOB.religion)
|
if(GLOB.religion)
|
||||||
|
if(H.mind)
|
||||||
|
H.mind.holy_role = HOLY_ROLE_PRIEST
|
||||||
B.deity_name = GLOB.deity
|
B.deity_name = GLOB.deity
|
||||||
B.name = GLOB.bible_name
|
B.name = GLOB.bible_name
|
||||||
B.icon_state = GLOB.bible_icon_state
|
B.icon_state = GLOB.bible_icon_state
|
||||||
@@ -36,7 +36,11 @@
|
|||||||
var/nrt = GLOB.holy_weapon_type || /obj/item/nullrod
|
var/nrt = GLOB.holy_weapon_type || /obj/item/nullrod
|
||||||
var/obj/item/nullrod/N = new nrt(H)
|
var/obj/item/nullrod/N = new nrt(H)
|
||||||
H.put_in_hands(N)
|
H.put_in_hands(N)
|
||||||
|
if(GLOB.religious_sect)
|
||||||
|
GLOB.religious_sect.on_conversion(H)
|
||||||
return
|
return
|
||||||
|
if(H.mind)
|
||||||
|
H.mind.holy_role = HOLY_ROLE_HIGHPRIEST
|
||||||
|
|
||||||
var/new_religion = DEFAULT_RELIGION
|
var/new_religion = DEFAULT_RELIGION
|
||||||
if(M.client && M.client.prefs.custom_names["religion"])
|
if(M.client && M.client.prefs.custom_names["religion"])
|
||||||
|
|||||||
@@ -287,7 +287,7 @@
|
|||||||
|
|
||||||
msg += "</span>"
|
msg += "</span>"
|
||||||
|
|
||||||
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"
|
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)
|
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "religious_comfort", /datum/mood_event/religiously_comforted)
|
||||||
|
|
||||||
|
|||||||
@@ -2137,7 +2137,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
|||||||
glass_desc = "boozy Catholicism in a glass."
|
glass_desc = "boozy Catholicism in a glass."
|
||||||
|
|
||||||
/datum/reagent/consumable/ethanol/trappist/on_mob_life(mob/living/carbon/M)
|
/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.adjustFireLoss(-2.5, 0)
|
||||||
M.jitteriness = max(0, M.jitteriness-1)
|
M.jitteriness = max(0, M.jitteriness-1)
|
||||||
M.stuttering = max(0, M.stuttering-1)
|
M.stuttering = max(0, M.stuttering-1)
|
||||||
|
|||||||
195
code/modules/religion/religion_sects.dm
Normal file
195
code/modules/religion/religion_sects.dm
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
/**
|
||||||
|
* # Religious Sects
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
/// Name of the religious sect
|
||||||
|
var/name = "Religious Sect Base Type"
|
||||||
|
/// Description of the religious sect, Presents itself in the selection menu (AKA be brief)
|
||||||
|
var/desc = "Oh My! What Do We Have Here?!!?!?!?"
|
||||||
|
/// Opening message when someone gets converted
|
||||||
|
var/convert_opener
|
||||||
|
/// holder for alignments.
|
||||||
|
var/alignment = ALIGNMENT_GOOD
|
||||||
|
/// Does this require something before being available as an option?
|
||||||
|
var/starter = TRUE
|
||||||
|
/// The Sect's 'Mana'
|
||||||
|
var/favor = 0 //MANA!
|
||||||
|
/// The max amount of favor the sect can have
|
||||||
|
var/max_favor = 1000
|
||||||
|
/// The default value for an item that can be sacrificed
|
||||||
|
var/default_item_favor = 5
|
||||||
|
/// Turns into 'desired_items_typecache', lists the types that can be sacrificed barring optional features in can_sacrifice()
|
||||||
|
var/list/desired_items
|
||||||
|
/// Autopopulated by `desired_items`
|
||||||
|
var/list/desired_items_typecache
|
||||||
|
/// Lists of rites by type. Converts itself into a list of rites with "name - desc (favor_cost)" = type
|
||||||
|
var/list/rites_list
|
||||||
|
/// Changes the Altar of Gods icon
|
||||||
|
var/altar_icon
|
||||||
|
/// Changes the Altar of Gods icon_state
|
||||||
|
var/altar_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)
|
||||||
|
to_chat(L, "<span class='notice'>[convert_opener]</span")
|
||||||
|
|
||||||
|
/// Returns TRUE if the item can be sacrificed. Can be modified to fit item being tested as well as person offering.
|
||||||
|
/datum/religion_sect/proc/can_sacrifice(obj/item/I, mob/living/L)
|
||||||
|
. = TRUE
|
||||||
|
if(!is_type_in_typecache(I,desired_items_typecache))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/// Activates when the sect sacrifices an item. Can provide additional benefits to the sacrificer, which can also be dependent on their holy role! If the item is suppose to be eaten, here is where to do it. NOTE INHER WILL NOT DELETE ITEM FOR YOU!!!!
|
||||||
|
/datum/religion_sect/proc/on_sacrifice(obj/item/I, mob/living/L)
|
||||||
|
return adjust_favor(default_item_favor,L)
|
||||||
|
|
||||||
|
/// Adjust Favor by a certain amount. Can provide optional features based on a user. Returns actual amount added/removed
|
||||||
|
/datum/religion_sect/proc/adjust_favor(amount = 0, mob/living/L)
|
||||||
|
. = amount
|
||||||
|
if(favor + amount < 0)
|
||||||
|
. = favor //if favor = 5 and we want to subtract 10, we'll only be able to subtract 5
|
||||||
|
if((favor + amount > max_favor))
|
||||||
|
. = (max_favor-favor) //if favor = 5 and we want to add 10 with a max of 10, we'll only be able to add 5
|
||||||
|
favor = clamp(0,max_favor, favor+amount)
|
||||||
|
|
||||||
|
/// Sets favor to a specific amount. Can provide optional features based on a user.
|
||||||
|
/datum/religion_sect/proc/set_favor(amount = 0, mob/living/L)
|
||||||
|
favor = clamp(0,max_favor,amount)
|
||||||
|
return favor
|
||||||
|
|
||||||
|
/// Activates when an individual uses a rite. Can provide different/additional benefits depending on the user.
|
||||||
|
/datum/religion_sect/proc/on_riteuse(mob/living/user, obj/structure/altar_of_gods/AOG)
|
||||||
|
|
||||||
|
/// Replaces the bible's bless mechanic. Return TRUE if you want to not do the brain hit.
|
||||||
|
/datum/religion_sect/proc/sect_bless(mob/living/L, mob/living/user)
|
||||||
|
if(!ishuman(L))
|
||||||
|
return FALSE
|
||||||
|
var/mob/living/carbon/human/H = L
|
||||||
|
for(var/X in H.bodyparts)
|
||||||
|
var/obj/item/bodypart/BP = X
|
||||||
|
if(BP.status == BODYPART_ROBOTIC)
|
||||||
|
to_chat(user, "<span class='warning'>[GLOB.deity] refuses to heal this metallic taint!</span>")
|
||||||
|
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("<span class='notice'>[user] heals [H] with the power of [GLOB.deity]!</span>")
|
||||||
|
to_chat(H, "<span class='boldnotice'>May the power of [GLOB.deity] compel you to be healed!</span>")
|
||||||
|
playsound(user, "punch", 25, TRUE, -1)
|
||||||
|
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/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.<br>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("<span class='notice'>[user] charges [R] with the power of [GLOB.deity]!</span>")
|
||||||
|
to_chat(R, "<span class='boldnotice'>You are charged by the power of [GLOB.deity]!</span>")
|
||||||
|
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 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, "<span class='warning'>[GLOB.deity] scoffs at the idea of healing such fleshy matter!</span>")
|
||||||
|
else
|
||||||
|
H.visible_message("<span class='notice'>[user] charges [H] with the power of [GLOB.deity]!</span>")
|
||||||
|
to_chat(H, "<span class='boldnotice'>You feel charged by the power of [GLOB.deity]!</span>")
|
||||||
|
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("<span class='notice'>[user] [did_we_charge ? "repairs" : "repairs and charges"] [H] with the power of [GLOB.deity]!</span>")
|
||||||
|
to_chat(H, "<span class='boldnotice'>The inner machinations of [GLOB.deity] [did_we_charge ? "repairs" : "repairs and charges"] you!</span>")
|
||||||
|
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("<span class='notice'>[GLOB.deity] does not accept pity amounts of power.</span>")
|
||||||
|
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, "<span class='notice'>You offer [the_cell]'s power to [GLOB.deity], pleasing them.</span>")
|
||||||
|
qdel(I)
|
||||||
114
code/modules/religion/religion_structures.dm
Normal file
114
code/modules/religion/religion_structures.dm
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
/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)
|
||||||
|
. = ..()
|
||||||
|
if(!isliving(user))
|
||||||
|
return
|
||||||
|
var/mob/living/L = user
|
||||||
|
if(L.mind?.holy_role && sect_to_altar)
|
||||||
|
. += "<span class='notice'>The sect currently has [round(sect_to_altar.favor)] with [GLOB.deity].</span>"
|
||||||
|
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, "<span class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>")
|
||||||
|
return ..()
|
||||||
|
to_chat(user,"<span class='notice>You try to coax [pushed_mob] onto [src]...</span>")
|
||||||
|
if(!do_after(user,(5 SECONDS),target = pushed_mob))
|
||||||
|
return ..()
|
||||||
|
pushed_mob.forceMove(loc)
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/structure/altar_of_gods/attackby(obj/item/C, mob/user, params)
|
||||||
|
//If we can sac, we do nothing but the sacrifice instead of typical attackby behavior (IE damage the structure)
|
||||||
|
if(sect_to_altar?.can_sacrifice(C,user))
|
||||||
|
sect_to_altar.on_sacrifice(C,user)
|
||||||
|
return TRUE
|
||||||
|
. = ..()
|
||||||
|
//everything below is assumed you're bibling it up
|
||||||
|
if(!istype(C, /obj/item/storage/book/bible))
|
||||||
|
return
|
||||||
|
if(sect_to_altar)
|
||||||
|
if(!sect_to_altar.rites_list)
|
||||||
|
to_chat(user, "<span class='notice'>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,"<span class ='warning'>You cannot perform the rite at this time.</span>")
|
||||||
|
return
|
||||||
|
var/selection2type = sect_to_altar.rites_list[rite_select]
|
||||||
|
performing_rite = new selection2type(src, 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*-1)
|
||||||
|
QDEL_NULL(performing_rite)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(user.mind.holy_role != HOLY_ROLE_HIGHPRIEST)
|
||||||
|
to_chat(user, "<span class='warning'>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)
|
||||||
|
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,"<span class ='warning'>You cannot select a sect at this time.</span>")
|
||||||
|
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)
|
||||||
77
code/modules/religion/rites.dm
Normal file
77
code/modules/religion/rites.dm
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
/datum/religion_rites
|
||||||
|
/// name of the religious rite
|
||||||
|
var/name = "religious rite"
|
||||||
|
/// Description of the religious rite
|
||||||
|
var/desc = "immm gonna rooon"
|
||||||
|
/// length it takes to complete the ritual
|
||||||
|
var/ritual_length = (10 SECONDS) //total length it'll take
|
||||||
|
/// list of invocations said (strings) throughout the rite
|
||||||
|
var/list/ritual_invocations //strings that are by default said evenly throughout the rite
|
||||||
|
/// message when you invoke
|
||||||
|
var/invoke_msg
|
||||||
|
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, "<span class='warning'>This rite requires more favor!</span>")
|
||||||
|
return FALSE
|
||||||
|
to_chat(user, "<span class='notice'>You begin to perform the rite of [name]...</span>")
|
||||||
|
if(!ritual_invocations)
|
||||||
|
if(do_after(user, target = user, delay = ritual_length))
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
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)
|
||||||
|
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("<span class='notice'>[human2borg] has been converted by the rite of [name]!</span>")
|
||||||
|
return TRUE
|
||||||
@@ -165,6 +165,7 @@
|
|||||||
#include "code\_globalvars\logging.dm"
|
#include "code\_globalvars\logging.dm"
|
||||||
#include "code\_globalvars\misc.dm"
|
#include "code\_globalvars\misc.dm"
|
||||||
#include "code\_globalvars\regexes.dm"
|
#include "code\_globalvars\regexes.dm"
|
||||||
|
#include "code\_globalvars\religion.dm"
|
||||||
#include "code\_globalvars\traits.dm"
|
#include "code\_globalvars\traits.dm"
|
||||||
#include "code\_globalvars\lists\achievements.dm"
|
#include "code\_globalvars\lists\achievements.dm"
|
||||||
#include "code\_globalvars\lists\admin.dm"
|
#include "code\_globalvars\lists\admin.dm"
|
||||||
@@ -2697,6 +2698,9 @@
|
|||||||
#include "code\modules\recycling\disposal\outlet.dm"
|
#include "code\modules\recycling\disposal\outlet.dm"
|
||||||
#include "code\modules\recycling\disposal\pipe.dm"
|
#include "code\modules\recycling\disposal\pipe.dm"
|
||||||
#include "code\modules\recycling\disposal\pipe_sorting.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\bepis.dm"
|
#include "code\modules\research\bepis.dm"
|
||||||
#include "code\modules\research\designs.dm"
|
#include "code\modules\research\designs.dm"
|
||||||
#include "code\modules\research\destructive_analyzer.dm"
|
#include "code\modules\research\destructive_analyzer.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user