mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 00:23:29 +01:00
Datumizes Cult. (#24379)
* cult 1 * massive data refactor * progress * More crap * IM SCARED IT COMPILES * oops * more fixes * good comment * hell yeah, team control * lol * blamo * blam * More stuff * team refactor * epic merge fail * src not _src_ * more * progress * cult * more stuff * water * goodbye __IMPLIED_TYPE__ * time to undraft * FUCK FUCK FUCK * okay this is better * goodbye todos * fix * order of operations * last fix? maybe * yeah * oops * okay this should be ALL the fixes * wow * hell yeah * wow * fixes duplicate teams + adds more team safeties * how the fuck did this happen * admin objective improvements * wah more bullshit * guh * fuuuuck * fucking hell * fixes
This commit is contained in:
@@ -23,6 +23,9 @@ GLOBAL_PROTECT(href_token)
|
||||
/// Our currently linked marked datum
|
||||
var/datum/marked_datum
|
||||
|
||||
/// Our index into GLOB.antagonist_teams, so that admins can have pretty tabs in the Check Teams menu.
|
||||
var/team_switch_tab_index = 1
|
||||
|
||||
/datum/admins/New(initial_rank = "Temporary Admin", initial_rights = 0, ckey)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
to_chat(usr, "<span class='boldannounceooc'>Admin rank creation blocked: Advanced ProcCall detected.</span>")
|
||||
|
||||
@@ -643,7 +643,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
antag_list += "Head Rev"
|
||||
if(M.mind.has_antag_datum(/datum/antagonist/rev, FALSE))
|
||||
antag_list += "Revolutionary"
|
||||
if(M.mind in SSticker.mode.cult)
|
||||
if(IS_CULTIST(M))
|
||||
antag_list += "Cultist"
|
||||
if(M.mind in SSticker.mode.syndicates)
|
||||
antag_list += "Nuclear Operative"
|
||||
@@ -989,4 +989,29 @@ GLOBAL_VAR_INIT(gamma_ship_location, 1) // 0 = station , 1 = space
|
||||
result[1]++
|
||||
return result
|
||||
|
||||
/**
|
||||
* Allows admins to safely pick from SSticker.minds for objectives
|
||||
* - caller, mob to ask for results
|
||||
* - blacklist, optional list of targets that are not available
|
||||
* - default_target, the target to show in the list as default
|
||||
*/
|
||||
/proc/get_admin_objective_targets(mob/caller, list/blacklist, mob/default_target)
|
||||
if(!islist(blacklist))
|
||||
blacklist = list(blacklist)
|
||||
|
||||
var/list/possible_targets = list()
|
||||
for(var/datum/mind/possible_target in SSticker.minds)
|
||||
if(!(possible_target in blacklist) && ishuman(possible_target.current))
|
||||
possible_targets += possible_target.current // Allows for admins to pick off station roles
|
||||
|
||||
if(!length(possible_targets))
|
||||
to_chat(caller, "<span class='warning'>No possible target found.</span>")
|
||||
return
|
||||
|
||||
possible_targets = sortAtom(possible_targets)
|
||||
|
||||
var/mob/new_target = input(caller, "Select target:", "Objective target", default_target) as null|anything in possible_targets
|
||||
if(!QDELETED(new_target))
|
||||
return new_target.mind
|
||||
|
||||
#undef PLAYER_NOTES_ENTRIES_PER_PAGE
|
||||
|
||||
@@ -429,34 +429,9 @@
|
||||
/*if(ticker.mode.ninjas.len)
|
||||
dat += check_role_table("Ninjas", ticker.mode.ninjas)*/
|
||||
|
||||
if(SSticker.mode.cult.len)
|
||||
var/datum/game_mode/gamemode = SSticker.mode
|
||||
var/datum/objective/current_sac_obj = gamemode.cult_objs.current_sac_objective()
|
||||
dat += check_role_table("Cultists", SSticker.mode.cult)
|
||||
if(current_sac_obj)
|
||||
dat += "<br>Current cult objective: <br>[current_sac_obj.explanation_text]"
|
||||
else if(gamemode.cult_objs.cult_status == NARSIE_NEEDS_SUMMONING)
|
||||
dat += "<br>Current cult objective: Summon [SSticker.cultdat ? SSticker.cultdat.entity_name : "Nar'Sie"]"
|
||||
else if(gamemode.cult_objs.cult_status == NARSIE_HAS_RISEN)
|
||||
dat += "<br>Current cult objective: Feed [SSticker.cultdat ? SSticker.cultdat.entity_name : "Nar'Sie"]"
|
||||
else if(gamemode.cult_objs.cult_status == NARSIE_HAS_FALLEN)
|
||||
dat += "<br>Current cult objective: Kill all non-cultists"
|
||||
else
|
||||
dat += "<br>Current cult objective: None! (This is most likely a bug, or var editing gone wrong.)"
|
||||
dat += "<br>Sacrifice objectives completed: [gamemode.cult_objs.sacrifices_done]"
|
||||
dat += "<br>Sacrifice objectives needed for summoning: [gamemode.cult_objs.sacrifices_required]"
|
||||
dat += "<br>Summoning locations: [english_list(gamemode.cult_objs.obj_summon.summon_spots)]"
|
||||
dat += "<br><a href='?src=[UID()];cult_mindspeak=[UID()]'>Cult Mindspeak</a>"
|
||||
|
||||
if(gamemode.cult_objs.cult_status == NARSIE_DEMANDS_SACRIFICE)
|
||||
dat += "<br><a href='?src=[UID()];cult_adjustsacnumber=[UID()]'>Modify amount of sacrifices required</a>"
|
||||
dat += "<br><a href='?src=[UID()];cult_newtarget=[UID()]'>Reroll sacrifice target</a>"
|
||||
else
|
||||
dat += "<br>Modify amount of sacrifices required (Summon available!)</a>"
|
||||
dat += "<br>Reroll sacrifice target (Summon available!)</a>"
|
||||
|
||||
dat += "<br><a href='?src=[UID()];cult_newsummonlocations=[UID()]'>Reroll summoning locations</a>"
|
||||
dat += "<br><a href='?src=[UID()];cult_unlocknarsie=[UID()]'>Unlock Nar'Sie summoning</a>"
|
||||
if(SSticker.mode.cult_team)
|
||||
dat += check_role_table("Cultists", SSticker.mode.cult_team.members)
|
||||
dat += "<a href='?src=[UID()];check_teams=1'>View Cult Team & Controls</a><br>"
|
||||
|
||||
if(SSticker.mode.traitors.len)
|
||||
dat += check_role_table("Traitors", SSticker.mode.traitors)
|
||||
|
||||
+22
-63
@@ -1616,12 +1616,30 @@
|
||||
else if(href_list["team_command"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(href_list["team_command"] == "reload") // reload the panel
|
||||
check_teams()
|
||||
return
|
||||
|
||||
var/datum/team/team
|
||||
if(href_list["team_command"] == "new_custom_team") // this needs to be handled before all the other stuff, as the team doesn't exist yet
|
||||
message_admins("[key_name_admin(usr)] created a new custom team.")
|
||||
log_admin("[key_name(usr)] created a new custom team.")
|
||||
team = new()
|
||||
team.admin_rename_team(usr)
|
||||
var/list/possible_teams = list()
|
||||
for(var/datum/team/team_path as anything in typesof(/datum/team))
|
||||
possible_teams[initial(team_path.name)] = team_path
|
||||
|
||||
var/chosen_team_name = input("Select a team type: (Creating a duplicate of a non-generic team may produce runtimes!)", "Team Type") as null|anything in possible_teams
|
||||
if(!chosen_team_name)
|
||||
return
|
||||
|
||||
var/chosen_team_path = possible_teams[chosen_team_name]
|
||||
team = new chosen_team_path()
|
||||
log_and_message_admins("created a new team '[team]' ([chosen_team_path]).")
|
||||
if(chosen_team_path == /datum/team)
|
||||
team.admin_rename_team(usr) // this has to come after, because the admin log could be delayed indefinitely.
|
||||
check_teams()
|
||||
return
|
||||
|
||||
if(href_list["team_command"] == "switch_team_tab")
|
||||
team_switch_tab_index = clamp(text2num(href_list["team_index"]), 1, length(GLOB.antagonist_teams))
|
||||
check_teams()
|
||||
return
|
||||
|
||||
@@ -1692,65 +1710,6 @@
|
||||
else
|
||||
SStickets.convert_to_other_ticket(indexNum)
|
||||
|
||||
else if(href_list["cult_mindspeak"])
|
||||
var/input = stripped_input(usr, "Communicate to all the cultists with the voice of [SSticker.cultdat.entity_name]", "Voice of [SSticker.cultdat.entity_name]")
|
||||
if(!input)
|
||||
return
|
||||
|
||||
for(var/datum/mind/H in SSticker.mode.cult)
|
||||
if(H.current)
|
||||
to_chat(H.current, "<span class='cult'>[SSticker.cultdat.entity_name] murmurs,</span> <span class='cultlarge'>\"[input]\"</span>")
|
||||
|
||||
for(var/mob/dead/observer/O in GLOB.player_list)
|
||||
to_chat(O, "<span class='cult'>[SSticker.cultdat.entity_name] murmurs,</span> <span class='cultlarge'>\"[input]\"</span>")
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has talked with the Voice of [SSticker.cultdat.entity_name].")
|
||||
log_admin("[key_name(usr)] Voice of [SSticker.cultdat.entity_name]: [input]")
|
||||
|
||||
else if(href_list["cult_adjustsacnumber"])
|
||||
var/amount = input("Adjust the amount of sacrifices required before summoning Nar'Sie", "Sacrifice Adjustment", 2) as null | num
|
||||
if(amount > 0)
|
||||
var/datum/game_mode/gamemode = SSticker.mode
|
||||
var/old = gamemode.cult_objs.sacrifices_required
|
||||
gamemode.cult_objs.sacrifices_required = amount
|
||||
message_admins("Admin [key_name_admin(usr)] has modified the amount of cult sacrifices required before summoning from [old] to [amount]")
|
||||
log_admin("Admin [key_name_admin(usr)] has modified the amount of cult sacrifices required before summoning from [old] to [amount]")
|
||||
|
||||
else if(href_list["cult_newtarget"])
|
||||
if(alert(usr, "Reroll the cult's sacrifice target?", "Cult Debug", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
var/datum/game_mode/gamemode = SSticker.mode
|
||||
if(!gamemode.cult_objs.find_new_sacrifice_target())
|
||||
gamemode.cult_objs.ready_to_summon()
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has rerolled the Cult's sacrifice target.")
|
||||
log_admin("Admin [key_name_admin(usr)] has rerolled the Cult's sacrifice target.")
|
||||
|
||||
else if(href_list["cult_newsummonlocations"])
|
||||
if(alert(usr, "Reroll the cult's summoning locations?", "Cult Debug", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
var/datum/game_mode/gamemode = SSticker.mode
|
||||
gamemode.cult_objs.obj_summon.find_summon_locations(TRUE)
|
||||
if(gamemode.cult_objs.cult_status == NARSIE_NEEDS_SUMMONING) //Only update cultists if they are already have the summon goal since they arent aware of summon spots till then
|
||||
for(var/datum/mind/cult_mind in gamemode.cult)
|
||||
if(cult_mind && cult_mind.current)
|
||||
to_chat(cult_mind.current, "<span class='cult'>The veil has shifted! Our summoning will need to take place elsewhere.</span>")
|
||||
to_chat(cult_mind.current, "<span class='cult'>Current goal : [gamemode.cult_objs.obj_summon.explanation_text]</span>")
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has rerolled the Cult's sacrifice target.")
|
||||
log_admin("Admin [key_name_admin(usr)] has rerolled the Cult's sacrifice target.")
|
||||
|
||||
else if(href_list["cult_unlocknarsie"])
|
||||
if(alert(usr, "Unlock the ability to summon Nar'Sie?", "Cult Debug", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
var/datum/game_mode/gamemode = SSticker.mode
|
||||
gamemode.cult_objs.ready_to_summon()
|
||||
message_admins("Admin [key_name_admin(usr)] has unlocked the Cult's ability to summon Nar'Sie.")
|
||||
log_admin("Admin [key_name_admin(usr)] has unlocked the Cult's ability to summon Nar'Sie.")
|
||||
|
||||
else if(href_list["adminplayerobservecoodjump"])
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr))
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
var/antnum = input(owner, "How many cultists do you want to create? Enter 0 to cancel.", "Amount:", 0) as num
|
||||
if(!antnum || antnum <= 0) // 5 because cultist can really screw balance over if spawned in high amount.
|
||||
if(!antnum || antnum <= 0)
|
||||
return
|
||||
log_admin("[key_name(owner)] tried making a Cult with One-Click-Antag")
|
||||
message_admins("[key_name_admin(owner)] tried making a Cult with One-Click-Antag")
|
||||
@@ -171,17 +171,17 @@
|
||||
if(CandCheck(ROLE_CULTIST, applicant, temp))
|
||||
candidates += applicant
|
||||
|
||||
if(length(candidates))
|
||||
var/numCultists = min(length(candidates), antnum)
|
||||
if(!length(candidates))
|
||||
return FALSE
|
||||
|
||||
for(var/I in 1 to numCultists)
|
||||
H = pick(candidates)
|
||||
to_chat(H, CULT_GREETING)
|
||||
SSticker.mode.add_cultist(H.mind)
|
||||
SSticker.mode.equip_cultist(H)
|
||||
candidates.Remove(H)
|
||||
return TRUE
|
||||
return FALSE
|
||||
for(var/I in 1 to antnum)
|
||||
if(!length(candidates))
|
||||
return
|
||||
H = pick_n_take(candidates)
|
||||
|
||||
var/datum/antagonist/cultist/cultist = H.mind.add_antag_datum(/datum/antagonist/cultist)
|
||||
cultist.equip_roundstart_cultist(H)
|
||||
return TRUE
|
||||
|
||||
//Abductors
|
||||
/datum/admins/proc/makeAbductorTeam()
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
cross = image('icons/obj/storage.dmi',"kingyellow")
|
||||
font_color = "blue"
|
||||
prayer_type = "CHAPLAIN PRAYER"
|
||||
else if(iscultist(usr))
|
||||
else if(IS_CULTIST(usr))
|
||||
cross = image('icons/obj/storage.dmi',"tome")
|
||||
font_color = "red"
|
||||
prayer_type = "CULTIST PRAYER"
|
||||
deity = SSticker.cultdat.entity_name
|
||||
deity = GET_CULT_DATA(entity_name, "Cult God")
|
||||
|
||||
log_say("(PRAYER) [msg]", usr)
|
||||
msg = "<span class='notice'>[bicon(cross)]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""][mind && HAS_MIND_TRAIT(usr, TRAIT_HOLY) ? " (blessings: [mind.num_blessed])" : ""]:</font> [key_name(src, 1)] ([ADMIN_QUE(src,"?")]) ([ADMIN_PP(src,"PP")]) ([ADMIN_VV(src,"VV")]) ([ADMIN_TP(src,"TP")]) ([ADMIN_SM(src,"SM")]) ([admin_jump_link(src)]) ([ADMIN_SC(src,"SC")]) (<A HREF='?_src_=holder;Bless=[UID()]'>BLESS</A>) (<A HREF='?_src_=holder;Smite=[UID()]'>SMITE</A>):</b> [msg]</span>"
|
||||
|
||||
Reference in New Issue
Block a user