Files
Bubberstation/code/modules/religion/religion_structures.dm
MrMelbert aae24b1ab2 Sect of the Dream God (#95643)
## About The Pull Request

Adds a new chaplain sect, the sect of the Dream God

This sect gains favor from dreaming and blessing dreamers. 

Their blessing only works on sleeping mobs - hitting a sleeping mob with
your bible will cause it to start dreaming, and if it's already
dreaming, grant favor. Either way, the mob is healed.

For 0 favor, you can **Banish Nightmare** - offering a Nightmare's
corpse rewards favor for banishing bad dreams. If the Nightmare has a
heart, you are rewarded with a special **Sacred Heart** which heals you
while dreaming and sleeping. You can also offer a Nightmare's heart on
its own without the body attached.

For 0 favor, you can **Deaconize Dreamers** - you can deaconize up to 3
dreamers.

For 50 favor, you can have a **Dream Portent** - This rite immediately
makes you fall asleep, and grants you a dream related to something going
on in the round. It may provide insight into something you otherwise
don't know about. If you take damage, the effect ends early.

<img width="374" height="126" alt="image"
src="https://github.com/user-attachments/assets/7c4e12fe-8456-411c-9d39-691e4ac2312d"
/>

For 100 favor, you can **Dream Projection** - this rite allows you to
pick one of your deacons, and forces you to become an imaginary friend
of that deacon. For the duration of the effect you are asleep. If you
are woken up or take damage, the effect ends. If the deacon dies, the
effect ends early.

<img width="492" height="294" alt="image"
src="https://github.com/user-attachments/assets/4e2f6810-15cd-41af-a69f-daa6ddca671a"
/>

For 200 favor, you can give you and your followers **Dream Protection**
- While sleeping and dreaming all damage taken is reduced.

For 200 favor, you can start a **Slumber Party** - All nearby mobs (who
can't block magic and some other asterisks) fall asleep and share a
dream. This form of sleep heals the mob rapidly (also heals holy people
even more).

## Why It's Good For The Game

A new sect for chaplains to sink their teeth into. This one brings a
unique niche, focused around sleeping and fortune telling.

## Changelog

🆑 Melbert
add: Adds the Sect of the Dream God, a new option for chaplains.
/🆑
2026-04-29 00:01:56 +01:00

155 lines
5.5 KiB
Plaintext

/obj/structure/altar
name = "\improper Altar"
desc = "A religious structure. You could lie on it if you wanted to."
icon = 'icons/obj/service/hand_of_god_structures.dmi'
icon_state = "convertaltar"
density = TRUE
anchored = TRUE
layer = TABLE_LAYER
pass_flags_self = PASSSTRUCTURE | PASSTABLE | LETPASSTHROW
can_buckle = TRUE
buckle_lying = 90 //we turn to you!
/// Do we have lit candles?
var/lit_candles = TRUE
/// Optional emissive overlay
var/emissive_icon_state
/obj/structure/altar/Initialize(mapload)
. = ..()
AddElement(/datum/element/climbable)
AddElement(/datum/element/elevation, pixel_shift = 12)
update_appearance(UPDATE_OVERLAYS)
/obj/structure/altar/update_overlays()
. = ..()
if (lit_candles)
. += mutable_appearance(icon, "convertaltarcandle", alpha = src.alpha)
. += emissive_appearance(icon, "convertaltarcandle", src, alpha = src.alpha)
if(emissive_icon_state)
. += emissive_appearance(icon, emissive_icon_state, src, alpha = src.alpha)
/obj/structure/altar/attack_hand(mob/living/user, list/modifiers)
if(!Adjacent(user) || !user.pulling)
return ..()
if(!isliving(user.pulling))
return ..()
var/mob/living/pushed_mob = user.pulling
if(pushed_mob.buckled)
to_chat(user, span_warning("[pushed_mob] is buckled to [pushed_mob.buckled]!"))
return ..()
to_chat(user, span_notice("You try to coax [pushed_mob] onto [src]..."))
if(!do_after(user,(5 SECONDS),target = pushed_mob))
return ..()
pushed_mob.forceMove(loc)
return ..()
/// This one actually has relevance to chaplains
/obj/structure/altar/of_gods
name = "\improper Altar of the Gods"
desc = "An altar which allows the head of the church to choose a sect of religious teachings as well as provide sacrifices to earn favor."
///Avoids having to check global everytime by referencing it locally.
var/datum/religion_sect/sect_to_altar
/obj/structure/altar/of_gods/Initialize(mapload)
. = ..()
AddComponent(/datum/component/religious_tool, ALL, FALSE, CALLBACK(src, PROC_REF(reflect_sect_in_icons)))
reflect_sect_in_icons()
GLOB.chaplain_altars += src
/obj/structure/altar/of_gods/Destroy()
GLOB.chaplain_altars -= src
return ..()
/obj/structure/altar/of_gods/examine_more(mob/user)
if(!isobserver(user))
return ..()
. = list(span_notice("<i>You examine [src] closer, and note the following...</i>"))
if(GLOB.religion)
. += list(span_notice("Deity: [GLOB.deity]."))
. += list(span_notice("Religion: [GLOB.religion]."))
. += list(span_notice("Bible: [GLOB.bible_name]."))
if(GLOB.religious_sect)
. += list(span_notice("Sect: [GLOB.religious_sect]."))
. += list(span_notice("Favor: [GLOB.religious_sect.favor]."))
var/chaplains = get_chaplains()
if(isAdminObserver(user) && chaplains)
. += list(span_notice("Chaplains: [chaplains]."))
/obj/structure/altar/of_gods/proc/reflect_sect_in_icons()
if(isnull(GLOB.religious_sect))
lit_candles = FALSE
icon = initial(icon)
icon_state = initial(icon_state)
emissive_icon_state = initial(emissive_icon_state)
else
sect_to_altar = GLOB.religious_sect
lit_candles = GLOB.religious_sect.candle_overlay
if(sect_to_altar.altar_icon)
icon = sect_to_altar.altar_icon
if(sect_to_altar.altar_icon_state)
icon_state = sect_to_altar.altar_icon_state
if(sect_to_altar.altar_emissive_icon_state)
emissive_icon_state = sect_to_altar.altar_emissive_icon_state
update_appearance(UPDATE_OVERLAYS) //Light the candles!
/obj/structure/altar/of_gods/proc/get_chaplains()
var/chaplain_string = ""
for(var/mob/living/carbon/human/potential_chap in GLOB.player_list)
if(potential_chap.key && is_chaplain_job(potential_chap.mind?.assigned_role))
if(chaplain_string)
chaplain_string += ", "
chaplain_string += "[potential_chap] ([potential_chap.key])"
return chaplain_string
/obj/item/ritual_totem
name = "ritual totem"
desc = "A wooden totem with strange carvings on it."
icon = 'icons/obj/service/hand_of_god_structures.dmi'
icon_state = "ritual_totem"
inhand_icon_state = "sheet-wood"
lefthand_file = 'icons/mob/inhands/items/sheets_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items/sheets_righthand.dmi'
//made out of a single sheet of wood
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT)
item_flags = NO_PIXEL_RANDOM_DROP
/obj/item/ritual_totem/Initialize(mapload)
. = ..()
AddComponent(/datum/component/anti_magic, \
antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_HOLY, \
charges = 1, \
expiration = CALLBACK(src, PROC_REF(expire)), \
)
AddComponent(/datum/component/religious_tool, RELIGION_TOOL_INVOKE, FALSE)
/// When the ritual totem is depleted of antimagic
/obj/item/ritual_totem/proc/expire(mob/user)
to_chat(user, span_warning("[src] consumes the magic within itself and quickly decays into rot!"))
new /obj/effect/decal/cleanable/ash(drop_location())
qdel(src)
/obj/item/ritual_totem/can_be_pulled(user, force)
. = ..()
return FALSE //no
/obj/item/ritual_totem/examine(mob/user)
. = ..()
var/is_holy = user.mind?.holy_role
if(is_holy)
. += span_notice("[src] can only be moved by important followers of [GLOB.deity].")
/obj/item/ritual_totem/pickup(mob/taker)
var/initial_loc = loc
var/holiness = taker.mind?.holy_role
var/no_take = FALSE
if(holiness == NONE)
to_chat(taker, span_warning("Try as you may, you're seemingly unable to pick [src] up!"))
no_take = TRUE
else if(holiness == HOLY_ROLE_DEACON) //deacons cannot pick them up either
no_take = TRUE
to_chat(taker, span_warning("You cannot pick [src] up. It seems you aren't important enough to [GLOB.deity] to do that."))
..()
if(no_take)
taker.dropItemToGround(src)
forceMove(initial_loc)