From 079127dd59bef54fc545094bf59c5e1e56d6fef4 Mon Sep 17 00:00:00 2001 From: Cebutris Date: Mon, 12 Feb 2018 11:17:38 -0500 Subject: [PATCH] Adds in prayer beads! --- .../code/game/objects/items/holy_weapons.dm | 54 ++++++++++++++++++ modular_citadel/icons/obj/weapons.dmi | Bin 0 -> 417 bytes tgstation.dme | 1 + 3 files changed, 55 insertions(+) create mode 100644 modular_citadel/code/game/objects/items/holy_weapons.dm create mode 100644 modular_citadel/icons/obj/weapons.dmi diff --git a/modular_citadel/code/game/objects/items/holy_weapons.dm b/modular_citadel/code/game/objects/items/holy_weapons.dm new file mode 100644 index 0000000000..76fd13416e --- /dev/null +++ b/modular_citadel/code/game/objects/items/holy_weapons.dm @@ -0,0 +1,54 @@ +/obj/item/nullrod/rosary + icon = 'modular_citadel/icons/obj/weapons.dmi' + icon_state = "rosary" + item_state = null + name = "prayer beads" + desc = "A set of prayer beads used by many of the more traditional religions in space" + force = 0 + throwforce = 0 + var/praying = FALSE + var/deity_name = "Coderbus" //This is the default, hopefully won't actually appear if the religion subsystem is running properly + +/obj/item/nullrod/rosary/Initialize() + .=..() + if(SSreligion.religion) + deity_name = SSreligion.deity + +/obj/item/nullrod/rosary/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + if(!istype(M)) + return ..() + + if(!user.mind || user.mind.assigned_role != "Chaplain") + to_chat(user, "You are not close enough with [deity_name] to use [src].") + return + + if(praying) + to_chat(user, "You are already using [src].") + return + + user.visible_message("[user] kneels[M == user ? null : " next to [M]"] and begins to utter a prayer to [deity_name].", \ + "You kneel[M == user ? null : " next to [M]"] and begin a prayer to [deity_name].") + + praying = TRUE + if(do_after(user, 150, target = M)) + if(istype(M, /mob/living/carbon/human)) // This probably should not work on catpeople. They're unholy abominations. + var/mob/living/carbon/human/target = M + + if(iscultist(M) || is_servant_of_ratvar(M)) //ripped from holywater code. + if(iscultist(M)) + SSticker.mode.remove_cultist(M.mind, FALSE, TRUE) + else if(is_servant_of_ratvar(M)) + remove_servant_of_ratvar(M) + + if(prob(25)) + to_chat(target, "[user]'s prayer to [deity_name] has eased your pain!") + target.adjustToxLoss(-5) + target.adjustOxyLoss(-5) + target.adjustBruteLoss(-5) + target.adjustFireLoss(-5) + + praying = FALSE + + else + to_chat(user, "Your prayer to [deity_name] was interrupted.") + praying = TRUE \ No newline at end of file diff --git a/modular_citadel/icons/obj/weapons.dmi b/modular_citadel/icons/obj/weapons.dmi new file mode 100644 index 0000000000000000000000000000000000000000..bf98931e447948293661eac706a16b07fcfca36b GIT binary patch literal 417 zcmV;S0bc%zP)iGwII*ZwiHkEOv#1y-V93RpR+N~V3SlcNxca$(%>@8mgBq(?+`?J_ z006;BL_t(2k&TZ{4uc>NMuEgVv>pIVufS`>`t^qqaMju1JimDi zjQv?$YNbS3Yka0hv-PXC0yr`#6Nz=y1^fPaqpv$0JfqB8XjkmBMcpLM>FyJzLBS2gb zac0R#Kc^$Rloh~|>SvbM`wFg!;xTnO7%>MP(PjXuD!X(gmp-i@!4x8{oLJ