diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm
index f02f3dd86d8..b8e65a45430 100644
--- a/code/game/antagonist/station/cultist.dm
+++ b/code/game/antagonist/station/cultist.dm
@@ -1,16 +1,14 @@
var/datum/antagonist/cultist/cult
/proc/iscultist(var/mob/player)
- if(!cult || !player.mind)
- return 0
- if(player.mind in cult.current_antagonists)
- return 1
-
-/proc/iscult(var/mob/test)
- if (test.faction == "cult")
- return 1
-
- else return iscultist(test)
+ if(player.faction == "cult")
+ return TRUE
+ if(player.mind)
+ if(player.mind.antag_datums[MODE_CULTIST])
+ return TRUE
+ if(cult && (player.mind in cult.current_antagonists))
+ return TRUE
+ return FALSE
/datum/antagonist/cultist
id = MODE_CULTIST
diff --git a/code/game/gamemodes/cult/cultist_datum.dm b/code/game/gamemodes/cult/cultist_datum.dm
index faf49f52c2b..fd1ebee7b05 100644
--- a/code/game/gamemodes/cult/cultist_datum.dm
+++ b/code/game/gamemodes/cult/cultist_datum.dm
@@ -91,7 +91,7 @@
if(do_after(H, 15 SECONDS))
create_rune(H, chosen_rune)
-/proc/create_rune(var/mob/living/carbon/human/scribe, var/chosen_rune)
+/proc/create_rune(var/mob/living/carbon/human/scribe, var/chosen_rune, var/turf/target_turf)
if(scribe.stat || scribe.incapacitated())
to_chat(scribe, SPAN_WARNING("You are in no shape to do this."))
return
@@ -104,7 +104,11 @@
log_and_message_admins("created \an [chosen_rune] at \the [A.name] - [scribe.loc.x]-[scribe.loc.y]-[scribe.loc.z].") //only message if it's actually made
- var/obj/effect/rune/R = new(get_turf(scribe), SScult.runes_by_name[chosen_rune])
+
+ if(!target_turf)
+ target_turf = get_turf(scribe)
+
+ var/obj/effect/rune/R = new(target_turf, SScult.runes_by_name[chosen_rune])
to_chat(scribe, SPAN_CULT("You finish drawing the Geometer's markings."))
var/datum/rune/actual_rune = R.rune
if(actual_rune.max_number_allowed)
diff --git a/code/game/gamemodes/cult/items/tome.dm b/code/game/gamemodes/cult/items/tome.dm
index 6c769b20c88..8c22c6bf39f 100644
--- a/code/game/gamemodes/cult/items/tome.dm
+++ b/code/game/gamemodes/cult/items/tome.dm
@@ -37,6 +37,16 @@
msg_admin_attack("[key_name_admin(user)] used [name] on [M.name] ([M.ckey]) (JMP)",ckey=key_name(user),ckey_target=key_name(M))
+/obj/item/book/tome/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
+ if(!ishuman(user) || !iscultist(user))
+ return ..()
+ if(!proximity_flag || target.density || !isturf(target))
+ return ..()
+
+ if(use_check_and_message(user))
+ return
+ scribe_rune_to_turf(user, target)
+
/obj/item/book/tome/attack_self(mob/living/user)
if(!ishuman(user))
return
@@ -46,65 +56,64 @@
return
if(iscultist(scribe))
- if(!isturf(scribe.loc))
- to_chat(scribe, SPAN_WARNING("You do not have enough space to write a proper rune."))
- return
-
- var/turf/T = get_turf(scribe)
-
- if(T.is_hole || T.is_space())
- to_chat(scribe, SPAN_WARNING("You are unable to write a rune here."))
- return
-
- switch(tgui_input_list(scribe, "What shall you do with the tome?", "Tome of Nar'sie", list("Read it", "Scribe a rune", "Cancel"), "Cancel"))
- if("Cancel")
- return
- if("Read it")
- if(use_check_and_message(user))
- return
- var/datum/browser/tome_win = new(user, "Arcane Tome", "Nar'Sie's Runes")
- tome_win.set_content(SScult.tome_data)
- tome_win.add_stylesheet("cult", 'html/browser/cult.css')
- tome_win.open()
- return
- if("Scribe a rune")
- //only check if they want to scribe a rune, so they can still read if standing on a rune
- if(locate(/obj/effect/rune) in scribe.loc)
- to_chat(scribe, SPAN_WARNING("There is already a rune in this location."))
- return
-
- if(use_check_and_message(scribe))
- return
-
- var/chosen_rune
- //var/network
- chosen_rune = tgui_input_list(scribe, "Choose a rune to scribe.", "Cultist Tome", SScult.runes_by_name)
- if(!chosen_rune)
- return
-
- var/rune_type = SScult.runes_by_name[chosen_rune]
- if(SScult.check_rune_limit(rune_type))
- to_chat(scribe, SPAN_WARNING("The cloth of reality can't take that much of a strain. Remove some runes first!"))
- return
-
- if(use_check_and_message(scribe))
- return
-
- scribe.visible_message(SPAN_CULT("[scribe] slices open their palm with a ceremonial knife, drawing arcane symbols with their blood..."))
- playsound(scribe, 'sound/weapons/bladeslice.ogg', 50, FALSE)
- scribe.drip(4)
-
- if(do_after(scribe, 5 SECONDS))
- create_rune(scribe, chosen_rune)
+ var/turf/current_turf = get_turf(scribe)
+ scribe_rune_to_turf(user, current_turf)
else
to_chat(user, SPAN_CULT("The book seems full of illegible scribbles."))
+/obj/item/book/tome/proc/scribe_rune_to_turf(var/mob/living/carbon/human/scribe, var/turf/target_turf)
+ if(!isturf(scribe.loc))
+ to_chat(scribe, SPAN_WARNING("You do not have enough space to write a proper rune."))
+ return
+
+ if(target_turf.is_hole || target_turf.is_space())
+ to_chat(scribe, SPAN_WARNING("You are unable to write a rune here."))
+ return
+
+ if(locate(/obj/effect/rune) in scribe.loc)
+ to_chat(scribe, SPAN_WARNING("There is already a rune in this location."))
+ return
+
+ if(use_check_and_message(scribe))
+ return
+
+ var/chosen_rune = tgui_input_list(scribe, "Choose a rune to scribe.", "Cultist Tome", SScult.runes_by_name)
+ if(!chosen_rune)
+ return
+
+ var/rune_type = SScult.runes_by_name[chosen_rune]
+ if(SScult.check_rune_limit(rune_type))
+ to_chat(scribe, SPAN_WARNING("The cloth of reality can't take that much of a strain. Remove some runes first!"))
+ return
+
+ if(use_check_and_message(scribe))
+ return
+
+ scribe.visible_message(SPAN_CULT("[scribe] slices open their palm with a ceremonial knife, drawing arcane symbols with their blood..."))
+ playsound(scribe, 'sound/weapons/bladeslice.ogg', 50, FALSE)
+ scribe.drip(4)
+
+ if(do_after(scribe, 3 SECONDS))
+ create_rune(scribe, chosen_rune, target_turf)
+
/obj/item/book/tome/examine(mob/user)
. = ..()
- if(!iscultist(user) || !isobserver(user))
- to_chat(user, "An old, dusty tome with frayed edges and a sinister looking cover.")
- else
+ if(iscultist(user) || isobserver(user))
to_chat(user, "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though.")
+ to_chat(user, SPAN_WARNING("\[?\] This tome contains arcane knowledge of the Geometer's runes. \[Read Tome\]"))
+ else
+ to_chat(user, "An old, dusty tome with frayed edges and a sinister looking cover.")
+
+/obj/item/book/tome/Topic(href, href_list)
+ if(href_list["read_tome"])
+ if(use_check_and_message(usr))
+ return
+ var/datum/browser/tome_win = new(usr, "Arcane Tome", "Nar'Sie's Runes")
+ tome_win.set_content(SScult.tome_data)
+ tome_win.add_stylesheet("cult", 'html/browser/cult.css')
+ tome_win.open()
+ return
+ return ..()
/obj/item/book/tome/cultify()
return
diff --git a/code/game/gamemodes/cult/structures/pylon.dm b/code/game/gamemodes/cult/structures/pylon.dm
index e859d6e6df9..e3d7d4bb3fa 100644
--- a/code/game/gamemodes/cult/structures/pylon.dm
+++ b/code/game/gamemodes/cult/structures/pylon.dm
@@ -93,7 +93,7 @@
continue
if(L.stat == DEAD)
continue
- if(iscult(L))
+ if(iscultist(L))
continue
if(L == sacrificer)
continue
@@ -151,7 +151,7 @@
//If user is a cultist, speaks message to them with a prefix
//If user is not cultist, then speaks cult-y gibberish
/obj/structure/cult/pylon/proc/speak_to(var/mob/user, var/message)
- if(iscult(user) || (all_languages[LANGUAGE_CULT] in user.languages))
+ if(iscultist(user) || (all_languages[LANGUAGE_CULT] in user.languages))
to_chat(user, "A voice speaks into your mind, [message]")
else
to_chat(user, "A voice speaks into your mind, [lang.scramble(message)]")
@@ -284,7 +284,7 @@
continue //This is mainly for xenoarch antags
if(L.stat == DEAD) //No point shooting at corpses
continue
- if(iscult(L)) //Pylon wont shoot at cultists or constructs
+ if(iscultist(L)) //Pylon wont shoot at cultists or constructs
continue
if(!isInSight(src, L))
continue
@@ -293,7 +293,7 @@
if(!LAZYLEN(mech.pilots))
continue
for(var/mob/M in mech.pilots)
- if(M == sacrificer || iscult(M))
+ if(M == sacrificer || iscultist(M))
continue
target = L
break
diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm
index 0634f4def1b..b5790adf785 100644
--- a/code/modules/projectiles/projectile/beams.dm
+++ b/code/modules/projectiles/projectile/beams.dm
@@ -407,7 +407,7 @@
//Harmlessly passes through cultists and constructs
if (target_mob == ignore)
return 0
- if (iscult(target_mob))
+ if (iscultist(target_mob))
return 0
return ..()
diff --git a/html/changelogs/geeves-cult_rune_tweaks.yml b/html/changelogs/geeves-cult_rune_tweaks.yml
new file mode 100644
index 00000000000..4e8a3d0efda
--- /dev/null
+++ b/html/changelogs/geeves-cult_rune_tweaks.yml
@@ -0,0 +1,7 @@
+author: Geeves
+
+delete-after: True
+
+changes:
+ - tweak: "CULT: Examining the cult tome now gives you the option to read it, instead of it happening every time you go to use it."
+ - tweak: "CULT: Clicking on the floor with a cult rune will now let you scribe a rune there. As a side-effect, you can now scribe multiple runes at the same time."
\ No newline at end of file