Cult Polish and admin QoL (#36578)

* better pillar lights

* more scoreboard cult info, and admin panel info

* derp

* remove leftover soulstone cap

* herp

* geez

* change

* ahhhh

* polish

* ahem
This commit is contained in:
DeityLink
2024-05-26 12:34:34 +02:00
committed by GitHub
parent 85cf4a2731
commit 54b400ddfe
6 changed files with 85 additions and 23 deletions

View File

@@ -235,6 +235,13 @@
dat += "<br>Accumulated devotion: [total_devotion]"
switch(stage)
if (BLOODCULT_STAGE_NORMAL)
dat += "<br>Eclipse progress: [round((eclipse_progress/eclipse_target)*100)]%"
else
if (sun && sun.eclipse_manager)
var/seconds_to_eclipse = (sun.eclipse_manager.eclipse_start_time - cult_founding_time)/10
dat += "<br>Eclipse arrival: [round(seconds_to_eclipse/3600)]h [add_zero(num2text(round(seconds_to_eclipse/60) % 60), 2)]m [add_zero(num2text(round(seconds_to_eclipse) % 60), 2)]s"
if (cult_won)
dat += "<br><font color='green'><B>[end_message]</B></font>"
@@ -414,7 +421,8 @@
if (M)
to_chat(M, "<span class='sinister'>Someone has completed a ritual, rewarding the entire cult...soon another ritual will take its place.</span>")
spawn(10 MINUTES)
replace_rituals(ritual_slot)
if (!rituals[ritual_slot])
replace_rituals(ritual_slot)
#define HUDICON_BLINKDURATION 10
/datum/faction/bloodcult/update_hud_icons(var/offset = 0,var/factions_with_icons = 0)
@@ -503,6 +511,42 @@
if (R.antag.name in deconverted)
deconverted -= R.antag.name
/datum/faction/bloodcult/AdminPanelEntry(var/datum/admins/A)
var/list/dat = ..()
dat += "<br>accumulated devotion: [total_devotion]"
dat += "<br>available rituals: "
for (var/ritual_slot in rituals)
if (rituals[ritual_slot])
var/datum/bloodcult_ritual/my_ritual = rituals[ritual_slot]
dat += "[my_ritual.name] - "
else
dat += "<i>cooldown</i> - "
dat += "<a href='?src=\ref[src];replaceritual=1'>\[Replace\]</a><br>"
return dat
/datum/faction/bloodcult/Topic(href, href_list)
..()
if(!usr.check_rights(R_ADMIN))
message_admins("[usr] tried to access bloodcult faction Topic() without permissions.")
return
if(!usr.client || !usr.client.holder)
return
if(href_list["replaceritual"])
var/choice = alert(usr,"Which ritual do you want to replace?","Replace Ritual","first ritual","second ritual","third ritual")
switch(choice)
if ("first ritual")
replace_rituals(RITUAL_FACTION_1)
usr.client.holder.check_antagonists()
if ("second ritual")
replace_rituals(RITUAL_FACTION_2)
usr.client.holder.check_antagonists()
if ("third ritual")
replace_rituals(RITUAL_FACTION_3)
usr.client.holder.check_antagonists()
/datum/faction/bloodcult/HandleNewMind(var/datum/mind/M)
. = ..()
M.special_role = "Cultist"

View File

@@ -1473,7 +1473,7 @@ var/list/cult_spires = list()
/obj/structure/cult/pillar/update_icon()
icon_state = "pillar[alt ? "alt": ""]2"
set_light(1, 2, LIGHT_COLOR_RED)
set_light(1.5, 2.5, LIGHT_COLOR_RED)
overlays.len = 0
if (health < maxHealth/3)
icon_state = "pillar[alt ? "alt": ""]0"

View File

@@ -65,7 +65,8 @@
to_chat(M, "<span class='sinister'>The Eclipse is entering overtime. Even though its time as run out, Nar-Sie won't let it end as long as the Tear Reality rune is still active, or the Blood Stone is still standing.</span>")
else if (!problem_announcement && (world.time >= eclipse_problem_announcement))
problem_announcement = TRUE
command_alert(/datum/command_alert/eclipse_too_long)
if (cult.stage == BLOODCULT_STAGE_READY)//no point warning the crew if the cult has already made itself known
command_alert(/datum/command_alert/eclipse_too_long)
/datum/eclipse_manager/proc/eclipse_end()
processing_objects -= src

View File

@@ -97,6 +97,30 @@
return {"<a href='?_src_=holder;adminplayeropts=\ref[AP]'>astral projecting</a>"}
return "logged out"
/datum/role/cultist/AdminPanelEntry(var/show_logo = FALSE,var/datum/admins/A)
var/dat = ..()
dat += " - <a href='?src=\ref[src]&mind=\ref[antag]&givedevotion=1'>Give devotion ([devotion])</a>"
return dat
/datum/role/cultist/RoleTopic(href, href_list, var/datum/mind/M, var/admin_auth)
..()
if (!usr.client.holder)
return FALSE
if (href_list["givedevotion"])
var/amount = input("How much would you like to give?", "Giving devotion") as null|num
if (!amount)
return FALSE
gain_devotion(amount, DEVOTION_TIER_4)
if (href_list["replaceritual"])
var/choice = alert(usr,"Which ritual do you want to replace?","Replace Ritual","first ritual","second ritual")
switch(choice)
if ("first ritual")
replace_rituals(RITUAL_CULTIST_1)
antag.role_panel()
if ("second ritual")
replace_rituals(RITUAL_CULTIST_2)
antag.role_panel()
/datum/role/cultist/process()
..()
if (holywarning_cooldown > 0)
@@ -226,6 +250,15 @@
/datum/role/cultist/extraPanelButtons()
var/dat = ""
dat += " - <a href='?src=\ref[src]&mind=\ref[antag]&givedevotion=1'>Give devotion ([devotion])</a>"
dat += "<br>rituals: "
for (var/ritual_slot in rituals)
if (rituals[ritual_slot])
var/datum/bloodcult_ritual/my_ritual = rituals[ritual_slot]
dat += "[my_ritual.name] - "
else
dat += "<i>cooldown</i> - "
dat += "<a href='?src=\ref[src]&mind=\ref[antag]&replaceritual=1'>\[Replace\]</a>"
if (mentor)
dat = "<br>Currently under the mentorship of <b>[mentor.antag.name]/([mentor.antag.key])</b><br>"
if (acolytes.len)
@@ -372,7 +405,7 @@
if (M)
to_chat(M, "<span class='sinister'>You have completed a ritual and been reward for your devotion...soon another ritual will take its place.</span>")
spawn(5 MINUTES)
if (!gcDestroyed)
if (!gcDestroyed && !rituals[ritual_slot])
replace_rituals(ritual_slot)
if (faction && (faction.stage != BLOODCULT_STAGE_ECLIPSE))
var/datum/faction/bloodcult/cult = faction
@@ -393,7 +426,8 @@
else
to_chat(M, "<span class='sinister'>Someone has completed a ritual, rewarding the entire cult...soon another ritual will take its place.</span>")
spawn(10 MINUTES)
cult.replace_rituals(ritual_slot)
if (!cult.rituals[ritual_slot])
cult.replace_rituals(ritual_slot)
//The more devotion the cultist has acquired, the less devotion they obtain from lesser rituals
switch (get_devotion_rank() - tier)

View File

@@ -220,23 +220,6 @@
if (istype(receptacle, /obj/item/soulstone/gem))
gem = TRUE
var/mob/victim
if (iscarbon(target))
victim = target
else if (istype(target, /obj/item/organ/external/head))
var/obj/item/organ/external/head/target_head = target
victim = target_head.brainmob
if (victim)
//First off let's check that the cult isn't bypassing its convertee cap
if (iscultist(user))
if (!iscultist(victim))
var/datum/faction/bloodcult/cult = find_active_faction_by_type(/datum/faction/bloodcult)
if (cult && !cult.CanConvert())
if (!blade || victim.isDead())
to_chat(user, "<span class='danger'>The cult has too many members already, \the [soul_receptacle] won't let you take their soul. Although you could bypass this restriction by sacrificing them at an Altar with this blade instead.</span>")
return
if (iscarbon(target))
init_body(target,user)

View File

@@ -44,4 +44,4 @@
dat += "<br/>"
dat += "</body></html>"
usr << browse(dat, "window=roundstatus;size=700x500")
usr << browse(dat, "window=roundstatus;size=750x500")