mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Confirmation screen for become mask
As requested by Mark
This commit is contained in:
@@ -13,7 +13,7 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list()
|
||||
var/urge = ""
|
||||
var/favor = FAVOR_INDIFFERENT
|
||||
var/cult_name = null
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/New(var/mob/target)
|
||||
owner = target
|
||||
@@ -53,7 +53,7 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list()
|
||||
set desc = "Reach out for your gods presence."
|
||||
set name = "Reach Out"
|
||||
set src in usr
|
||||
|
||||
|
||||
for(var/mob/spirit/mask/currentMask in spirits)
|
||||
if (currentMask.is_active())
|
||||
owner << "\red \b You feel the reassuring presence of your god."
|
||||
@@ -61,8 +61,8 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list()
|
||||
return
|
||||
owner << "\b You feel a chilling absence."
|
||||
handle_missing_mask()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/verb/check_favor()
|
||||
set category = "Cult"
|
||||
set desc = "Check your favor with your god."
|
||||
@@ -82,46 +82,46 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list()
|
||||
set desc = "Pray to your god"
|
||||
set name = "Pray to Nar'Sie"
|
||||
set src in usr
|
||||
|
||||
|
||||
var/input = stripped_input(usr, "Please choose a message to say to your god.", "Pray to Nar'Sie", "")
|
||||
if(!input)
|
||||
return
|
||||
|
||||
|
||||
cult_log("[key_name(usr,0)](Pray):[input]")
|
||||
owner << "<span class='cultspeech'><b>You pray to Nar'Sie</b>: [input]</span>"
|
||||
|
||||
|
||||
for(var/mob/spirit/spirit in spirits)
|
||||
spirit << "<span class='cultspeech'><span class='name'><a href='byond://?src=\ref[spirit];track2=\ref[spirit];track=\ref[usr]'>[get_display_name()]</a> prays : </span><span class='message'>[input]</span></span>"
|
||||
|
||||
|
||||
// PROCS
|
||||
/obj/cult_viewpoint/proc/set_favor(var/newFavor)
|
||||
favor = newFavor
|
||||
check_favor()
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/set_urge(var/newUrge)
|
||||
if (!newUrge)
|
||||
src.urge = null
|
||||
src.urge = copytext(newUrge, 1, MAX_MESSAGE_LEN)
|
||||
check_urge()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/can_use()
|
||||
if (owner.stat != DEAD)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/can_see()
|
||||
return hear(view_range, get_turf(owner))
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/get_cult_name()
|
||||
if (cult_name)
|
||||
return cult_name
|
||||
return "An Unknown Servent"
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/set_cult_name(var/newName)
|
||||
if (!owner)
|
||||
return FALSE
|
||||
@@ -131,47 +131,51 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list()
|
||||
else
|
||||
cult_name = null
|
||||
owner << "\red \b Your god has taken your secret name."
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/get_display_name()
|
||||
if (!owner)
|
||||
return
|
||||
if (cult_name)
|
||||
return cult_name
|
||||
return owner.name
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/become_mask()
|
||||
set category = "Cult"
|
||||
set name = "Become Mask"
|
||||
set desc = "Sacrifice your life and become a Mask of Nar'sie."
|
||||
set src in usr
|
||||
|
||||
|
||||
cult_log("[key_name(usr,0)] has tried to become a Mask of Nar'sie.")
|
||||
|
||||
|
||||
if (!active_mask())
|
||||
var/transformation_type = alert(owner.client, "You are about to become a Mask. Do you want it to be subtle or violent?", "Mask", "Subtle", "Violent")
|
||||
if(!active_mask())
|
||||
cult_log("[key_name(usr,0)] has become a Mask of Nar'sie.")
|
||||
if (transformation_type=="Subtle")
|
||||
log_admin("[key_name_admin(owner)] has subtly become a Mask of Nar'sie")
|
||||
owner.make_into_mask(0,0)
|
||||
else
|
||||
log_admin("[key_name_admin(owner)] has violently become a Mask of Nar'sie")
|
||||
owner.make_into_mask(1,1)
|
||||
var/confirm = alert(owner.client, "You are about to become a Mask of Nar'sie. This will destroy your body, and you will only be able to guide the other cultists through communication. Are you sure?", "Confirm Your Sacrifice", "Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
var/transformation_type = alert(owner.client, "You are about to become a Mask. Do you want it to be subtle or violent?", "Mask", "Subtle", "Violent")
|
||||
if(!active_mask())
|
||||
cult_log("[key_name(usr,0)] has become a Mask of Nar'sie.")
|
||||
if (transformation_type=="Subtle")
|
||||
log_admin("[key_name_admin(owner)] has subtly become a Mask of Nar'sie")
|
||||
owner.make_into_mask(0,0)
|
||||
else
|
||||
log_admin("[key_name_admin(owner)] has violently become a Mask of Nar'sie")
|
||||
owner.make_into_mask(1,1)
|
||||
else
|
||||
return
|
||||
else
|
||||
owner << "\b You cannot become a mask of Nar'Sie because a Mask already exists."
|
||||
mask_has_been_found()
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/active_mask()
|
||||
for(var/mob/spirit/mask/currentMask in spirits)
|
||||
if (currentMask.is_active())
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/handle_missing_mask()
|
||||
if (active_mask())
|
||||
mask_has_been_found()
|
||||
@@ -183,19 +187,19 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list()
|
||||
for(var/obj/cult_viewpoint/viewpoint in cult_viewpoints)
|
||||
if (viewpoint.verbs.Find(/obj/cult_viewpoint/proc/become_mask))
|
||||
viewpoint.verbs-=/obj/cult_viewpoint/proc/become_mask
|
||||
|
||||
|
||||
|
||||
/obj/cult_viewpoint/proc/mask_is_missing()
|
||||
for(var/obj/cult_viewpoint/viewpoint in cult_viewpoints)
|
||||
if (!viewpoint.verbs.Find(/obj/cult_viewpoint/proc/become_mask))
|
||||
viewpoint.verbs+=/obj/cult_viewpoint/proc/become_mask
|
||||
|
||||
|
||||
|
||||
|
||||
/proc/getCultViewpoint(var/mob/currentMob)
|
||||
for(var/obj/cult_viewpoint/currentView in currentMob)
|
||||
return currentView
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
#undef FAVOR_PLEASED
|
||||
#undef FAVOR_INDIFFERENT
|
||||
|
||||
Reference in New Issue
Block a user