mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
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>
63 lines
2.2 KiB
Plaintext
63 lines
2.2 KiB
Plaintext
/**
|
|
* ### engraved component!
|
|
*
|
|
* component for walls that applies an engraved overlay and lets you examine it to read a story (+ art element yay)
|
|
* new creations will get a high art value, cross round scrawlings will get a low one.
|
|
* MUST be a component, though it doesn't look like it. SSPersistence demandeth
|
|
*/
|
|
/datum/component/tattoo
|
|
///the generated story string
|
|
var/tattoo_description
|
|
|
|
/datum/component/tattoo/Initialize(tattoo_description)
|
|
. = ..()
|
|
if(!isbodypart(parent))
|
|
return COMPONENT_INCOMPATIBLE
|
|
var/obj/item/bodypart/tatted_limb = parent
|
|
|
|
|
|
if(!tattoo_description)
|
|
///okay, i need to add some way to saved tattoos
|
|
return COMPONENT_INCOMPATIBLE
|
|
src.tattoo_description = tattoo_description
|
|
tatted_limb.AddElement(/datum/element/art/commoner, 15)
|
|
|
|
if(tatted_limb.owner)
|
|
setup_tatted_owner(tatted_limb.owner)
|
|
|
|
/datum/component/tattoo/Destroy(force, silent)
|
|
if(!parent)
|
|
return ..()
|
|
var/obj/item/bodypart/tatted_limb = parent
|
|
if(tatted_limb.owner)
|
|
clear_tatted_owner(tatted_limb.owner)
|
|
parent.RemoveElement(/datum/element/art/commoner)
|
|
return ..()
|
|
|
|
/datum/component/tattoo/RegisterWithParent()
|
|
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
|
|
|
|
/datum/component/tattoo/UnregisterFromParent()
|
|
UnregisterSignal(parent, COMSIG_PARENT_EXAMINE)
|
|
|
|
/datum/component/tattoo/proc/on_examine(datum/source, mob/user, list/examine_list)
|
|
SIGNAL_HANDLER
|
|
examine_list += span_boldnotice(tattoo_description)
|
|
|
|
/datum/component/tattoo/proc/setup_tatted_owner(mob/living/carbon/new_owner)
|
|
RegisterSignal(new_owner, COMSIG_PARENT_EXAMINE, PROC_REF(on_bodypart_owner_examine))
|
|
|
|
/datum/component/tattoo/proc/clear_tatted_owner(mob/living/carbon/old_owner)
|
|
UnregisterSignal(old_owner, COMSIG_PARENT_EXAMINE)
|
|
|
|
/datum/component/tattoo/proc/on_bodypart_owner_examine(mob/living/carbon/bodypart_owner, mob/user, list/examine_list)
|
|
SIGNAL_HANDLER
|
|
|
|
var/obj/item/bodypart/tatted_limb = parent
|
|
for(var/obj/item/clothing/possibly_blocking in bodypart_owner.get_equipped_items())
|
|
if(possibly_blocking.body_parts_covered & tatted_limb.body_part) //check to see if something is obscuring their tattoo.
|
|
return
|
|
|
|
examine_list += span_notice("[tatted_limb] of [bodypart_owner] has a tattoo!")
|
|
examine_list += span_boldnotice(tattoo_description)
|