mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 21:17:44 +01:00
Fixes chaplains not being able to assign their deity/religion plus some minor refactor of the religion subsystem
This commit is contained in:
@@ -15,37 +15,31 @@
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
/obj/item/weapon/nullrod/attack_self(mob/user)
|
||||
if(reskinned)
|
||||
return
|
||||
if(user.mind && (user.mind.isholy))
|
||||
if(user.mind && (user.mind.isholy) && !reskinned)
|
||||
reskin_holy_weapon(user)
|
||||
|
||||
/obj/item/weapon/nullrod/proc/reskin_holy_weapon(mob/M)
|
||||
if(SSreligion.holy_weapon_type)
|
||||
return
|
||||
var/obj/item/weapon/nullrod/holy_weapon
|
||||
var/list/holy_weapons_list = typesof(/obj/item/weapon/nullrod)
|
||||
var/list/display_names = list()
|
||||
for(var/V in holy_weapons_list)
|
||||
var/atom/A = V
|
||||
display_names += initial(A.name)
|
||||
|
||||
if(SSreligion.holy_weapon)
|
||||
holy_weapon = new SSreligion.holy_weapon
|
||||
to_chat(M, "<span class='notice'>The null rod suddenly morphs into your religions already chosen holy weapon.</span>")
|
||||
else
|
||||
var/list/holy_weapons_list = typesof(/obj/item/weapon/nullrod)
|
||||
var/list/display_names = list()
|
||||
for(var/V in holy_weapons_list)
|
||||
var/atom/A = V
|
||||
display_names += initial(A.name)
|
||||
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
|
||||
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
|
||||
return
|
||||
|
||||
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
|
||||
if(!src || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
|
||||
return
|
||||
var/index = display_names.Find(choice)
|
||||
var/A = holy_weapons_list[index]
|
||||
|
||||
var/index = display_names.Find(choice)
|
||||
var/A = holy_weapons_list[index]
|
||||
holy_weapon = new A
|
||||
|
||||
holy_weapon = new A
|
||||
|
||||
SSreligion.holy_weapon = holy_weapon.type
|
||||
|
||||
feedback_set_details("chaplain_weapon","[choice]")
|
||||
SSreligion.holy_weapon_type = holy_weapon.type
|
||||
|
||||
feedback_set_details("chaplain_weapon","[choice]")
|
||||
|
||||
if(holy_weapon)
|
||||
holy_weapon.reskinned = TRUE
|
||||
|
||||
@@ -33,10 +33,9 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible",
|
||||
if(!istype(H))
|
||||
return
|
||||
// If H is the Chaplain, we can set the icon_state of the bible (but only once!)
|
||||
if(!SSreligion.Bible_icon_state && H.job == "Chaplain")
|
||||
if(!SSreligion.bible_icons["icon_state"] && H.job == "Chaplain")
|
||||
var/dat = "<html><head><title>Pick Bible Style</title></head><body><center><h2>Pick a bible style</h2></center><table>"
|
||||
var/i
|
||||
for(i = 1, i < biblestates.len, i++)
|
||||
for(var/i in 1 to biblestates.len)
|
||||
var/icon/bibleicon = icon('icons/obj/storage.dmi', biblestates[i])
|
||||
var/nicename = biblenames[i]
|
||||
H << browse_rsc(bibleicon, nicename)
|
||||
@@ -47,7 +46,7 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible",
|
||||
/obj/item/weapon/storage/book/bible/Topic(href, href_list)
|
||||
if(!usr.canUseTopic(src))
|
||||
return
|
||||
if(href_list["seticon"] && SSticker && !SSreligion.Bible_icon_state)
|
||||
if(href_list["seticon"] && SSreligion && !SSreligion.bible_icons["icon_state"])
|
||||
var/iconi = text2num(href_list["seticon"])
|
||||
var/biblename = biblenames[iconi]
|
||||
var/obj/item/weapon/storage/book/bible/B = locate(href_list["src"])
|
||||
@@ -59,8 +58,8 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible",
|
||||
H.dna.add_mutation(CLOWNMUT)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
|
||||
|
||||
SSreligion.Bible_icon_state = B.icon_state
|
||||
SSreligion.Bible_item_state = B.item_state
|
||||
SSreligion.bible_icons["icon_state"] = B.icon_state
|
||||
SSreligion.bible_icons["item_state"] = B.item_state
|
||||
|
||||
feedback_set_details("religion_book","[biblename]")
|
||||
usr << browse(null, "window=editicon")
|
||||
|
||||
Reference in New Issue
Block a user