mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 18:11:16 +00:00
Co-authored-by: Fikou <piotrbryla@onet.pl> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
/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."
|
|
icon = 'icons/obj/hand_of_god_structures.dmi'
|
|
icon_state = "convertaltar"
|
|
density = TRUE
|
|
anchored = TRUE
|
|
layer = TABLE_LAYER
|
|
pass_flags_self = LETPASSTHROW
|
|
can_buckle = TRUE
|
|
buckle_lying = 90 //we turn to you!
|
|
///Avoids having to check global everytime by referencing it locally.
|
|
var/datum/religion_sect/sect_to_altar
|
|
|
|
/obj/structure/altar_of_gods/Initialize(mapload)
|
|
. = ..()
|
|
reflect_sect_in_icons()
|
|
AddElement(/datum/element/climbable)
|
|
|
|
/obj/structure/altar_of_gods/ComponentInitialize()
|
|
. = ..()
|
|
AddComponent(/datum/component/religious_tool, ALL, FALSE, CALLBACK(src, .proc/reflect_sect_in_icons))
|
|
|
|
/obj/structure/altar_of_gods/attack_hand(mob/living/user)
|
|
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 class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>")
|
|
return ..()
|
|
to_chat(user,"<span class='notice>You try to coax [pushed_mob] onto [src]...</span>")
|
|
if(!do_after(user,(5 SECONDS),target = pushed_mob))
|
|
return ..()
|
|
pushed_mob.forceMove(loc)
|
|
return ..()
|
|
|
|
/obj/structure/altar_of_gods/proc/reflect_sect_in_icons()
|
|
if(GLOB.religious_sect)
|
|
sect_to_altar = GLOB.religious_sect
|
|
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
|