Skip to content

Commit

Permalink
Polishing and consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Ava committed Mar 13, 2023
1 parent de64c7d commit 317d2a3
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 21 deletions.
2 changes: 2 additions & 0 deletions code/game/gamemodes/cult/arcane_tome.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
return
. = ..()

/// Causes `user` to attempt to create a rune of type `rune_type`, using their blood (or equivalent) as the medium.
/// Inflicts a small amount of damage to the hands and creates blood decals in the process that remain if interrupted.
/obj/item/arcane_tome/proc/scribe_rune(mob/living/user, obj/effect/rune_type)
if (locate(/obj/effect/rune) in get_turf(user))
to_chat(user, SPAN_WARNING("You can only fit one rune on any given space."))
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/cultify/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
G.invisibility = 0
to_chat(G, "<span class='sinister'>You feel relieved as what's left of your soul finally escapes its prison of flesh.</span>")

cult.harvested += G.mind
LAZYADD(cult.harvested, G.mind)
else
dust()

Expand Down
17 changes: 9 additions & 8 deletions code/game/gamemodes/cult/runes/_rune.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,24 @@
/**
* Checks if a given mob can participate as an invoker for this rune.
*
* By default, a mob must be a human, a cultist, and able to speak.
* By default, a mob must be a human or construct, a cultist, and able to speak.
* Arguments:
* * `invoker` - The mob being checked as a possible contributor
* * `silent` - If non-true, shows an error message to the mob being checked. Defaults to `TRUE`
*/
/obj/effect/rune/proc/can_contribute(mob/living/invoker, silent = TRUE)
var/fail_message
if (!ishuman(invoker))
return
var/mob/living/carbon/human/H = invoker
if (!iscultist(H))
if (!iscultist(invoker))
fail_message = "You can't mouth the arcane scratchings without fumbling over them."
else if (H.is_muzzled() || H.silent || (H.sdisabilities & MUTE))
fail_message = "You can't speak the words of \the [src]."
if (ishuman(invoker))
var/mob/living/carbon/human/H = invoker
if (H.is_muzzled() || H.silent || (H.sdisabilities & MUTE))
fail_message = "You can't speak the words of \the [src]."
else if (!istype(invoker, /mob/living/simple_mob/construct))
fail_message = "Your mind cannot comprehend the words of \the [src]."
if (fail_message)
if (!silent)
to_chat(H, SPAN_WARNING(fail_message))
to_chat(invoker, SPAN_WARNING(fail_message))
return
return TRUE

Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/runes/sacrifice.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
if (sacrificing.mind && cult.sacrifice_target == sacrificing.mind)
for (var/mob/living/C in invokers)
to_chat(C, SPAN_OCCULT("The Geometer of Blood is sated. Your objective is now complete."))
cult.sacrificed += sacrificing
LAZYADD(cult.sacrificed, sacrificing)
else
for (var/mob/living/C in invokers)
to_chat(C, SPAN_OCCULT("The Geometer of Blood feasts on your sacrifice. You have pleased It."))
Expand Down
3 changes: 3 additions & 0 deletions code/game/gamemodes/cult/runes/tear_reality.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
if (narsie_cometh)
to_chat(invoker, SPAN_WARNING("The Geometer has already been called forth."))
return
else if (!cult.allow_narsie)
to_chat(invoker, SPAN_WARNING("The Geometer does not wish the veil destroyed here this day."))
return
return TRUE

/obj/effect/rune/tear_reality/invoke(list/invokers)
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/runes/teleport.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/obj/effect/rune/teleport/examine(mob/user, infix, suffix)
. = ..()
if (iscultist(user) || isobserver(user))
. += SPAN_DANGER("This rune has a key word of \"[key_word]\".")
. += SPAN_DANGER("This rune's key word is \"[key_word]\".")

/obj/effect/rune/teleport/after_scribe(mob/living/author)
var/word = input(author, "Choose a key word for this rune.", rune_name) as null|anything in cult.english_words
Expand Down
2 changes: 2 additions & 0 deletions code/game/gamemodes/cult/talismans/_talisman.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
return
return ..()

/// The per-type proc for the talisman actually doing something on activation. This is what you want to override.
/// Some talismans (like Stun) have their own logic and thus ignore this proc.
/obj/item/paper/talisman/proc/invoke(mob/living/user)
return

Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/talismans/armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
var/datum/gender/G = gender_datums[user.get_visible_gender()]
user.visible_message(
SPAN_DANGER("\The [src] expands to briefly envelop \the [user]'s body before [G.he] tears through it in a gushing spurt of black sludge."),
SPAN_DANGER("The talisman expands to wrap you tightly, and you allow it to shroud you with tainted magmellite before you tear through the un-paper.")
SPAN_NOTICE("The talisman expands to wrap you tightly, and you allow it to shroud you with tainted magmellite before you tear through the un-paper.")
)
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/talismans/teleport.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/obj/item/paper/talisman/teleport/examine(mob/user)
. = ..()
if (iscultist(user) || isobserver(user))
. += SPAN_OCCULT("Its key word is \"[key_word]\".")
. += SPAN_DANGER("This talisman's key word is \"[key_word]\".")

/obj/item/paper/talisman/teleport/invoke(mob/living/user)
var/list/runes
Expand Down
3 changes: 1 addition & 2 deletions code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ var/global/list/all_objectives = list()
if(target) explanation_text = "Sacrifice [target.name], the [target.assigned_role]. You will need the sacrifice rune (Hell blood join) and three acolytes to do so."

/datum/objective/cult/sacrifice/check_completion()
return (target && cult && !cult.sacrificed.Find(target))
return (target && cult && LAZYFIND(cult.sacrificed, target))

/datum/objective/rev/find_target()
..()
Expand Down Expand Up @@ -896,4 +896,3 @@ var/global/list/all_objectives = list()
rval = 2
return 0
return rval

15 changes: 9 additions & 6 deletions code/modules/antagonist/station/cultist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ var/global/datum/antagonist/cultist/cult
initial_spawn_target = 6
antaghud_indicator = "hudcultist"

var/allow_narsie = 1
/// Whether or not the Tear Reality rune can be used.
var/allow_narsie = TRUE
/// The mind datum of the mob that this cult must sacrifice to fulfill their objective.
var/datum/mind/sacrifice_target
var/list/sacrificed = list()
var/list/harvested = list()
/// A list of all mobs that this cult has sacrificed. Uses lazylist macros.
var/list/sacrificed
/// A list of all non-cultists that have been killed by Nar-Sie (in the rare event that an admin spawns it or something.) Uses lazylist macros.
var/list/harvested
/// A list of all runes in the game world. Uses lazylist macros.
var/list/all_runes

/**
* So here's how the cult vocabulary works:
Expand All @@ -48,9 +54,6 @@ var/global/datum/antagonist/cultist/cult
var/list/english_words = list(CULT_WORD_BLOOD, CULT_WORD_DESTROY, CULT_WORD_HELL, CULT_WORD_HIDE, CULT_WORD_JOIN, CULT_WORD_OTHER, CULT_WORD_SELF, CULT_WORD_SEE, CULT_WORD_TECHNOLOGY, CULT_WORD_TRAVEL)
var/list/cult_words = list(CULT_WORD_BALAQ, CULT_WORD_CERTUM, CULT_WORD_EGO, CULT_WORD_GEERI, CULT_WORD_IRE, CULT_WORD_KARAZET, CULT_WORD_JATKAA, CULT_WORD_MGAR, CULT_WORD_NAHLIZET, CULT_WORD_VERI)

/// A list of all runes in the game world.
var/list/all_runes

/datum/antagonist/cultist/New()
..()
cult = src
Expand Down

0 comments on commit 317d2a3

Please sign in to comment.