Skip to content

Commit

Permalink
im sectsy (tgstation#49874)
Browse files Browse the repository at this point in the history
  • Loading branch information
ExcessiveUseOfCobblestone authored Mar 14, 2020
1 parent b916b04 commit 840517f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion code/modules/religion/religion_sects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
if(initial(RI.favor_cost))
name_entry += " ([initial(RI.favor_cost)] favor)"

. += list(name_entry = i)
. += list("[name_entry]" = i)

/// Activates once selected
/datum/religion_sect/proc/on_select()
Expand Down
27 changes: 17 additions & 10 deletions code/modules/religion/religion_structures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,22 @@

/obj/structure/altar_of_gods/examine(mob/user)
. = ..()
if(!isliving(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
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

. += "<span class='notice'>The sect currently has [round(sect_to_altar.favor)] 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)
Expand Down Expand Up @@ -68,12 +75,12 @@
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)
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*-1)
sect_to_altar.adjust_favor(-performing_rite.favor_cost)
QDEL_NULL(performing_rite)
return

Expand Down
1 change: 1 addition & 0 deletions code/modules/religion/rites.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

/datum/religion_rites/synthconversion/perform_rite(mob/living/user, obj/structure/altar_of_gods/AOG)
if(!AOG?.buckled_mobs?.len)
to_chat(user, "<span class='warning'>This rite requires an individual to be buckled to [AOG].</span>")
return FALSE
return ..()

Expand Down

0 comments on commit 840517f

Please sign in to comment.