mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Renouncing your religion is now a button in your IC tab. (#30177)
This commit is contained in:
@@ -102,6 +102,26 @@
|
||||
else
|
||||
return R.deity_name
|
||||
|
||||
/mob/proc/renounce_faith()
|
||||
set category = "IC"
|
||||
set name = "Renounce Faith"
|
||||
set desc = "Leave the religion you are currently in."
|
||||
|
||||
if (!mind || !mind.faith)
|
||||
to_chat(src, "<span class='warning'>You have no religion to renounce.</span>")
|
||||
verbs -= /mob/proc/renounce_faith
|
||||
return
|
||||
|
||||
var/datum/religion/R = mind.faith
|
||||
|
||||
if (R.leadsThisReligion(src))
|
||||
to_chat(src, "<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
|
||||
if (alert("Do you wish to renounce [R.name]?","Renouncing a religion","Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
R.renounce(src)
|
||||
verbs -= /mob/proc/renounce_faith
|
||||
|
||||
// This file lists all religions, as well as the prototype for a religion
|
||||
/datum/religion
|
||||
@@ -122,7 +142,6 @@
|
||||
var/list/bible_names = list()
|
||||
var/list/deity_names = list()
|
||||
|
||||
var/datum/action/renounce/action_renounce
|
||||
var/list/keys = list("abstractbasetype") // What you need to type to get this particular relgion.
|
||||
var/converts_everyone = FALSE
|
||||
var/preferred_incense = /obj/item/weapon/storage/fancy/incensebox/harebells
|
||||
@@ -132,9 +151,6 @@
|
||||
/datum/religion/New() // For religions with several bibles/deities
|
||||
if (bible_names.len)
|
||||
bible_name = pick(bible_names)
|
||||
/*if (deity_names.len)
|
||||
deity_name = pick(deity_names)*/
|
||||
action_renounce = new /datum/action/renounce(src)
|
||||
|
||||
/datum/religion/proc/leadsThisReligion(var/mob/living/user)
|
||||
return (user.mind && user.mind == religiousLeader)
|
||||
@@ -217,7 +233,7 @@
|
||||
subject.mind.faith = src
|
||||
adepts += subject.mind
|
||||
if(can_renounce)
|
||||
action_renounce.Grant(subject)
|
||||
subject.verbs |= /mob/proc/renounce_faith
|
||||
if(!default)
|
||||
to_chat(subject, "<span class='good'>You feel your mind become clear and focused as you discover your newfound faith. You are now a follower of [name].</span>")
|
||||
if (!preacher)
|
||||
@@ -258,29 +274,6 @@
|
||||
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.leadsThisReligion(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
|
||||
if (alert("Do you wish to renounce [R.name]?","Renouncing a religion","Yes","No") != "Yes")
|
||||
return FALSE
|
||||
|
||||
R.renounce(owner)
|
||||
Remove(owner)
|
||||
|
||||
// interceptPrayer: Called when anyone (not necessarily one of our adepts!) whispers a prayer.
|
||||
// Return 1 to CANCEL THAT GUY'S PRAYER (!!!), or return null and just do something fun.
|
||||
/datum/religion/proc/interceptPrayer(var/mob/living/L, var/deity, var/prayer_message)
|
||||
|
||||
@@ -5727,7 +5727,7 @@
|
||||
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.verbs -= /mob/proc/renounce_faith
|
||||
M.mind.faith.renounce(M) // Bypass checks
|
||||
|
||||
var/msg = "[key_name(usr)] removed [key_name(M)] from his religion."
|
||||
|
||||
Reference in New Issue
Block a user