Files
Bubberstation/code/game/objects/structures/divine.dm
AnturK 4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00

54 lines
1.8 KiB
Plaintext

/obj/structure/sacrificealtar
name = "sacrificial altar"
desc = "An altar designed to perform blood sacrifice for a deity. Alt-click it to sacrifice a buckled creature."
icon = 'icons/obj/hand_of_god_structures.dmi'
icon_state = "sacrificealtar"
anchored = TRUE
density = FALSE
can_buckle = 1
/obj/structure/sacrificealtar/AltClick(mob/living/user)
..()
if(!istype(user) || !user.canUseTopic(src, be_close = TRUE))
return
if(!has_buckled_mobs())
return
var/mob/living/L = locate() in buckled_mobs
if(!L)
return
to_chat(user, span_notice("Invoking the sacred ritual, you sacrifice [L]."))
L.investigate_log("has been sacrificially gibbed on an altar.", INVESTIGATE_DEATHS)
L.gib()
message_admins("[ADMIN_LOOKUPFLW(user)] has sacrificed [key_name_admin(L)] on the sacrificial altar at [AREACOORD(src)].")
/obj/structure/healingfountain
name = "healing fountain"
desc = "A fountain containing the waters of life."
icon = 'icons/obj/hand_of_god_structures.dmi'
icon_state = "fountain"
anchored = TRUE
density = TRUE
var/time_between_uses = 1800
var/last_process = 0
/obj/structure/healingfountain/attack_hand(mob/living/user, list/modifiers)
. = ..()
if(.)
return
if(last_process + time_between_uses > world.time)
to_chat(user, span_notice("The fountain appears to be empty."))
return
last_process = world.time
to_chat(user, span_notice("The water feels warm and soothing as you touch it. The fountain immediately dries up shortly afterwards."))
user.reagents.add_reagent(/datum/reagent/medicine/omnizine/godblood,20)
update_appearance()
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom/, update_appearance)), time_between_uses)
/obj/structure/healingfountain/update_icon_state()
if(last_process + time_between_uses > world.time)
icon_state = "fountain"
else
icon_state = "fountain-red"
return ..()