Skip to content

Commit

Permalink
The first time you pray will spawn a heretics item
Browse files Browse the repository at this point in the history
  • Loading branch information
Muncher2112 committed Oct 13, 2020
1 parent d5e2a0e commit 29cb0c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions code/modules/mob/living/living_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
var/list/in_vision_cones = list()

var/religion = LEGAL_RELIGION
var/religion_token = null
var/doing_something = 0 //Like pulling teeth?

var/obj/screen/plane_master/blur_all/blur_effect = new
Expand Down
15 changes: 12 additions & 3 deletions code/modules/religion/religion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,21 @@ proc/generate_random_prayer()//This generates a new one.
set name = "Praise your God"

var/datum/religion/user_religion = GLOB.all_religions[religion]
var/timer = 30
var/praise_sound = "sound/effects/Cultistemessage[pick(1,10)].ogg"
//You need your god's item to do this
if(!istype(get_active_hand(), user_religion.holy_item) && !istype(get_inactive_hand(), user_religion.holy_item))
to_chat(src, "<span class='warning'>You can't praise your god without your [user_religion.holy_item]!</span>")
if(isnull(religion_token))
if(do_after(src, timer))
var/T = get_turf(src)
playsound(get_turf(src), praise_sound,30,0)
to_chat(src, "A [user_religion.holy_item] apears at your feet")
var/holy_item_type = GLOB.all_religions[religion].holy_item.type
var/new_holy_item = new holy_item_type(T)
religion_token = new_holy_item
else
to_chat(src, "<span class='warning'>You can't praise your god without your [user_religion.holy_item]!</span>")
return
var/timer = 30
var/praise_sound = "sound/effects/Cultistemessage[pick(1,10)].ogg"
if(!doing_something)
var/self = "You raise your [user_religion.holy_item] and chant praise to your god."
visible_message("<span class='warning'>\The [src] begins speaking praise for their god.</span>", "<span class='notice'>[self]</span>", "[src] praises their god! .")
Expand Down

0 comments on commit 29cb0c4

Please sign in to comment.