mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Religious Converting (#16671)
* Religious Converting * Comments * Fix it for real this time * Fixes and testing * Debug code, and other idiocy * HTML * Fixes some things, not all * 2nd round of fixes - Changes the verb to an ability - Changes logging - Changes macro Not complete yet ! * Fixes mostly everything * Finishes it * Reminds leaders of their conversion method * Memes * Chaplains can examine people of their religion. * A few sanity with regards to relgious converting - Admins can't convert a guy who is already a leader - Religious leaders can't convert other religious leaders - When you convert a guy from another religion, it automatically kicks him from his faith * Thanks Damaian * Spelling and redundancy * Runtimes
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
var/role_alt_title
|
||||
|
||||
var/datum/job/assigned_job
|
||||
var/datum/religion/faith
|
||||
|
||||
var/list/kills=list()
|
||||
var/list/datum/objective/objectives = list()
|
||||
@@ -118,6 +119,13 @@
|
||||
output += "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
// -- Religions --
|
||||
if (faith) // This way they can get their religion changed
|
||||
output += "<b>Religion:</b> [faith.name] <br/> \
|
||||
<b>Leader:</b> [faith.religiousLeader] <br/>"
|
||||
|
||||
if (faith.religiousLeader == src)
|
||||
output += "You can convert people by [faith.convert_method] <br />"
|
||||
recipient << browse(output,"window=memory")
|
||||
|
||||
/datum/mind/proc/edit_memory()
|
||||
|
||||
@@ -6,13 +6,18 @@
|
||||
var/bible_name = "The Holy Bible"
|
||||
var/male_adept = "Chaplain"
|
||||
var/female_adept = "Chaplain"
|
||||
var/bible_type = /obj/item/weapon/storage/bible
|
||||
var/convert_method = "splashing them with holy water, holding a bible in hand."
|
||||
|
||||
var/bible_type = /obj/item/weapon/storage/bible
|
||||
var/obj/item/weapon/storage/bible/holy_book
|
||||
|
||||
var/datum/mind/religiousLeader
|
||||
var/list/datum/mind/adepts = list()
|
||||
|
||||
var/list/bible_names = list()
|
||||
var/list/deity_names = list()
|
||||
|
||||
var/datum/action/renounce/action_renounce
|
||||
var/list/keys = list("christianity") // What you need to type to get this particular relgion.
|
||||
|
||||
/datum/religion/New() // For religions with several bibles/deities
|
||||
@@ -20,11 +25,211 @@
|
||||
bible_name = pick(bible_names)
|
||||
if (deity_names.len)
|
||||
deity_name = pick(deity_names)
|
||||
action_renounce = new /datum/action/renounce(src)
|
||||
|
||||
/datum/religion/proc/isReligiousLeader(var/mob/living/user)
|
||||
return (user.mind && user.mind == religiousLeader)
|
||||
|
||||
// Give the chaplain the basic gear, as well as a few misc effects.
|
||||
/datum/religion/proc/equip_chaplain(var/mob/living/carbon/human/H)
|
||||
return TRUE // Nothing to see here, but redefined in some other religions !
|
||||
|
||||
/* ---- RELIGIOUS CONVERSION ----
|
||||
* convertAct() -> convertCeremony() -> convertCheck() -> convert()
|
||||
* Redefine 'convertCeremony' to play out your snowflake ceremony/interactions in your religion datum.
|
||||
* In a saner language, convertCeremony() and convertCheck() would be private methods. Those are UNSAFE procs. Call convertAct() instead.
|
||||
*/
|
||||
|
||||
/* ConvertAct() : here we check if eveything is in place for the conversion, and provide feedback if needed. Sanity for the preacher or the target belongs to the verb in the bible.
|
||||
* - preacher : the guy doing the converting
|
||||
* - subject : the guy being converted
|
||||
* - B : the bible using for the conversion
|
||||
*/
|
||||
/datum/religion/proc/convertAct(var/mob/living/preacher, var/mob/living/subject, var/obj/item/weapon/storage/bible/B)
|
||||
if (B.my_rel != src) // BLASPHEMY
|
||||
to_chat(preacher, "<span class='warning'>You are a heathen to this God. You feel [B.my_rel.deity_name]'s wrath strike you for this blasphemy.</span>")
|
||||
preacher.fire_stacks += 5
|
||||
preacher.IgniteMob()
|
||||
preacher.emote("scream",,, 1)
|
||||
return FALSE
|
||||
if (preacher != religiousLeader.current)
|
||||
to_chat(preacher, "<span class='warning'>You fail to muster enough mental strength to begin the conversion. Only the Spiritual Guide of [name] can perfom this.</span>")
|
||||
return FALSE
|
||||
if (subject.mind.faith == src)
|
||||
to_chat(preacher, "<span class='warning'>You and your target follow the same faith.</span>")
|
||||
return FALSE
|
||||
if (istype(subject.mind.faith) && subject.mind.faith.isReligiousLeader(subject))
|
||||
to_chat(preacher, "<span class='warning'>Your target is already the leader of another religion.</span>")
|
||||
return FALSE
|
||||
else
|
||||
return convertCeremony(preacher, subject)
|
||||
|
||||
/* ConvertCeremony() : the RP ceremony to convert the newfound person.
|
||||
Here we check if we have the tools to convert and play out the little interactions. */
|
||||
|
||||
// This is the default ceremony, for Christianity/Space Jesus
|
||||
/datum/religion/proc/convertCeremony(var/mob/living/preacher, var/mob/living/subject)
|
||||
var/held_beaker = preacher.find_held_item_by_type(/obj/item/weapon/reagent_containers)
|
||||
if (!held_beaker)
|
||||
to_chat(preacher, "You need to hold Holy Water to begin to conversion.")
|
||||
return FALSE
|
||||
var/obj/item/weapon/reagent_containers/B = preacher.held_items[held_beaker]
|
||||
if (B.reagents.get_master_reagent_name() != "Holy Water")
|
||||
to_chat(preacher, "You need to hold Holy Water to begin to conversion.")
|
||||
return FALSE
|
||||
subject.visible_message("\The [preacher] attemps to convert \the [subject] to [name].")
|
||||
if(!convertCheck(subject))
|
||||
subject.visible_message("\The [subject] refuses conversion.")
|
||||
return FALSE
|
||||
|
||||
// Everything is ok : begin the conversion
|
||||
splash_sub(B.reagents, subject, 5, preacher)
|
||||
subject.visible_message("\The [subject] is blessed by \the [preacher] and embraces [name]. Praise [deity_name]!")
|
||||
convert(subject, preacher)
|
||||
return TRUE
|
||||
|
||||
// Here we check if the subject is willing
|
||||
/datum/religion/proc/convertCheck(var/mob/living/subject)
|
||||
var/choice = input(subject, "Do you wish to become a follower of [name]?","Religious converting") in list("Yes", "No")
|
||||
return choice == "Yes"
|
||||
|
||||
// Here is the proc to welcome a new soul in our religion.
|
||||
/datum/religion/proc/convert(var/mob/living/subject, var/mob/living/preacher)
|
||||
// If he already had one
|
||||
if (subject.mind.faith)
|
||||
subject.mind.faith.renounce(subject) // We remove him from that one
|
||||
|
||||
subject.mind.faith = src
|
||||
to_chat(subject, "You feel your mind become clear and focused as you discover your newfound faith. You are now a follower of [name].")
|
||||
adepts += subject.mind
|
||||
action_renounce.Grant(subject)
|
||||
if (!preacher)
|
||||
var/msg = "\The [key_name(subject)] has been converted to [name] without a preacher."
|
||||
message_admins(msg)
|
||||
else
|
||||
var/msg = "[key_name(subject)] has been converted to [name] by \The [key_name(preacher)]."
|
||||
message_admins(msg)
|
||||
|
||||
// Activivating a religion with admin interventions.
|
||||
/datum/religion/proc/activate(var/mob/living/preacher)
|
||||
equip_chaplain(preacher) // We do the misc things related to the religion
|
||||
to_chat(preacher, "A great, intense revelation go through your spirit. You are now the religious leader of [name]. Convert people by [convert_method]")
|
||||
if (holy_book)
|
||||
preacher.put_in_hands(holy_book)
|
||||
else
|
||||
holy_book = new bible_type
|
||||
holy_book.my_rel = src
|
||||
chooseBible(src, preacher)
|
||||
holy_book.name = bible_name
|
||||
preacher.put_in_hands(holy_book)
|
||||
religiousLeader = preacher.mind
|
||||
convert(preacher, null)
|
||||
|
||||
/datum/religion/proc/renounce(var/mob/living/subject)
|
||||
to_chat(subject, "<span class='notice'>You renounce [name].</span>")
|
||||
adepts -= subject.mind
|
||||
subject.mind.faith = null
|
||||
|
||||
// Action : renounce your faith. For players.
|
||||
/datum/action/renounce
|
||||
name = "Renounce faith"
|
||||
desc = "Leave the religion you are currently in."
|
||||
icon_icon = 'icons/obj/clothing/hats.dmi'
|
||||
button_icon_state = "fedora" // :^) Needs a better icon
|
||||
|
||||
/datum/action/renounce/Trigger()
|
||||
var/datum/religion/R = target
|
||||
var/mob/living/M = owner
|
||||
|
||||
if (!R) // No religion, may as well be a good time to remove the icon if it's there
|
||||
Remove(M)
|
||||
return FALSE
|
||||
|
||||
if (R.isReligiousLeader(M))
|
||||
to_chat(M, "<span class='warning'>You are the leader of this flock and cannot forsake them. If you have to, pray to the Gods for release.</span>")
|
||||
return FALSE
|
||||
Remove(owner)
|
||||
R.renounce(owner)
|
||||
|
||||
/proc/chooseBible(var/datum/religion/R, var/mob/user)
|
||||
|
||||
if (!istype(R) || !user)
|
||||
return FALSE
|
||||
|
||||
if (!R.holy_book)
|
||||
return FALSE
|
||||
|
||||
var/book_style = "Bible"
|
||||
|
||||
book_style = input(user, "Which bible style would you like?") as null|anything in list("Bible", "Koran", "Scrapbook", "Creeper", "White Bible", "Holy Light", "Athiest", "[R.holy_book.name == "clockwork slab" ? "Slab":"Tome"]", "The King in Yellow", "Ithaqua", "Scientology", \
|
||||
"the bible melts", "Unaussprechlichen Kulten", "Necronomicon", "Book of Shadows", "Torah", "Burning", "Honk", "Ianism", "The Guide")
|
||||
switch(book_style)
|
||||
if("Koran")
|
||||
R.holy_book.icon_state = "koran"
|
||||
R.holy_book.item_state = "koran"
|
||||
if("Scrapbook")
|
||||
R.holy_book.icon_state = "scrapbook"
|
||||
R.holy_book.item_state = "scrapbook"
|
||||
if("Creeper")
|
||||
R.holy_book.icon_state = "creeper"
|
||||
R.holy_book.item_state = "syringe_kit"
|
||||
if("White Bible")
|
||||
R.holy_book.icon_state = "white"
|
||||
R.holy_book.item_state = "syringe_kit"
|
||||
if("Holy Light")
|
||||
R.holy_book.icon_state = "holylight"
|
||||
R.holy_book.item_state = "syringe_kit"
|
||||
if("Athiest")
|
||||
R.holy_book.icon_state = "athiest"
|
||||
R.holy_book.item_state = "syringe_kit"
|
||||
if("Tome")
|
||||
R.holy_book.icon_state = "tome"
|
||||
R.holy_book.item_state = "syringe_kit"
|
||||
if("The King in Yellow")
|
||||
R.holy_book.icon_state = "kingyellow"
|
||||
R.holy_book.item_state = "kingyellow"
|
||||
if("Ithaqua")
|
||||
R.holy_book.icon_state = "ithaqua"
|
||||
R.holy_book.item_state = "ithaqua"
|
||||
if("Scientology")
|
||||
R.holy_book.icon_state = "scientology"
|
||||
R.holy_book.item_state = "scientology"
|
||||
if("the bible melts")
|
||||
R.holy_book.icon_state = "melted"
|
||||
R.holy_book.item_state = "melted"
|
||||
if("Unaussprechlichen Kulten")
|
||||
R.holy_book.icon_state = "kulten"
|
||||
R.holy_book.item_state = "kulten"
|
||||
if("Necronomicon")
|
||||
R.holy_book.icon_state = "necronomicon"
|
||||
R.holy_book.item_state = "necronomicon"
|
||||
if("Book of Shadows")
|
||||
R.holy_book.icon_state = "shadows"
|
||||
R.holy_book.item_state = "shadows"
|
||||
if("Torah")
|
||||
R.holy_book.icon_state = "torah"
|
||||
R.holy_book.item_state = "torah"
|
||||
if("Burning")
|
||||
R.holy_book.icon_state = "burning"
|
||||
R.holy_book.item_state = "syringe_kit"
|
||||
if("Honk")
|
||||
R.holy_book.icon_state = "honkbook"
|
||||
R.holy_book.item_state = "honkbook"
|
||||
if("Ianism")
|
||||
R.holy_book.icon_state = "ianism"
|
||||
R.holy_book.item_state = "ianism"
|
||||
if("The Guide")
|
||||
R.holy_book.icon_state = "guide"
|
||||
R.holy_book.item_state = "guide"
|
||||
if("Slab")
|
||||
R.holy_book.icon_state = "slab"
|
||||
R.holy_book.item_state = "slab"
|
||||
R.holy_book.desc = "A bizarre, ticking device... That looks broken."
|
||||
else
|
||||
//If christian bible, revert to default
|
||||
R.holy_book.icon_state = "bible"
|
||||
R.holy_book.item_state = "bible"
|
||||
|
||||
// The list of all religions spacemen have designed, so far.
|
||||
/datum/religion/catholic
|
||||
name = "Catholicism"
|
||||
|
||||
@@ -20,10 +20,11 @@ var/datum/controller/gameticker/ticker
|
||||
|
||||
var/list/datum/mind/minds = list()//The people in the game. Used for objective tracking.
|
||||
|
||||
var/Bible_icon_state // icon_state the chaplain has chosen for his bible
|
||||
var/Bible_item_state // item_state the chaplain has chosen for his bible
|
||||
var/Bible_icon_state // icon_state the OFFICIAL chaplain has chosen for his bible
|
||||
var/Bible_item_state // item_state the OFFICIAL chaplain has chosen for his bible
|
||||
var/Bible_name // name of the bible
|
||||
var/Bible_deity_name = "Space Jesus"
|
||||
var/list/datum/religion/religions = list() // Religion(s) in the game
|
||||
|
||||
var/random_players = 0 // if set to nonzero, ALL players who latejoin or declare-ready join will have random appearances/genders
|
||||
|
||||
|
||||
@@ -50,10 +50,13 @@
|
||||
rel.equip_chaplain(H) // We do the misc things related to the religion
|
||||
B = new rel.bible_type
|
||||
B.name = rel.bible_name
|
||||
B.deity_name = rel.deity_name
|
||||
H.put_in_hands(B)
|
||||
B.my_rel = rel
|
||||
rel.holy_book = B
|
||||
H.put_in_hands(B)
|
||||
rel.religiousLeader = H.mind
|
||||
J = (H.gender == FEMALE ? rel.female_adept : rel.male_adept)
|
||||
rel.convert(H, null)
|
||||
to_chat(H, "A great, intense revelation go through your spirit. You are now the religious leader of [rel.name]. Convert people by [rel.convert_method]")
|
||||
chap_religion = rel
|
||||
choice = TRUE
|
||||
break // We got our religion ! Abort, abort.
|
||||
@@ -64,11 +67,15 @@
|
||||
chap_religion.name = "[new_religion]"
|
||||
chap_religion.deity_name = "[new_religion]"
|
||||
chap_religion.bible_name = "The Holy Book of [new_religion]"
|
||||
B = new chap_religion.bible_type
|
||||
B.name = chap_religion.bible_name
|
||||
B.deity_name = chap_religion.deity_name
|
||||
H.put_in_hands(B)
|
||||
chap_religion.equip_chaplain(H) // We do the misc things related to the religion
|
||||
chap_religion.holy_book = B
|
||||
B = new /obj/item/weapon/storage/bible
|
||||
B.name = chap_religion.bible_name
|
||||
B.my_rel = chap_religion
|
||||
H.put_in_hands(B)
|
||||
chap_religion.religiousLeader = H.mind
|
||||
to_chat(H, "A great, intense revelation go through your spirit. You are know the religious leader of [chap_religion.name]. Convert people by [chap_religion.convert_method]")
|
||||
chap_religion.convert(H, null)
|
||||
|
||||
//This goes down here due to problems with loading orders that took me 4 hours to identify
|
||||
var/obj/item/weapon/card/id/I = null
|
||||
@@ -90,7 +97,6 @@
|
||||
var/new_deity = copytext(sanitize(input(H, "Would you like to change your deity? Your deity currently is [chap_religion.deity_name] (Leave empty or unchanged to keep deity name)", "Name of Deity", chap_religion.deity_name)), 1, MAX_NAME_LEN)
|
||||
if(length(new_deity))
|
||||
chap_religion.deity_name = new_deity
|
||||
B.deity_name = new_deity
|
||||
|
||||
var/accepted = 0
|
||||
var/outoftime = 0
|
||||
@@ -216,7 +222,8 @@
|
||||
ticker.Bible_icon_state = B.icon_state
|
||||
ticker.Bible_item_state = B.item_state
|
||||
ticker.Bible_name = B.name
|
||||
ticker.Bible_deity_name = B.deity_name
|
||||
ticker.Bible_deity_name = B.my_rel.deity_name
|
||||
ticker.religions += chap_religion
|
||||
feedback_set_details("religion_deity","[new_deity]")
|
||||
feedback_set_details("religion_book","[new_book_style]")
|
||||
return 1
|
||||
@@ -1,3 +1,5 @@
|
||||
#define isChaplain(user) (user.mind && user.mind.assigned_role == "Chaplain")
|
||||
|
||||
/obj/item/weapon/storage/bible
|
||||
name = "bible"
|
||||
desc = "Apply to head repeatedly."
|
||||
@@ -9,7 +11,8 @@
|
||||
flags = FPRINT
|
||||
attack_verb = list("whacks", "slaps", "slams", "forcefully blesses")
|
||||
var/mob/affecting = null
|
||||
var/deity_name = "Christ"
|
||||
var/datum/religion/my_rel = new /datum/religion
|
||||
actions_types = list(/datum/action/item_action/convert)
|
||||
|
||||
autoignition_temperature = 522 // Kelvin
|
||||
fire_fuel = 2
|
||||
@@ -40,11 +43,6 @@
|
||||
//What happens when you slap things with the Bible in general
|
||||
/obj/item/weapon/storage/bible/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
|
||||
var/chaplain = 0 //Are we the Chaplain ? Used for simplification
|
||||
if(user.mind && (user.mind.assigned_role == "Chaplain"))
|
||||
chaplain = 1 //Indeed we are
|
||||
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
|
||||
@@ -55,16 +53,16 @@
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
if(!chaplain) //The user is not a Chaplain. BLASPHEMY !
|
||||
if (!isChaplain(user) && !isReligiousLeader(user)) //The user is not a Chaplain, nor the leader of this religon. BLASPHEMY !
|
||||
//Using the Bible as a member of the occult will get you smithed, aka holy cleansing fire. You'd have to be stupid to remotely consider it
|
||||
if(isvampire(user)) //Vampire trying to use it
|
||||
to_chat(user, "<span class='danger'>[deity_name] channels through \the [src] and sets you ablaze for your blasphemy!</span>")
|
||||
to_chat(user, "<span class='danger'>[my_rel.deity_name] channels through \the [src] and sets you ablaze for your blasphemy!</span>")
|
||||
user.fire_stacks += 5
|
||||
user.IgniteMob()
|
||||
user.emote("scream",,, 1)
|
||||
M.mind.vampire.smitecounter += 50 //Once we are extinguished, we will be quite vulnerable regardless
|
||||
else if(iscult(user)) //Cultist trying to use it
|
||||
to_chat(user, "<span class='danger'>[deity_name] channels through \the [src] and sets you ablaze for your blasphemy!</span>")
|
||||
to_chat(user, "<span class='danger'>[my_rel.deity_name] channels through \the [src] and sets you ablaze for your blasphemy!</span>")
|
||||
user.fire_stacks += 5
|
||||
user.IgniteMob()
|
||||
user.emote("scream",,, 1)
|
||||
@@ -95,7 +93,7 @@
|
||||
|
||||
if(M.stat == DEAD) //Our target is dead. RIP in peace
|
||||
user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [M]'s lifeless body with \the [src].</span>",
|
||||
"<span class='warning'>You bless [M]'s lifeless body with \the [src], trying to conjure [deity_name]'s mercy on them.</span>")
|
||||
"<span class='warning'>You bless [M]'s lifeless body with \the [src], trying to conjure [my_rel.deity_name]'s mercy on them.</span>")
|
||||
playsound(get_turf(src), "punch", 25, 1, -1)
|
||||
|
||||
//TODO : Way to bring people back from death if they are your followers
|
||||
@@ -103,28 +101,28 @@
|
||||
|
||||
//Our target is alive, prepare the blessing
|
||||
user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [M]'s head with \the [src].</span>",
|
||||
"<span class='warning'>You bless [M]'s head with \the [src]. In the name of [deity_name], bless thee!</span>")
|
||||
"<span class='warning'>You bless [M]'s head with \the [src]. In the name of [my_rel.deity_name], bless thee!</span>")
|
||||
playsound(get_turf(src), "punch", 25, 1, -1)
|
||||
|
||||
if(ishuman(M)) //Only humans can be vampires or cultists
|
||||
if(ishuman(M)) //Only humans can be vampires or cultists. isChaplain() checks are here to ensure only the proper chaplain has the gameplay-related interactions.
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.mind && isvampire(H) && !(VAMP_MATURE in H.mind.vampire.powers)) //The user is a "young" Vampire, fuck up his vampiric powers and hurt his head
|
||||
to_chat(H, "<span class='warning'>[deity_name]'s power nullifies your own!</span>")
|
||||
if(H.mind && isvampire(H) && !(VAMP_MATURE in H.mind.vampire.powers) && isChaplain(user)) //The user is a "young" Vampire, fuck up his vampiric powers and hurt his head
|
||||
to_chat(H, "<span class='warning'>[my_rel.deity_name]'s power nullifies your own!</span>")
|
||||
if(H.mind.vampire.nullified < 5) //Don't actually reduce their debuff if it's over 5
|
||||
H.mind.vampire.nullified = max(5, H.mind.vampire.nullified + 2)
|
||||
H.mind.vampire.smitecounter += 10 //Better get out of here quickly before the problem shows. Ten hits and you are literal toast
|
||||
return 1 //Don't heal the mob
|
||||
|
||||
if(H.mind && iscult(H)) //The user is a Cultist. We are thus deconverting him
|
||||
if(H.mind && iscult(H) && isChaplain(user)) //The user is a Cultist. We are thus deconverting him
|
||||
if(prob(20))
|
||||
to_chat(H, "<span class='notice'>The power of [deity_name] suddenly clears your mind of heresy. Your allegiance to Nar'Sie wanes!</span>")
|
||||
to_chat(user, "<span class='notice'>You see [H]'s eyes become clear. Nar'Sie no longer controls his mind, [deity_name] saved \him!</span>")
|
||||
to_chat(H, "<span class='notice'>The power of [my_rel.deity_name] suddenly clears your mind of heresy. Your allegiance to Nar'Sie wanes!</span>")
|
||||
to_chat(user, "<span class='notice'>You see [H]'s eyes become clear. Nar'Sie no longer controls his mind, [my_rel.deity_name] saved \him!</span>")
|
||||
ticker.mode.remove_cultist(H.mind)
|
||||
else //We aren't deconverting him this time, give the Cultist a fair warning
|
||||
to_chat(H, "<span class='warning'>The power of [deity_name] is overwhelming you. Your mind feverishly questions Nar'Sie's teachings!</span>")
|
||||
to_chat(H, "<span class='warning'>The power of [my_rel.deity_name] is overwhelming you. Your mind feverishly questions Nar'Sie's teachings!</span>")
|
||||
return 1 //Don't heal the mob
|
||||
|
||||
if(H.mind && H.mind.special_role == "VampThrall")
|
||||
if(H.mind && H.mind.special_role == "VampThrall" && isChaplain(user))
|
||||
ticker.mode.remove_thrall(H.mind)
|
||||
H.visible_message("<span class='notice'>[H] suddenly becomes calm and collected again, \his eyes clear up.</span>",
|
||||
"<span class='notice'>Your blood cools down and you are inhabited by a sensation of untold calmness.</span>")
|
||||
@@ -136,7 +134,7 @@
|
||||
/obj/item/weapon/storage/bible/proc/bless_mob(mob/living/carbon/human/user, mob/living/carbon/human/H)
|
||||
var/datum/organ/internal/brain/sponge = H.internal_organs_by_name["brain"]
|
||||
if(sponge && sponge.damage >= 60) //Massive brain damage
|
||||
to_chat(user, "<span class='warning'>[H] responds to \the [src]'s blessing with drooling and an empty stare. [deity_name]'s teachings appear to be lost on this poor soul.</span>")
|
||||
to_chat(user, "<span class='warning'>[H] responds to \the [src]'s blessing with drooling and an empty stare. [my_rel.deity_name]'s teachings appear to be lost on this poor soul.</span>")
|
||||
return //Brainfart
|
||||
//TODO: Put code for followers right here
|
||||
if(prob(20)) //1/5 chance of adding some brain damage. You can't just heal people for free
|
||||
@@ -152,7 +150,7 @@
|
||||
if(!proximity_flag)
|
||||
return
|
||||
user.delayNextAttack(5)
|
||||
if(user.mind && (user.mind.assigned_role == "Chaplain")) //Make sure we still are a Chaplain, just in case
|
||||
if(isChaplain(user) || isReligiousLeader(user)) //Make sure we still are a Chaplain, just in case - or a religious leader of our religion
|
||||
if(A.reagents && A.reagents.has_reagent(WATER)) //Blesses all the water in the holder
|
||||
user.visible_message("<span class='notice'>[user] blesses \the [A].</span>",
|
||||
"<span class='notice'>You bless \the [A].</span>")
|
||||
@@ -166,12 +164,45 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/storage/bible/pickup(mob/living/user as mob)
|
||||
if(user.mind && user.mind.assigned_role == "Chaplain") //We are the Chaplain, yes we are
|
||||
to_chat(user, "<span class ='notice'>You feel [deity_name]'s holy presence as you pick up \the [src].</span>")
|
||||
if(isChaplain(user) || isReligiousLeader(user)) //We are the Chaplain, yes we are
|
||||
to_chat(user, "<span class ='notice'>You feel [my_rel.deity_name]'s holy presence as you pick up \the [src].</span>")
|
||||
if(ishuman(user)) //We are checking for antagonists, only humans can be antagonists
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(isvampire(H) && (!(VAMP_UNDYING in H.mind.vampire.powers))) //We are a Vampire, we aren't very smart
|
||||
to_chat(H, "<span class ='danger'>[deity_name]'s power channels through \the [src]. You feel extremely uneasy as you grab it!</span>")
|
||||
to_chat(H, "<span class ='danger'>[my_rel.deity_name]'s power channels through \the [src]. You feel extremely uneasy as you grab it!</span>")
|
||||
H.mind.vampire.smitecounter += 10
|
||||
if(iscult(H)) //We are a Cultist, we aren't very smart either, but at least there will be no consequences for us
|
||||
to_chat(H, "<span class ='danger'>[deity_name]'s power channels through \the [src]. You feel uneasy as you grab it, but Nar'Sie protects you from its influence!</span>")
|
||||
to_chat(H, "<span class ='danger'>[my_rel.deity_name]'s power channels through \the [src]. You feel uneasy as you grab it, but Nar'Sie protects you from its influence!</span>")
|
||||
|
||||
/obj/item/weapon/storage/bible/proc/isReligiousLeader(var/mob/living/user)
|
||||
return (user.mind && user.mind == my_rel.religiousLeader)
|
||||
|
||||
// Action : convert people
|
||||
|
||||
/datum/action/item_action/convert
|
||||
name = "Convert people"
|
||||
desc = "Convert someone next to you."
|
||||
|
||||
/datum/action/item_action/convert/Trigger()
|
||||
var/obj/item/weapon/storage/bible/B = target
|
||||
|
||||
if (owner.incapacitated() || owner.lying || owner.locked_to || !ishigherbeing(owner)) // Sanity
|
||||
return FALSE
|
||||
if (!owner.mind.faith)
|
||||
to_chat(usr, "<span class='warning'> You do not have a religion to convert people to.</span>")
|
||||
return FALSE
|
||||
|
||||
var/list/mob/living/moblist = range(1, owner)
|
||||
moblist -= owner
|
||||
|
||||
var/mob/living/subject = input(owner, "Who do you wish to convert?", "Religious converting") as null|mob in moblist
|
||||
|
||||
if (!subject)
|
||||
to_chat(owner, "<span class='warning'>No target selected.</span>")
|
||||
return FALSE
|
||||
|
||||
if (subject.incapacitated() || subject.lying || subject.locked_to || !ishigherbeing(subject) || !subject.mind) // Sanity
|
||||
to_chat(owner, "<span class='warning'> \The [subject] does not seem receptive to conversion.</span>")
|
||||
else
|
||||
owner.mind.faith.convertAct(owner, subject, B) // usr = preacher ; target = subject
|
||||
return TRUE
|
||||
@@ -704,6 +704,7 @@ var/global/floorIsLava = 0
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];wages_enabled=enable'>Enable wages</A><br>"
|
||||
dat += "<A href ='?src=\ref[src];econ_panel=open'>Manage accounts database</A><br>"
|
||||
dat += "<A href ='?src=\ref[src];religions=1&display=1'>Manage religions</A><br>"
|
||||
|
||||
usr << browse(dat, "window=admin2;size=280x370")
|
||||
return
|
||||
|
||||
@@ -4580,6 +4580,7 @@
|
||||
wages_enabled = 0
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has disabled wages!")
|
||||
return
|
||||
|
||||
if(href_list["econ_panel"])
|
||||
var/choice = href_list["econ_panel"]
|
||||
EconomyPanel(choice, href_list)
|
||||
@@ -4595,3 +4596,189 @@
|
||||
error_viewer.show_to(owner, locate(href_list["viewruntime_backto"]), href_list["viewruntime_linear"])
|
||||
else
|
||||
error_viewer.show_to(owner, null, href_list["viewruntime_linear"])
|
||||
|
||||
// ----- Religion and stuff
|
||||
if (href_list["religions"])
|
||||
#define MAX_MSG_LENGTH 200
|
||||
#define NUMBER_MAX_REL 4
|
||||
if (href_list["display"])
|
||||
updateRelWindow()
|
||||
|
||||
switch (href_list["religions"])
|
||||
if ("global_subtle_pm")
|
||||
if (!href_list["rel"])
|
||||
return FALSE
|
||||
|
||||
var/datum/religion/R = locate(href_list["rel"])
|
||||
|
||||
if (!istype(R, /datum/religion))
|
||||
return FALSE
|
||||
|
||||
var/deity = sanitize(stripped_input(usr, "Which deity addresses this group of believers?", "Deity Name", R.deity_name), 1, MAX_NAME_LEN)
|
||||
var/message = sanitize(stripped_input(usr, "Which message do you want to send?", "Message", ""), 1, MAX_MSG_LENGTH)
|
||||
|
||||
if (!deity || !message)
|
||||
to_chat(usr, "<span class='warning'>Error: no deity or message selected.</span>")
|
||||
|
||||
for (var/datum/mind/M in R.adepts)
|
||||
to_chat(M.current, "You hear [deity]'s voice in your head... <i>[message]</i>")
|
||||
|
||||
var/msg = "[key_name(usr)] sent message [message] to [R.name]'s adepts as [deity]"
|
||||
message_admins(msg)
|
||||
|
||||
|
||||
if ("new") // --- Busing in a new rel ---
|
||||
// This is copypasted from chaplain code, with adaptations
|
||||
|
||||
if (ticker.religions.len >= NUMBER_MAX_REL)
|
||||
to_chat(usr, "<span class='warning'>Maximum number of religions reached.</span>")
|
||||
return FALSE // Just in case a href exploit allows someone to create a gazillion religions with no purpose.
|
||||
|
||||
var/new_religion = sanitize(stripped_input(usr, "Enter the key to the new religion (leave empty to abort)", "New religion", "Adminbus"), 0, MAX_NAME_LEN)
|
||||
|
||||
if (!new_religion)
|
||||
return FALSE
|
||||
|
||||
var/datum/religion/rel_added
|
||||
|
||||
var/choice = FALSE
|
||||
for (var/R in typesof(/datum/religion))
|
||||
rel_added = new R
|
||||
for (var/key in rel_added.keys)
|
||||
if (lowertext(new_religion) == key)
|
||||
rel_added.holy_book = new rel_added.bible_type
|
||||
rel_added.holy_book.name = rel_added.bible_name
|
||||
rel_added.holy_book.my_rel = rel_added
|
||||
choice = TRUE
|
||||
break // Religion found - time to abort
|
||||
if (choice)
|
||||
break
|
||||
|
||||
if (!choice) // No religion found
|
||||
rel_added = new /datum/religion
|
||||
rel_added.name = "[new_religion]"
|
||||
rel_added.deity_name = "[new_religion]"
|
||||
rel_added.bible_name = "The Holy Book of [new_religion]"
|
||||
rel_added.holy_book = new rel_added.bible_type
|
||||
rel_added.holy_book.name = rel_added.bible_name
|
||||
rel_added.holy_book.my_rel = rel_added
|
||||
|
||||
var/new_deity = copytext(sanitize(input(usr, "Would you like to change the deity? The deity currently is [rel_added.deity_name] (Leave empty or unchanged to keep deity name)", "Name of Deity", rel_added.deity_name)), 1, MAX_NAME_LEN)
|
||||
if(length(new_deity))
|
||||
rel_added.deity_name = new_deity
|
||||
|
||||
// Bible chosing - without preview this time
|
||||
chooseBible(rel_added, usr)
|
||||
|
||||
var/msg = "[key_name(usr)] created a religion: [rel_added.name]."
|
||||
message_admins(msg)
|
||||
|
||||
ticker.religions += rel_added
|
||||
updateRelWindow()
|
||||
if ("delete")
|
||||
if (!href_list["rel"])
|
||||
return FALSE
|
||||
|
||||
var/datum/religion/R = locate(href_list["rel"])
|
||||
|
||||
if (!istype(R, /datum/religion))
|
||||
return FALSE
|
||||
|
||||
if (R.adepts.len)
|
||||
to_chat(usr, "<span class='warning'>You can't delete a religion which has adepts.</span>")
|
||||
return FALSE
|
||||
|
||||
var/msg = "[key_name(usr)] deleted a religion: [R.name]."
|
||||
ticker.religions -= R
|
||||
qdel(R.holy_book)
|
||||
qdel(R)
|
||||
message_admins(msg)
|
||||
updateRelWindow()
|
||||
|
||||
if ("activate")
|
||||
if (!href_list["rel"])
|
||||
return FALSE
|
||||
|
||||
var/datum/religion/R = locate(href_list["rel"])
|
||||
|
||||
if (!istype(R, /datum/religion))
|
||||
return FALSE
|
||||
|
||||
if (R.adepts.len)
|
||||
to_chat(usr, "<span class='warning'>The religion already has adepts!</span>")
|
||||
return FALSE
|
||||
|
||||
if (alert("Do you wish to activate this religion? You will have to pick a player as its guide. Make sure the player is aware your plans!", "Activating a religion", "Yes", "No") != "Yes")
|
||||
return FALSE
|
||||
|
||||
var/list/mob/moblist = list()
|
||||
|
||||
for (var/client/c in clients)
|
||||
if (!c.mob.isDead() && !c.mob.mind.faith) // Can't use dead guys, nor people with already a religion
|
||||
moblist += c.mob
|
||||
|
||||
var/mob/living/carbon/human/preacher = input(usr, "Who should be the leader of this new religion?", "Activating a religion") as null|anything in moblist
|
||||
|
||||
if (alert("Do you want to make \the [preacher] the leader of [R.name] ?", "Activating a religion", "Yes", "No") != "Yes")
|
||||
return FALSE
|
||||
|
||||
if (!preacher)
|
||||
to_chat(world, "<span class='warning'>No mob selected.</span>")
|
||||
return FALSE
|
||||
|
||||
if (!preacher.mind)
|
||||
to_chat(usr, "<span class='warning'>This mob has no mind.</span>")
|
||||
return FALSE
|
||||
|
||||
if (preacher.mind.faith)
|
||||
to_chat(usr, "<span class='warning'>This person already follows a religion.</span>")
|
||||
return FALSE
|
||||
|
||||
R.activate(preacher)
|
||||
var/msg = "[key_name(usr)] activated religion [R.name], with preacher [key_name(preacher)]."
|
||||
message_admins(msg)
|
||||
updateRelWindow()
|
||||
|
||||
if ("renounce")
|
||||
if (!href_list["mob"])
|
||||
return FALSE
|
||||
|
||||
var/mob/living/M = locate(href_list["mob"])
|
||||
|
||||
if (!isliving(M) || !M.mind.faith)
|
||||
return FALSE
|
||||
|
||||
if (M.mind.faith.religiousLeader == M.mind)
|
||||
var/choice = alert("This mob is the leader of the religion. Are you sure you wish to remove him from his faith?", "Removing religion", "Yes", "No")
|
||||
if (choice != "Yes")
|
||||
return FALSE
|
||||
M.mind.faith.action_renounce.Remove(M)
|
||||
M.mind.faith.renounce(M) // Bypass checks
|
||||
|
||||
var/msg = "[key_name(usr)] removed [key_name(M)] from his religion."
|
||||
message_admins(msg)
|
||||
updateRelWindow()
|
||||
|
||||
/datum/admins/proc/updateRelWindow()
|
||||
var/text = list()
|
||||
text += "<h3>Religions in game</h3>"
|
||||
// --- Displaying of all religions ---
|
||||
for (var/datum/religion/R in ticker.religions)
|
||||
text += "<b>Name:</b> [R.name] <br/>"
|
||||
text += "<b>Deity name:</b> [R.deity_name]<br/>"
|
||||
if (!R.adepts.len) // Religion not activated yet
|
||||
text += "No adepts yet. "
|
||||
text += "(<A HREF='?_src_=holder;religions=delete&rel=\ref[R]'>Delete</A>) "
|
||||
text += "(<A HREF='?_src_=holder;religions=activate&rel=\ref[R]'>Activate</A>) <br/>"
|
||||
text += "<br/>"
|
||||
else
|
||||
text += "<b>Leader:</b> \the [R.religiousLeader.current] (<A HREF='?_src_=vars;Vars=\ref[R.religiousLeader.current]'>VV</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[R.religiousLeader.current]'>JMP</A>) \
|
||||
(<A HREF='?_src_=holder;subtlemessage=\ref[R.religiousLeader.current]'>SM</A>)<br/>"
|
||||
text += "<b>Adepts:</b> <ul>"
|
||||
for (var/datum/mind/M in R.adepts)
|
||||
text += "<li>[M.name] (<A HREF='?_src_=vars;Vars=\ref[M.current]'>VV</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[M.current]&;religions=renounce&mob=\ref[M.current]'>JMP</A>) \
|
||||
(<A HREF='?_src_=holder;subtlemessage=\ref[M.current]'>SM</A>) (<A HREF='?_src_=holder;religions=renounce&mob=\ref[M.current]'>Deconvert</A>)</li>"
|
||||
text +="</ul>"
|
||||
text += "<A HREF='?src=\ref[src];religions=global_subtle_pm&rel=\ref[R]'>Subtle PM all believers</a> <br/>"
|
||||
text += "<A HREF='?src=\ref[src];religions=new'>Bus in a new religion</a> <br/>"
|
||||
usr << browse(jointext(text, ""), "window=admin2;size=300x370")
|
||||
@@ -319,7 +319,7 @@
|
||||
B.icon_state = ticker.Bible_icon_state
|
||||
B.item_state = ticker.Bible_item_state
|
||||
B.name = ticker.Bible_name
|
||||
B.deity_name = ticker.Bible_deity_name
|
||||
B.my_rel.deity_name = ticker.Bible_deity_name
|
||||
|
||||
bibledelay = 1
|
||||
spawn(60)
|
||||
|
||||
@@ -723,7 +723,7 @@
|
||||
var/obj/item/weapon/storage/bible/B = locate(/obj/item/weapon/storage/bible) in src.loc
|
||||
if(B)
|
||||
if(iscult(src))
|
||||
to_chat(src, "<span class='sinister'>Nar-Sie shields you from [B.deity_name]'s wrath!</span>")
|
||||
to_chat(src, "<span class='sinister'>Nar-Sie shields you from [B.my_rel.deity_name]'s wrath!</span>")
|
||||
else
|
||||
if(istype(src.head, /obj/item/clothing/head/fedora))
|
||||
to_chat(src, "<span class='notice'>You feel incredibly enlightened after farting on [B]!</span>")
|
||||
@@ -734,13 +734,13 @@
|
||||
if(prob(80)) //20% chance to escape God's justice
|
||||
spawn(rand(10,30))
|
||||
if(src && B)
|
||||
src.show_message("<span class='game say'><span class='name'>[B.deity_name]</span> says, \"Thou hast angered me, mortal!\"",2)
|
||||
src.show_message("<span class='game say'><span class='name'>[B.my_rel.deity_name]</span> says, \"Thou hast angered me, mortal!\"",2)
|
||||
|
||||
sleep(10)
|
||||
|
||||
if(src && B)
|
||||
to_chat(src, "<span class='danger'>You were disintegrated by [B.deity_name]'s bolt of lightning.</span>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Farted on a bible and suffered [B.deity_name]'s wrath.</font>")
|
||||
to_chat(src, "<span class='danger'>You were disintegrated by [B.my_rel.deity_name]'s bolt of lightning.</span>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Farted on a bible and suffered [B.my_rel.deity_name]'s wrath.</font>")
|
||||
|
||||
explosion(get_turf(src),-1,-1,1,5) //Tiny explosion with flash
|
||||
|
||||
|
||||
@@ -238,6 +238,11 @@
|
||||
else if(!client)
|
||||
msg += "[t_He] [t_has] a vacant, braindead stare...\n"
|
||||
|
||||
// Religions
|
||||
if (user.mind && user.mind.faith && user.mind.faith.isReligiousLeader(user))
|
||||
if (src.mind.faith == user.mind.faith)
|
||||
msg += "<span class='notice'>You recognise [t_him] as a follower of [user.mind.faith.name].</span><br/>"
|
||||
|
||||
var/list/wound_flavor_text = list()
|
||||
var/list/is_destroyed = list()
|
||||
var/list/is_bleeding = list()
|
||||
|
||||
@@ -473,7 +473,7 @@
|
||||
if(stat == DEAD) //Can only attempt to unzombify if they're dead
|
||||
if(istype (W, /obj/item/weapon/storage/bible)) //This calls for divine intervention
|
||||
var/obj/item/weapon/storage/bible/bible = W
|
||||
user.visible_message("\The [user] begins whacking at [src] repeatedly with a bible for some reason.", "<span class='notice'>You attempt to invoke the power of [bible.deity_name] to bring this poor soul back from the brink.</span>")
|
||||
user.visible_message("\The [user] begins whacking at [src] repeatedly with a bible for some reason.", "<span class='notice'>You attempt to invoke the power of [bible.my_rel.deity_name] to bring this poor soul back from the brink.</span>")
|
||||
|
||||
var/chaplain = 0 //Are we the Chaplain ? Used for simplification
|
||||
if(user.mind && (user.mind.assigned_role == "Chaplain"))
|
||||
@@ -482,7 +482,7 @@
|
||||
if(do_after(user, src, 25)) //So there's a nice delay
|
||||
if(!chaplain)
|
||||
if(prob(5)) //Let's be generous, they'll only get one regen for this
|
||||
to_chat (user, "<span class='notice'>By [bible.deity_name] it's working!.</span>")
|
||||
to_chat (user, "<span class='notice'>By [bible.my_rel.deity_name] it's working!.</span>")
|
||||
unzombify()
|
||||
else
|
||||
to_chat (user, "<span class='notice'>Well, that didn't work.</span>")
|
||||
@@ -500,7 +500,7 @@
|
||||
holy_modifier += 1
|
||||
|
||||
if(prob(15*holy_modifier)) //Gotta have faith
|
||||
to_chat (user, "<span class='notice'>By [bible.deity_name] it's working!.</span>")
|
||||
to_chat (user, "<span class='notice'>By [bible.my_rel.deity_name] it's working!.</span>")
|
||||
unzombify()
|
||||
else
|
||||
to_chat (user, "<span class='notice'>Well, that didn't work.</span>")
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
/obj/effect/landmark/sc_bible_spawner/New()
|
||||
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible/booze(src.loc)
|
||||
B.name = "The Holy book of the Geometer"
|
||||
B.deity_name = "Narsie"
|
||||
B.my_rel = new /datum/religion/cult
|
||||
B.icon_state = "melted"
|
||||
B.item_state = "melted"
|
||||
new /obj/item/weapon/paper/sc_safehint_paper_bible(B)
|
||||
|
||||
Reference in New Issue
Block a user