Files
VOREStation/code/game/objects/items/weapons/storage/bible.dm
T
Cameron Lennox d5849910e5 Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix

Begins the work to make everything call back to parent for attack_self so that signals are sacred.

* Makes MORE things call the attack_self() parent

Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'.

* Finishes making the rest of attack_self call parent.

As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items.

* begone foul demon

* some more cleanup

* These

* GOD this was annoying

* yeh

* Fix this

* fLARES

* Thesee too

* toys!

* Even more!

* More fixes

* Even more

* rest of em

* these too

* Update syndie.dm

* hardref clear

* Update code/game/gamemodes/nuclear/pinpointer.dm

* Update code/game/objects/effects/mines.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/contraband_vr.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/weapons/gift_wrappaper.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* these too

* Update maintpanel_stack.dm

* angry warning

* Fixes packaged snacks.

Fixes improper var default.

* Special handling for these

* proper poly types

* Fixes magclaws

Makes the 'features' it had just part  of base magboots that can be adjusted via varswap.

* Fixes jackets

Fixes https://github.com/VOREStation/VOREStation/issues/18941

* Small bugfix

Makes p_Theyre properly capitialize
Makes examine show proper wording

* Update gift_wrappaper.dm
2025-12-29 13:21:10 -05:00

121 lines
4.0 KiB
Plaintext

GLOBAL_LIST_INIT(biblenames, list(
"Bible", "Koran", "Scrapbook",
"Pagan", "White Bible", "Holy Light",
"Athiest", "Tome", "The King in Yellow",
"Ithaqua", "Scientology", "the bible melts",
"Necronomicon", "Orthodox", "Torah"))
//If you get these two lists not matching in size, there will be runtimes and I will hurt you in ways you couldn't even begin to imagine
// if your bible has no custom itemstate, use one of the existing ones
GLOBAL_LIST_INIT(biblestates, list(
"bible", "koran", "scrapbook",
"shadows", "white", "holylight",
"athiest", "tome", "kingyellow",
"ithaqua", "scientology", "melted",
"necronomicon", "orthodoxy", "torah"))
GLOBAL_LIST_INIT(bibleitemstates, list(
"bible", "koran", "scrapbook",
"syringe_kit", "syringe_kit", "syringe_kit",
"syringe_kit", "syringe_kit", "kingyellow",
"ithaqua", "scientology", "melted",
"necronomicon", "bible", "clipboard"))
/obj/item/storage/bible
name = "bible"
desc = "Apply to head repeatedly."
icon_state ="bible"
item_state = "bible"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_books.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_books.dmi'
)
throw_speed = 1
throw_range = 5
w_class = ITEMSIZE_NORMAL
var/mob/affecting = null
var/deity_name = "Christ"
use_sound = 'sound/bureaucracy/bookopen.ogg'
drop_sound = 'sound/bureaucracy/bookclose.ogg'
special_handling = TRUE
/obj/item/storage/bible/attack_self(mob/living/carbon/human/user)
. = ..(user)
if(.)
return TRUE
if(user?.mind?.assigned_role != JOB_CHAPLAIN)
return FALSE
if (!user.mind.my_religion)
return FALSE
if (!user.mind.my_religion.configured)
var/list/skins = list()
for(var/i in 1 to GLOB.biblestates.len)
var/image/bible_image = image(icon = 'icons/obj/storage.dmi', icon_state = GLOB.biblestates[i])
skins += list("[GLOB.biblenames[i]]" = bible_image)
var/choice = show_radial_menu(user, src, skins, custom_check = CALLBACK(src, PROC_REF(check_menu), user), radius = 40, require_near = TRUE)
if(!choice)
return FALSE
var/bible_index = GLOB.biblenames.Find(choice)
if(!bible_index)
return FALSE
user.mind.my_religion.bible_icon_state = GLOB.biblestates[bible_index]
user.mind.my_religion.bible_item_state = GLOB.bibleitemstates[bible_index]
user.mind.my_religion.configured = TRUE
deity_name = user.mind.my_religion.deity
name = user.mind.my_religion.bible_name
icon_state = user.mind.my_religion.bible_icon_state
item_state = user.mind.my_religion.bible_item_state
to_chat(user, span_notice("You invoke [user.mind.my_religion.deity] and prepare a copy of [src]."))
/**
* Checks if we are allowed to interact with a radial menu
*
* Arguments:
* * user The mob interacting with the menu
*/
/obj/item/storage/bible/proc/check_menu(mob/living/carbon/human/user)
if(user.mind.my_religion.configured)
return FALSE
if(!istype(user))
return FALSE
if(user.get_active_hand() != src)
return FALSE
if(user.incapacitated())
return FALSE
if(user.mind.assigned_role != JOB_CHAPLAIN)
return FALSE
return TRUE
/obj/item/storage/bible/booze
name = "bible"
desc = "To be applied to the head repeatedly."
icon_state ="bible"
/obj/item/storage/bible/booze/Initialize(mapload)
. = ..()
starts_with = list(
/obj/item/reagent_containers/food/drinks/bottle/small/beer,
/obj/item/reagent_containers/food/drinks/bottle/small/beer,
/obj/item/spacecash/c100,
/obj/item/spacecash/c100,
/obj/item/spacecash/c100
)
/obj/item/storage/bible/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(user.mind && (user.mind.assigned_role == JOB_CHAPLAIN))
if(A.reagents && A.reagents.has_reagent(REAGENT_ID_WATER)) //blesses all the water in the holder
to_chat(user, span_notice("You bless [A]."))
var/water2holy = A.reagents.get_reagent_amount(REAGENT_ID_WATER)
A.reagents.del_reagent(REAGENT_ID_WATER)
A.reagents.add_reagent(REAGENT_ID_HOLYWATER,water2holy)
/obj/item/storage/bible/attackby(obj/item/W as obj, mob/user as mob)
if (src.use_sound)
playsound(src, src.use_sound, 50, 1, -5)
..()