mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 05:51:56 +01:00
Fixes Set Religion and Invite to Revolutionaries/Loyalists. (#16959)
* Fixes Set Religion and Invite to Revolutionaries/Loyalists. * cl --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
/mob/living/proc/convert_to_rev(mob/M as mob in oview(src))
|
||||
/mob/living/proc/convert_to_rev()
|
||||
set name = "Invite to the Revolutionaries"
|
||||
set category = "IC"
|
||||
|
||||
var/mob/living/carbon/human/M = input(usr, "Choose someone to convert.", "Invite to the Revolutionaries") as null|mob in orange(world.view, src)
|
||||
if(!M)
|
||||
return
|
||||
if(!M.mind)
|
||||
return
|
||||
for (var/obj/item/implant/mindshield/I in M)
|
||||
if (I.implanted)
|
||||
to_chat(src, "<span class='warning'>[M] is too loyal to be subverted!</span>")
|
||||
return
|
||||
convert_to_faction(M.mind, revs)
|
||||
convert_to_faction(src, M.mind, revs)
|
||||
|
||||
/mob/living/proc/convert_to_faction(var/datum/mind/player, var/datum/antagonist/faction)
|
||||
/proc/convert_to_faction(var/client/antag, var/datum/mind/player, var/datum/antagonist/faction)
|
||||
|
||||
if(!player || !faction || !player.current)
|
||||
return
|
||||
@@ -18,38 +22,42 @@
|
||||
return
|
||||
|
||||
if(faction.is_antagonist(player))
|
||||
to_chat(src, "<span class='warning'>\The [player.current] already serves the [faction.faction_descriptor].</span>")
|
||||
to_chat(antag, "<span class='warning'>\The [player.current] already serves the [faction.faction_descriptor].</span>")
|
||||
return
|
||||
|
||||
if(player_is_antag(player))
|
||||
to_chat(src, "<span class='warning'>\The [player.current]'s loyalties seem to be elsewhere...</span>")
|
||||
to_chat(antag, "<span class='warning'>\The [player.current]'s loyalties seem to be elsewhere...</span>")
|
||||
return
|
||||
|
||||
if(!faction.can_become_antag(player) || isanimal(player.current))
|
||||
to_chat(src, "<span class='warning'>\The [player.current] cannot be \a [faction.faction_role_text]!</span>")
|
||||
to_chat(antag, "<span class='warning'>\The [player.current] cannot be \a [faction.faction_role_text]!</span>")
|
||||
return
|
||||
|
||||
if(world.time < player.rev_cooldown)
|
||||
to_chat(src, "<span class='danger'>You must wait five seconds between attempts.</span>")
|
||||
to_chat(antag, "<span class='danger'>You must wait five seconds between attempts.</span>")
|
||||
return
|
||||
|
||||
to_chat(src, "<span class='danger'>You are attempting to convert \the [player.current]...</span>")
|
||||
log_admin("[src]([src.ckey]) attempted to convert [player.current].",ckey=src.ckey,ckey_target=key_name(player.current))
|
||||
message_admins("<span class='danger'>[src]([src.ckey]) attempted to convert [player.current].</span>")
|
||||
to_chat(antag, "<span class='danger'>You are attempting to convert \the [player.current]...</span>")
|
||||
log_admin("[antag.mob]([antag.ckey]) attempted to convert [player.current].",ckey=antag.ckey,ckey_target=key_name(player.current))
|
||||
message_admins("<span class='danger'>[antag.mob]([antag.ckey]) attempted to convert [player.current].</span>")
|
||||
|
||||
player.rev_cooldown = world.time+100
|
||||
var/choice = alert(player.current,"Asked by [src]: Do you want to join the [faction.faction_descriptor]?","Join the [faction.faction_descriptor]?","No!","Yes!")
|
||||
var/choice = alert(player.current,"Asked by [antag.mob]: Do you want to join the [faction.faction_descriptor]?","Join the [faction.faction_descriptor]?","No!","Yes!")
|
||||
if(choice == "Yes!" && faction.add_antagonist_mind(player, 0, faction.faction_role_text, faction.faction_welcome))
|
||||
to_chat(src, "<span class='notice'>\The [player.current] joins the [faction.faction_descriptor]!</span>")
|
||||
to_chat(antag, "<span class='notice'>\The [player.current] joins the [faction.faction_descriptor]!</span>")
|
||||
return
|
||||
if(choice == "No!")
|
||||
to_chat(player, "<span class='danger'>You reject this subversive cause!</span>")
|
||||
to_chat(src, "<span class='danger'>\The [player.current] does not support the [faction.faction_descriptor]!</span>")
|
||||
to_chat(antag, "<span class='danger'>\The [player.current] does not support the [faction.faction_descriptor]!</span>")
|
||||
|
||||
/mob/living/proc/convert_to_loyalist(mob/M as mob in oview(src))
|
||||
/mob/living/proc/convert_to_loyalist()
|
||||
set name = "Invite to the Loyalists"
|
||||
set category = "IC"
|
||||
|
||||
var/mob/living/carbon/human/M = input(usr, "Choose someone to convert.", "Invite to the Loyalists") as null|mob in orange(world.view, src)
|
||||
if(!M)
|
||||
return
|
||||
if(!M.mind)
|
||||
return
|
||||
convert_to_faction(M.mind, loyalists)
|
||||
convert_to_faction(src, M.mind, loyalists)
|
||||
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
if (religion)
|
||||
|
||||
if(religion.name == "None" || religion.name == "Other")
|
||||
B.verbs += /obj/item/storage/bible/proc/Set_Religion
|
||||
B.verbs += /obj/item/storage/bible/verb/Set_Religion
|
||||
return 1
|
||||
|
||||
B.icon_state = religion.book_sprite
|
||||
|
||||
@@ -42,14 +42,18 @@
|
||||
playsound(src.loc, src.use_sound, 50, 1, -5)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/bible/proc/Set_Religion(mob/user)
|
||||
/obj/item/storage/bible/verb/Set_Religion(mob/user)
|
||||
set name = "Set Religion"
|
||||
set desc = "Set your own religion."
|
||||
set src in usr
|
||||
|
||||
if(use_check(user))
|
||||
return
|
||||
if(!ishuman(user))
|
||||
return
|
||||
|
||||
var/religion_name = "Christianity"
|
||||
var/new_religion = sanitize(input(user, "Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN)
|
||||
var/new_religion = sanitize(input(user, "Would you like to change your religion? Default is Christianity.", "Name change", religion_name), MAX_NAME_LEN)
|
||||
|
||||
if(!new_religion)
|
||||
new_religion = religion_name
|
||||
@@ -129,4 +133,4 @@
|
||||
SSticker.Bible_icon_state = icon_state
|
||||
SSticker.Bible_item_state = item_state
|
||||
|
||||
verbs -= /obj/item/storage/bible/proc/Set_Religion
|
||||
verbs -= /obj/item/storage/bible/verb/Set_Religion
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
if(!bibledelay)
|
||||
|
||||
var/obj/item/storage/bible/B = new /obj/item/storage/bible(src.loc)
|
||||
B.verbs += /obj/item/storage/bible/proc/Set_Religion
|
||||
B.verbs += /obj/item/storage/bible/verb/Set_Religion
|
||||
var/randbook = "book" + pick("1", "2", "3", "4", "5", "6" , "7", "8", "9", "10", "11", "12", "13" , "14", "15" , "16")
|
||||
B.icon_state = randbook
|
||||
B.item_state = randbook
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: MattAtlas
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "Fixed the Invite to Revolutionaries/Loyalists verbs."
|
||||
- bugfix: "Fixed the bible Set Religion verb."
|
||||
Reference in New Issue
Block a user