mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Removes the infinite_reskin variable from /obj and converts it into a flag (#80014)
This variable is only used once so I figured it would work better as a flag since it will take up less needless memory
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#define BLOCKS_CONSTRUCTION (1<<9) //! Does this object prevent things from being built on it?
|
||||
#define BLOCKS_CONSTRUCTION_DIR (1<<10) //! Does this object prevent same-direction things from being built on it?
|
||||
#define IGNORE_DENSITY (1<<11) //! Can we ignore density when building on this object? (for example, directional windows and grilles)
|
||||
#define INFINITE_RESKIN (1<<12) // We can reskin this item infinitely
|
||||
|
||||
// If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support
|
||||
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
|
||||
var/current_skin //Has the item been reskinned?
|
||||
var/list/unique_reskin //List of options to reskin.
|
||||
///If set to true, we can reskin this item as much as we want.
|
||||
var/infinite_reskin = FALSE
|
||||
|
||||
// Access levels, used in modules\jobs\access.dm
|
||||
/// List of accesses needed to use this object: The user must possess all accesses in this list in order to use the object.
|
||||
@@ -282,12 +280,12 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag)
|
||||
. += span_notice(desc_controls)
|
||||
if(obj_flags & UNIQUE_RENAME)
|
||||
. += span_notice("Use a pen on it to rename it or change its description.")
|
||||
if(unique_reskin && (!current_skin || infinite_reskin))
|
||||
if(unique_reskin && (!current_skin || (obj_flags & INFINITE_RESKIN)))
|
||||
. += span_notice("Alt-click it to reskin it.")
|
||||
|
||||
/obj/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(unique_reskin && (!current_skin || infinite_reskin) && user.can_perform_action(src, NEED_DEXTERITY))
|
||||
if(unique_reskin && (!current_skin || (obj_flags & INFINITE_RESKIN)) && user.can_perform_action(src, NEED_DEXTERITY))
|
||||
reskin_obj(user)
|
||||
|
||||
/**
|
||||
@@ -325,7 +323,7 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag)
|
||||
/obj/proc/check_reskin_menu(mob/user)
|
||||
if(QDELETED(src))
|
||||
return FALSE
|
||||
if(!infinite_reskin && current_skin)
|
||||
if(!(obj_flags & INFINITE_RESKIN) && current_skin)
|
||||
return FALSE
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
|
||||
@@ -187,8 +187,7 @@ GLOBAL_LIST_INIT(pride_pin_reskins, list(
|
||||
name = "pride pin"
|
||||
desc = "A Nanotrasen Diversity & Inclusion Center-sponsored holographic pin to show off your pride, reminding the crew of their unwavering commitment to equity, diversity, and inclusion!"
|
||||
icon_state = "pride"
|
||||
obj_flags = UNIQUE_RENAME
|
||||
infinite_reskin = TRUE
|
||||
obj_flags = UNIQUE_RENAME | INFINITE_RESKIN
|
||||
|
||||
/obj/item/clothing/accessory/pride/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user