Adds 2 item traits (heretic requirements) (#27680)

* skipping out on some work later

* update comment
This commit is contained in:
Qwertytoforty
2024-12-31 23:38:44 -05:00
committed by GitHub
parent 08c2af953a
commit d1409caaf2
5 changed files with 13 additions and 3 deletions
+6
View File
@@ -301,6 +301,12 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
///An organ that was inserted into a dead mob, that has not been revived yet
#define TRAIT_ORGAN_INSERTED_WHILE_DEAD "organ_inserted_while_dead"
/// Prevents stripping this equipment or seeing it in the strip menu
#define TRAIT_NO_STRIP "no_strip"
/// Prevents seeing this item on examine when on a mob, or seeing it in the strip menu. It's like ABSTRACT, without making the item fail to interact in several ways. The item can still be stripped however, combine with no_strip unless you have a reason not to.
#define TRAIT_SKIP_EXAMINE "skip_examine"
//****** OBJ TRAITS *****//
///An /obj that should not increase the "depth" of the search for adjacency,
+3 -1
View File
@@ -132,7 +132,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NO_THROWN_MESSAGE" = TRAIT_NO_THROWN_MESSAGE,
"TRAIT_SILENT_INSERTION" = TRAIT_SILENT_INSERTION,
"TRAIT_HYPOSPRAY_IMMUNE" = TRAIT_HYPOSPRAY_IMMUNE,
"TRAIT_ITEM_ACTIVE" = TRAIT_ITEM_ACTIVE
"TRAIT_ITEM_ACTIVE" = TRAIT_ITEM_ACTIVE,
"TRAIT_NO_STRIP" = TRAIT_NO_STRIP,
"TRAIT_SKIP_EXAMINE" = TRAIT_SKIP_EXAMINE
),
/turf = list(
+1 -1
View File
@@ -318,7 +318,7 @@
var/list/result
var/obj/item/item = item_data.get_item(owner)
if(item && (item.flags & ABSTRACT))
if(item && (item.flags & ABSTRACT || HAS_TRAIT(item, TRAIT_NO_STRIP) || HAS_TRAIT(item, TRAIT_SKIP_EXAMINE)))
items[strippable_key] = result
continue
+1 -1
View File
@@ -981,7 +981,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
/obj/item/proc/canStrip(mob/stripper, mob/owner)
SHOULD_BE_PURE(TRUE)
return !(flags & NODROP) && !(flags & ABSTRACT)
return !(flags & NODROP) && !(flags & ABSTRACT) && !HAS_TRAIT(src, TRAIT_NO_STRIP)
/obj/item/proc/should_stack_with(obj/item/other)
return type == other.type && name == other.name
@@ -145,6 +145,8 @@
grab_items |= item
if(item.flags & ABSTRACT)
abstract_items |= item
if(HAS_TRAIT(item, TRAIT_SKIP_EXAMINE))
continue
else
var/item_words = item.name
if(item.blood_DNA)