diff --git a/code/__HELPERS/random_items.dm b/code/__HELPERS/random_items.dm new file mode 100644 index 00000000000..c90bb5da9b1 --- /dev/null +++ b/code/__HELPERS/random_items.dm @@ -0,0 +1,17 @@ +// Its not full proof but it standerizes behavoir between gifts and lootboxes +/// Used for random item gen to try and generate a list of types that arent weird parent types and similar +/proc/get_sane_item_types(requested_type) + if(!ispath(requested_type, /obj/item)) + return list() + var/list/all_valid_types = list() + for(var/obj/item/iter_type as anything in typesof(requested_type)) + if((iter_type.abstract_type == iter_type) || (iter_type.item_flags & ABSTRACT)) + continue + if(iter_type.spawn_blacklisted) + continue + // The original behavior also included inhand icon states but that seems dumb + // if(!iter_type.icon_state || !iter_type.inhand_icon_state) + if(!iter_type.icon_state) + continue // With the existance of abstract_type we could prob depricate this handling at some point + all_valid_types += iter_type + return all_valid_types diff --git a/code/__HELPERS/randoms.dm b/code/__HELPERS/randoms.dm index 6f2bb8d86dd..7c66e1f737b 100644 --- a/code/__HELPERS/randoms.dm +++ b/code/__HELPERS/randoms.dm @@ -3,45 +3,24 @@ var/static/list/allowed_food = list() if(!LAZYLEN(allowed_food)) //it's static so we only ever do this once - var/list/blocked = list( - /obj/item/food/bowled, - /obj/item/food/bread, - /obj/item/food/breadslice, - /obj/item/food/cake, - /obj/item/food/cakeslice, - /obj/item/food/clothing, - /obj/item/food/drug, - /obj/item/food/grown, - /obj/item/food/grown/ash_flora, - /obj/item/food/grown/mushroom, - /obj/item/food/grown/nettle, - /obj/item/food/kebab, - /obj/item/food/meat, - /obj/item/food/meat/slab, - /obj/item/food/meat/slab/human/mutant, - /obj/item/food/pie, - /obj/item/food/pieslice, - /obj/item/food/pizza, - /obj/item/food/pizzaslice, - /obj/item/food/salad, - /obj/item/food/spaghetti, - ) + var/list/blocked = list() // This used to be populated - var/list/unfiltered_allowed_food = subtypesof(/obj/item/food) - blocked - for(var/obj/item/food/food as anything in unfiltered_allowed_food) - if(!initial(food.icon_state)) //food with no icon_state should probably not be spawned - continue - allowed_food.Add(food) + allowed_food = get_sane_item_types(/obj/item/food) - blocked return pick(allowed_food) ///Gets a random drink excluding the blocked type /proc/get_random_drink() - var/list/blocked = list( - /obj/item/reagent_containers/cup/soda_cans, - /obj/item/reagent_containers/cup/glass/bottle + var/static/list/allowed_drinks = list() + + if(!LAZYLEN(allowed_drinks)) + var/list/blocked = list( + /obj/item/reagent_containers/cup/glass/bottle ) - return pick(subtypesof(/obj/item/reagent_containers/cup/glass) - blocked) + + allowed_drinks = get_sane_item_types(/obj/item/reagent_containers/cup/glass) + get_sane_item_types(/obj/item/reagent_containers/cup/soda_cans) - blocked + + return pick(allowed_drinks) ///Picks a string of symbols to display as the law number for hacked or ion laws /proc/ion_num() //! is at the start to prevent us from changing say modes via get_message_mode() diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 0fb9426318b..677b5f49d7d 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -120,7 +120,7 @@ GLOBAL_LIST_INIT(blood_types, init_blood_types()) /proc/init_blood_types() . = list() for(var/datum/blood_type/blood_type_path as anything in subtypesof(/datum/blood_type)) - if(blood_type_path::root_abstract_type == blood_type_path) // Don't instantiate abstract blood types + if(blood_type_path::abstract_type == blood_type_path) // Don't instantiate abstract blood types continue var/datum/blood_type/new_type = new blood_type_path() .[new_type.id] = new_type diff --git a/code/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm index 303b6db3bd2..8fee5ccd34d 100644 --- a/code/controllers/configuration/config_entry.dm +++ b/code/controllers/configuration/config_entry.dm @@ -1,4 +1,6 @@ /datum/config_entry + /// Do not instantiate if type matches this + abstract_type = /datum/config_entry /// Read-only, this is determined by the last portion of the derived entry type var/name /// The configured value for this entry. This shouldn't be initialized in code, instead set default @@ -13,8 +15,6 @@ var/deprecated_by /// The /datum/config_entry type that supersedes this one var/protection = NONE - /// Do not instantiate if type matches this - var/abstract_type = /datum/config_entry /// Force validate and set on VV. VAS proccall guard will run regardless. var/vv_VAS = TRUE /// Controls if error is thrown when duplicate configuration values for this entry type are encountered diff --git a/code/datums/brain_damage/brain_trauma.dm b/code/datums/brain_damage/brain_trauma.dm index 49fedc3ee42..3c7f5ce7aec 100644 --- a/code/datums/brain_damage/brain_trauma.dm +++ b/code/datums/brain_damage/brain_trauma.dm @@ -4,6 +4,8 @@ // of the trauma. /datum/brain_trauma + /// Tracks abstract types of brain traumas, useful for determining traumas that should not exist + abstract_type = /datum/brain_trauma var/name = "Brain Trauma" var/desc = "A trauma caused by brain damage, which causes issues to the patient." var/scan_desc = "generic brain trauma" //description when detected by a health scanner @@ -15,9 +17,6 @@ var/random_gain = TRUE //can this be gained through random traumas? var/resilience = TRAUMA_RESILIENCE_BASIC //how hard is this to cure? - /// Tracks abstract types of brain traumas, useful for determining traumas that should not exist - var/abstract_type = /datum/brain_trauma - /datum/brain_trauma/Destroy() // Handles our references with our brain brain?.remove_trauma_from_traumas(src) diff --git a/code/datums/components/crafting/guncrafting.dm b/code/datums/components/crafting/guncrafting.dm index 42d21ba12bf..8762fc38abc 100644 --- a/code/datums/components/crafting/guncrafting.dm +++ b/code/datums/components/crafting/guncrafting.dm @@ -1,6 +1,8 @@ //Gun crafting parts til they can be moved elsewhere // PARTS // +/obj/item/weaponcrafting + abstract_type = /obj/item/weaponcrafting /obj/item/weaponcrafting/Initialize(mapload) . = ..() diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 87b51584967..dcf1772f54f 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -82,6 +82,14 @@ ///The layout pref we take from the player looking at this datum's UI to know what layout to give. var/datum/preference/choiced/layout_prefs_used = /datum/preference/choiced/tgui_layout + /** + * Parent types. + * + * Use path Ex:(abstract_type = /obj/item). Generally for abstract code objects, atoms with a set abstract_type can never be selected by spawner. + * These should be things that should never show up in a round, this does not include things that require init behavoir to function. + */ + var/abstract_type = /datum + /** * Called when a href for this datum is clicked * diff --git a/code/datums/instability_meltdown.dm b/code/datums/instability_meltdown.dm index 4e3a82fd376..508f74885c7 100644 --- a/code/datums/instability_meltdown.dm +++ b/code/datums/instability_meltdown.dm @@ -1,11 +1,11 @@ /// A possible genetic meltdown that occurs when someone exceeds 100 genetic instability /datum/instability_meltdown + /// Used to ensure that abstract subtypes do not get picked + abstract_type = /datum/instability_meltdown /// How likely a meltdown is to be picked var/meltdown_weight = 1 /// If this meltdown is considered "fatal" or not var/fatal = FALSE - /// Used to ensure that abstract subtypes do not get picked - var/abstract_type = /datum/instability_meltdown /// Code that runs when this meltdown is picked /datum/instability_meltdown/proc/meltdown(mob/living/carbon/human/victim) diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm index f7a95156784..1df05ac15ad 100644 --- a/code/datums/martial/krav_maga.dm +++ b/code/datums/martial/krav_maga.dm @@ -214,6 +214,7 @@ //Krav Maga Gloves /obj/item/clothing/gloves/krav_maga + abstract_type = /obj/item/clothing/gloves/krav_maga clothing_traits = list(TRAIT_FAST_CUFFING) /obj/item/clothing/gloves/krav_maga/Initialize(mapload) diff --git a/code/datums/quirks/_quirk_constant_data.dm b/code/datums/quirks/_quirk_constant_data.dm index 34bde6d9883..18386f6a13e 100644 --- a/code/datums/quirks/_quirk_constant_data.dm +++ b/code/datums/quirks/_quirk_constant_data.dm @@ -24,7 +24,7 @@ GLOBAL_LIST_INIT_TYPED(all_quirk_constant_data, /datum/quirk_constant_data, gene /// A singleton datum representing constant data and procs used by quirks. /datum/quirk_constant_data /// Abstract in OOP terms. If this is our type, we will not be instantiated. - var/abstract_type = /datum/quirk_constant_data + abstract_type = /datum/quirk_constant_data /// The typepath of the quirk we will be associated with in the global list. This is what we represent. var/datum/quirk/associated_typepath diff --git a/code/datums/station_traits/_station_trait.dm b/code/datums/station_traits/_station_trait.dm index 4d7b83e1ff0..b937aa3082c 100644 --- a/code/datums/station_traits/_station_trait.dm +++ b/code/datums/station_traits/_station_trait.dm @@ -3,6 +3,8 @@ GLOBAL_LIST_EMPTY(lobby_station_traits) ///Base class of station traits. These are used to influence rounds in one way or the other by influencing the levers of the station. /datum/station_trait + /// Trait should not be instantiated in a round if its type matches this type + abstract_type = /datum/station_trait ///Name of the trait var/name = "unnamed station trait" ///The type of this trait. Used to classify how this trait influences the station @@ -33,8 +35,6 @@ GLOBAL_LIST_EMPTY(lobby_station_traits) var/list/lobby_buttons = list() /// The ID that we look for in dynamic.json. Not synced with 'name' because I can already see this go wrong var/dynamic_threat_id - /// Trait should not be instantiated in a round if its type matches this type - var/abstract_type = /datum/station_trait /datum/station_trait/New() . = ..() diff --git a/code/game/atom/_atom.dm b/code/game/atom/_atom.dm index 83502e23d81..ff3093a0951 100644 --- a/code/game/atom/_atom.dm +++ b/code/game/atom/_atom.dm @@ -5,6 +5,7 @@ * as much as possible to the components/elements system */ /atom + abstract_type = /atom layer = ABOVE_NORMAL_TURF_LAYER plane = GAME_PLANE appearance_flags = TILE_BOUND|LONG_GLIDE @@ -137,6 +138,9 @@ /// Flags to check for in can_perform_action for mouse drag & drop checks. To bypass checks see interaction_flags_atom mouse drop flags var/interaction_flags_mouse_drop = NONE + /// Generally for niche objects, atoms blacklisted can spawn if enabled by spawner. + var/spawn_blacklisted = FALSE + /** * Top level of the destroy chain for most atoms * diff --git a/code/game/atom/atom_examine.dm b/code/game/atom/atom_examine.dm index 8fda89b5550..f4bd109240a 100644 --- a/code/game/atom/atom_examine.dm +++ b/code/game/atom/atom_examine.dm @@ -4,12 +4,6 @@ /// Text that appears preceding the name in [/atom/proc/examine_title] var/examine_thats = "That's" -/mob/living/carbon/human - examine_thats = "This is" - -/mob/living/silicon/robot - examine_thats = "This is" - /** * Called when a mob examines this atom: [/mob/verb/examinate] * @@ -80,6 +74,9 @@ */ /atom/proc/examine_tags(mob/user) . = list() + if(abstract_type == type) + .[span_hypnophrase("abstract")] = "This is an abstract concept, you should report this to a strange entity called GITHUB!" + SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE_TAGS, user, .) /// What this atom should be called in examine tags diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index f14b597115c..3a984ee64f9 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -1,4 +1,5 @@ /atom/movable + abstract_type = /atom/movable layer = OBJ_LAYER glide_size = 8 appearance_flags = TILE_BOUND|PIXEL_SCALE|LONG_GLIDE diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index c6d3dda3f9d..c5f0fe8bcc0 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -88,6 +88,7 @@ name = "machinery" icon = 'icons/obj/machines/fax.dmi' desc = "Some kind of machine." + abstract_type = /obj/machinery verb_say = "beeps" verb_yell = "blares" pressure_resistance = 15 diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 0eebda1243c..4e7ca61d0dd 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -1,6 +1,7 @@ /obj/effect/decal/cleanable gender = PLURAL layer = CLEANABLE_FLOOR_OBJECT_LAYER + abstract_type = /obj/effect/decal/cleanable flags_1 = UNPAINTABLE_1 var/list/random_icon_states = null /// When two of these are on a same tile or do we need to merge them into just one? diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index e5fce2731fb..be3e03d5e6e 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -2,6 +2,7 @@ name = "decal" layer = ABOVE_OPEN_TURF_LAYER plane = FLOOR_PLANE + abstract_type = /obj/effect/decal anchored = TRUE resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm index e1fbde7859d..92ce77843d8 100644 --- a/code/game/objects/effects/effects.dm +++ b/code/game/objects/effects/effects.dm @@ -3,6 +3,7 @@ //Effects are mostly temporary visual effects like sparks, smoke, as well as decals, etc... /obj/effect icon = 'icons/effects/effects.dmi' + abstract_type = /obj/effect resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF move_resist = INFINITY obj_flags = NONE diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index 2e18aeb1b5c..84b1e5ad125 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -45,6 +45,14 @@ /// Override to define loot blacklist behavior /obj/effect/spawner/proc/can_spawn(atom/loot) + if(!ispath(loot)) + // Means its something evil like /obj/item/stack/sheet/mineral/diamond{amount = 15} + // (modified instances?) which is not a path and cannot be checked as one + return TRUE + if(loot.abstract_type == loot) + return FALSE + if(loot.spawn_blacklisted) + return FALSE return TRUE /obj/effect/list_container diff --git a/code/game/objects/effects/spawners/random/weapon.dm b/code/game/objects/effects/spawners/random/weapon.dm new file mode 100644 index 00000000000..c08d5378347 --- /dev/null +++ b/code/game/objects/effects/spawners/random/weapon.dm @@ -0,0 +1,10 @@ +/obj/effect/spawner/random/weapon + icon_state = "laser_gun" + +/obj/effect/spawner/random/weapon/full_gun + loot_subtype_path = /obj/item/gun + +/obj/effect/spawner/random/weapon/full_gun/make_item(spawn_loc, type_path_to_make) + var/obj/item/gun/spawned_gun = new type_path_to_make(spawn_loc) + spawned_gun.unlock() + return spawned_gun diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index cfc296cf327..d4fc9743368 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -2,6 +2,7 @@ /obj/item name = "item" icon = 'icons/obj/anomaly.dmi' + abstract_type = /obj/item blocks_emissive = EMISSIVE_BLOCK_GENERIC burning_particles = /particles/smoke/burning/small pass_flags_self = PASSITEM diff --git a/code/game/objects/items/chromosome.dm b/code/game/objects/items/chromosome.dm index a16eea4aaaa..de798f6a25e 100644 --- a/code/game/objects/items/chromosome.dm +++ b/code/game/objects/items/chromosome.dm @@ -2,6 +2,7 @@ name = "blank chromosome" icon = 'icons/obj/science/chromosomes.dmi' icon_state = "" + abstract_type = /obj/item/chromosome desc = "A tube holding chromosomal data." force = 0 w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/objects/items/circuitboards/circuitboard.dm b/code/game/objects/items/circuitboards/circuitboard.dm index a556e42a6a5..97b2a1441b9 100644 --- a/code/game/objects/items/circuitboards/circuitboard.dm +++ b/code/game/objects/items/circuitboards/circuitboard.dm @@ -12,6 +12,7 @@ inhand_icon_state = "electronic" lefthand_file = 'icons/mob/inhands/items/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi' + abstract_type = /obj/item/circuitboard custom_materials = list(/datum/material/glass = HALF_SHEET_MATERIAL_AMOUNT) w_class = WEIGHT_CLASS_SMALL grind_results = list(/datum/reagent/silicon = 20) @@ -67,6 +68,7 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells. */ /obj/item/circuitboard/machine + abstract_type = /obj/item/circuitboard/machine name_extension = "(Machine Board)" /// Whether this machine must be anchored to be constructed. var/needs_anchored = TRUE diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 94dc6eecdf1..aa1680b63d6 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -1,5 +1,6 @@ /obj/item/circuitboard/computer name = "Generic" + abstract_type = /obj/item/circuitboard/computer name_extension = "(Computer Board)" /obj/item/circuitboard/computer/examine() diff --git a/code/game/objects/items/debug_items.dm b/code/game/objects/items/debug_items.dm index 6d44b1e00f1..354e628895d 100644 --- a/code/game/objects/items/debug_items.dm +++ b/code/game/objects/items/debug_items.dm @@ -1,4 +1,6 @@ /* This file contains standalone items for debug purposes. */ +/obj/item/debug + abstract_type = /obj/item/debug /obj/item/debug/human_spawner name = "human spawner" diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index b68b11d9f63..205a47e9cb6 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -328,6 +328,7 @@ inhand_icon_state = "defibpaddles0" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' + spawn_blacklisted = TRUE force = 0 throwforce = 6 diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index c34286cc858..f395b4acbd6 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -1064,6 +1064,7 @@ /obj/item/flashlight/eyelight name = "eyelight" desc = "This shouldn't exist outside of someone's head, how are you seeing this?" + spawn_blacklisted = TRUE obj_flags = CONDUCTS_ELECTRICITY item_flags = DROPDEL actions_types = list() diff --git a/code/game/objects/items/drug_items.dm b/code/game/objects/items/drug_items.dm index aa7feda28a4..68d6c6b546f 100644 --- a/code/game/objects/items/drug_items.dm +++ b/code/game/objects/items/drug_items.dm @@ -2,6 +2,7 @@ name = "generic drug" desc = "I am error" icon = 'icons/obj/medical/drugs.dmi' + abstract_type = /obj/item/food/drug foodtypes = GROSS food_flags = FOOD_FINGER_FOOD max_volume = 50 diff --git a/code/game/objects/items/food/_food.dm b/code/game/objects/items/food/_food.dm index 4fd86b48614..604b6c3c5ab 100644 --- a/code/game/objects/items/food/_food.dm +++ b/code/game/objects/items/food/_food.dm @@ -8,6 +8,7 @@ icon_state = null lefthand_file = 'icons/mob/inhands/items/food_lefthand.dmi' righthand_file = 'icons/mob/inhands/items/food_righthand.dmi' + abstract_type = /obj/item/food obj_flags = UNIQUE_RENAME grind_results = list() material_flags = MATERIAL_NO_EDIBILITY diff --git a/code/game/objects/items/food/bait.dm b/code/game/objects/items/food/bait.dm index 6d4df7fc7bc..53a7cbe47ce 100644 --- a/code/game/objects/items/food/bait.dm +++ b/code/game/objects/items/food/bait.dm @@ -2,6 +2,7 @@ name = "this is bait" desc = "you got baited." icon = 'icons/obj/fishing.dmi' + abstract_type = /obj/item/food/bait /// Quality trait of this bait var/bait_quality = TRAIT_BASIC_QUALITY_BAIT /// Icon state added to main fishing rod icon when this bait is equipped diff --git a/code/game/objects/items/food/bread.dm b/code/game/objects/items/food/bread.dm index d16d90b5dcf..3e62fb3d485 100644 --- a/code/game/objects/items/food/bread.dm +++ b/code/game/objects/items/food/bread.dm @@ -4,6 +4,7 @@ name = "bread?" desc = "You shouldn't see this, call the coders." icon = 'icons/obj/food/burgerbread.dmi' + abstract_type = /obj/item/food/bread max_volume = 80 tastes = list("bread" = 10) foodtypes = GRAIN @@ -29,6 +30,7 @@ name = "breadslice?" desc = "You shouldn't see this, call the coders." icon = 'icons/obj/food/burgerbread.dmi' + abstract_type = /obj/item/food/breadslice foodtypes = GRAIN food_flags = FOOD_FINGER_FOOD eat_time = 0.5 SECONDS diff --git a/code/game/objects/items/food/cake.dm b/code/game/objects/items/food/cake.dm index 9f45ac42b68..91340435ab6 100644 --- a/code/game/objects/items/food/cake.dm +++ b/code/game/objects/items/food/cake.dm @@ -1,5 +1,6 @@ /obj/item/food/cake icon = 'icons/obj/food/piecake.dmi' + abstract_type = /obj/item/food/cake bite_consumption = 3 max_volume = 80 food_reagents = list( @@ -24,6 +25,7 @@ /obj/item/food/cakeslice icon = 'icons/obj/food/piecake.dmi' + abstract_type = /obj/item/food/cakeslice food_reagents = list( /datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/vitamin = 1, diff --git a/code/game/objects/items/food/cheese.dm b/code/game/objects/items/food/cheese.dm index 6604040af22..74af37742e7 100644 --- a/code/game/objects/items/food/cheese.dm +++ b/code/game/objects/items/food/cheese.dm @@ -6,6 +6,7 @@ /obj/item/food/cheese name = "the concept of cheese" desc = "This probably shouldn't exist." + abstract_type = /obj/item/food/cheese tastes = list("cheese" = 1) food_reagents = list(/datum/reagent/consumable/nutriment/fat = 3) foodtypes = DAIRY diff --git a/code/game/objects/items/food/donuts.dm b/code/game/objects/items/food/donuts.dm index ce43431e2b6..3015ad05c51 100644 --- a/code/game/objects/items/food/donuts.dm +++ b/code/game/objects/items/food/donuts.dm @@ -4,6 +4,7 @@ name = "donut" desc = "Goes great with robust coffee." icon = 'icons/obj/food/donuts.dmi' + abstract_type = /obj/item/food/donut inhand_icon_state = "donut1" bite_consumption = 5 food_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/sugar = 3) @@ -377,6 +378,7 @@ /obj/item/food/donut/jelly/slimejelly name = "jelly donut" desc = "You jelly?" + abstract_type = /obj/item/food/donut/jelly/slimejelly extra_reagent = /datum/reagent/toxin/slimejelly foodtypes = GRAIN|DAIRY|JUNKFOOD|SUGAR|FRIED|BREAKFAST|TOXIC diff --git a/code/game/objects/items/food/lizard.dm b/code/game/objects/items/food/lizard.dm index ea614d0c743..4b6230303a2 100644 --- a/code/game/objects/items/food/lizard.dm +++ b/code/game/objects/items/food/lizard.dm @@ -578,6 +578,7 @@ /obj/item/food/pizza/flatbread icon = 'icons/obj/food/lizard.dmi' icon_state = null + abstract_type = /obj/item/food/pizza/flatbread slice_type = null /obj/item/food/pizza/flatbread/rustic diff --git a/code/game/objects/items/food/meatdish.dm b/code/game/objects/items/food/meatdish.dm index 42d7b4dfb62..105e596763a 100644 --- a/code/game/objects/items/food/meatdish.dm +++ b/code/game/objects/items/food/meatdish.dm @@ -882,6 +882,7 @@ trash_type = /obj/item/stack/rods icon = 'icons/obj/food/meat.dmi' icon_state = "kebab" + abstract_type = /obj/item/food/kebab w_class = WEIGHT_CLASS_NORMAL food_reagents = list(/datum/reagent/consumable/nutriment/protein = 14) tastes = list("meat" = 3, "metal" = 1) diff --git a/code/game/objects/items/food/meatslab.dm b/code/game/objects/items/food/meatslab.dm index 6aef3e7ceb2..6e3f124cc8e 100644 --- a/code/game/objects/items/food/meatslab.dm +++ b/code/game/objects/items/food/meatslab.dm @@ -2,6 +2,7 @@ custom_materials = list(/datum/material/meat = MEATSLAB_MATERIAL_AMOUNT) w_class = WEIGHT_CLASS_SMALL icon = 'icons/obj/food/meat.dmi' + abstract_type = /obj/item/food/meat var/subjectname = "" var/subjectjob = null var/blood_decal_type = /obj/effect/decal/cleanable/blood @@ -67,6 +68,9 @@ /obj/item/food/meat/slab/human/make_processable() AddElement(/datum/element/processable, TOOL_KNIFE, /obj/item/food/meat/rawcutlet/plain/human, 3, 3 SECONDS, table_required = TRUE, screentip_verb = "Cut") +/obj/item/food/meat/slab/human/mutant + abstract_type = /obj/item/food/meat/slab/human/mutant + /obj/item/food/meat/slab/human/mutant/slime icon_state = "slimemeat" desc = "Because jello wasn't offensive enough to vegans." diff --git a/code/game/objects/items/food/pizza.dm b/code/game/objects/items/food/pizza.dm index 4f90b9d7aa1..411c76097d5 100644 --- a/code/game/objects/items/food/pizza.dm +++ b/code/game/objects/items/food/pizza.dm @@ -2,6 +2,7 @@ /obj/item/food/pizza name = "pizza" icon = 'icons/obj/food/pizza.dmi' + abstract_type = /obj/item/food/pizza w_class = WEIGHT_CLASS_NORMAL max_volume = 80 icon_state = "pizzamargherita" @@ -124,6 +125,7 @@ /obj/item/food/pizzaslice name = "pizza slice" icon = 'icons/obj/food/pizza.dmi' + abstract_type = /obj/item/food/pizzaslice food_reagents = list(/datum/reagent/consumable/nutriment = 5) icon_state = "pizzamargheritaslice" foodtypes = GRAIN diff --git a/code/game/objects/items/food/salad.dm b/code/game/objects/items/food/salad.dm index ccd00ce505e..58e40439d15 100644 --- a/code/game/objects/items/food/salad.dm +++ b/code/game/objects/items/food/salad.dm @@ -2,6 +2,7 @@ ////////////////////////////////////////////SALAD//////////////////////////////////////////// /obj/item/food/salad icon = 'icons/obj/food/soupsalad.dmi' + abstract_type = /obj/item/food/salad trash_type = /obj/item/reagent_containers/cup/bowl bite_consumption = 3 w_class = WEIGHT_CLASS_NORMAL diff --git a/code/game/objects/items/food/soup.dm b/code/game/objects/items/food/soup.dm index 939de3bd04f..ae0d900f9a7 100644 --- a/code/game/objects/items/food/soup.dm +++ b/code/game/objects/items/food/soup.dm @@ -1,6 +1,7 @@ /obj/item/food/bowled w_class = WEIGHT_CLASS_NORMAL icon = 'icons/obj/food/soupsalad.dmi' + abstract_type = /obj/item/food/bowled bite_consumption = 5 max_volume = 80 foodtypes = NONE @@ -24,7 +25,7 @@ desc = "A wish come true!" reagents.add_reagent(/datum/reagent/consumable/nutriment, 9) reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 1) - + /obj/item/food/bowled/mammi name = "Mammi" desc = "A bowl of mushy bread and milk. It reminds you, not too fondly, of a bowel movement." diff --git a/code/game/objects/items/food/spaghetti.dm b/code/game/objects/items/food/spaghetti.dm index 8a1e6e363c3..00b5e833917 100644 --- a/code/game/objects/items/food/spaghetti.dm +++ b/code/game/objects/items/food/spaghetti.dm @@ -1,6 +1,7 @@ ///spaghetti prototype used by all subtypes /obj/item/food/spaghetti icon = 'icons/obj/food/spaghetti.dmi' + abstract_type = /obj/item/food/spaghetti food_reagents = list( /datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/vitamin = 1, diff --git a/code/game/objects/items/gift.dm b/code/game/objects/items/gift.dm index 866945d9440..1843431f3d2 100644 --- a/code/game/objects/items/gift.dm +++ b/code/game/objects/items/gift.dm @@ -111,13 +111,7 @@ var/static/list/obj/item/possible_gifts = null if(isnull(possible_gifts)) - possible_gifts = list() - for(var/type in subtypesof(/obj/item)) - var/obj/item/thing = type - if(!initial(thing.icon_state) || !initial(thing.inhand_icon_state) || (initial(thing.item_flags) & ABSTRACT)) - continue - - possible_gifts += type + possible_gifts = get_sane_item_types(/obj/item) var/gift_type = pick(possible_gifts) return gift_type diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index f7cb31801e1..0210ef078a0 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -9,6 +9,7 @@ */ /obj/item/restraints + abstract_type = /obj/item/restraints breakouttime = 1 MINUTES dye_color = DYE_PRISONER icon = 'icons/obj/weapons/restraints.dmi' diff --git a/code/game/objects/items/kitchen.dm b/code/game/objects/items/kitchen.dm index bea9ebc969e..4c17f8c9f68 100644 --- a/code/game/objects/items/kitchen.dm +++ b/code/game/objects/items/kitchen.dm @@ -12,6 +12,7 @@ icon = 'icons/obj/service/kitchen.dmi' lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi' + abstract_type = /obj/item/kitchen worn_icon_state = "kitchen_tool" /obj/item/kitchen/Initialize(mapload) diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 1e74d8b94b8..f5005a23b61 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -1,5 +1,6 @@ /obj/item/melee/energy icon = 'icons/obj/weapons/transforming_energy.dmi' + abstract_type = /obj/item/melee/energy icon_angle = -45 max_integrity = 200 armor_type = /datum/armor/melee_energy diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 67cb04a614d..cf36363b880 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -1,5 +1,6 @@ // Deprecated, you do not need to use this type for melee weapons. /obj/item/melee + abstract_type = /obj/item/melee item_flags = NEEDS_PERMIT /obj/item/melee/chainofcommand diff --git a/code/game/objects/items/rcd/RHD.dm b/code/game/objects/items/rcd/RHD.dm index 33874d87c68..53e5ba0cb7d 100644 --- a/code/game/objects/items/rcd/RHD.dm +++ b/code/game/objects/items/rcd/RHD.dm @@ -5,6 +5,7 @@ /obj/item/construction name = "not for ingame use" desc = "A device used to rapidly build and deconstruct. Reload with iron, plasteel, glass or compressed matter cartridges." + abstract_type = /obj/item/construction opacity = FALSE density = FALSE anchored = FALSE diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index 25790cada0a..0d84fda683f 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -299,6 +299,7 @@ icon_state = null worn_icon = 'icons/mob/clothing/head/helmet.dmi' inhand_icon_state = null + abstract_type = /obj/item/clothing/head/helmet/plate/crusader/prophet flags_1 = 0 armor_type = /datum/armor/crusader_prophet worn_y_offset = 6 diff --git a/code/game/objects/items/robot/items/generic.dm b/code/game/objects/items/robot/items/generic.dm index 7d8c2cc9f7f..3c8141459d1 100644 --- a/code/game/objects/items/robot/items/generic.dm +++ b/code/game/objects/items/robot/items/generic.dm @@ -11,6 +11,7 @@ /obj/item/borg icon = 'icons/mob/silicon/robot_items.dmi' + abstract_type = /obj/item/borg /// Cost to use the stun arm #define CYBORG_STUN_CHARGE_COST (0.2 * STANDARD_CELL_CHARGE) diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index a2b7642e8dd..19727a38a23 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -5,6 +5,7 @@ icon = 'icons/obj/weapons/shields.dmi' lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + abstract_type = /obj/item/shield block_chance = 50 slot_flags = ITEM_SLOT_BACK force = 10 @@ -343,7 +344,7 @@ var/effective_block_chance = final_block_chance if(attack_type == OVERWHELMING_ATTACK) effective_block_chance -= 25 - + if(attack_type == PROJECTILE_ATTACK) var/obj/projectile/our_projectile = hitby diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 43c834ede73..35e8dd161f4 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -3,6 +3,7 @@ lefthand_file = 'icons/mob/inhands/items/sheets_lefthand.dmi' righthand_file = 'icons/mob/inhands/items/sheets_righthand.dmi' icon_state = "sheet-metal_3" + abstract_type = /obj/item/stack/sheet full_w_class = WEIGHT_CLASS_NORMAL force = 5 throwforce = 5 diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 87d1d7f8d65..c970f41dab8 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -15,6 +15,7 @@ material_modifier = 0.05 //5%, so that a 50 sheet stack has the effect of 5k materials instead of 100k. max_integrity = 100 item_flags = SKIP_FANTASY_ON_SPAWN + abstract_type = /obj/item/stack /// A list to all recipies this stack item can create. var/list/datum/stack_recipe/recipes /// What's the name of just 1 of this stack. You have a stack of leather, but one piece of leather diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 4560172066a..b06023470eb 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -19,6 +19,7 @@ // Generic non-item /obj/item/storage/bag + abstract_type = /obj/item/storage/bag slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_BULKY storage_type = /datum/storage/bag diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 97bfa6c0aed..90c99011376 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -7,6 +7,7 @@ worn_icon_state = "utility" lefthand_file = 'icons/mob/inhands/equipment/belt_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/belt_righthand.dmi' + abstract_type = /obj/item/storage/belt slot_flags = ITEM_SLOT_BELT attack_verb_continuous = list("whips", "lashes", "disciplines") attack_verb_simple = list("whip", "lash", "discipline") diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 719688c5390..8470c084136 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -15,6 +15,7 @@ /obj/item/storage/fancy icon = 'icons/obj/food/containers.dmi' + abstract_type = /obj/item/storage/fancy resistance_flags = FLAMMABLE custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT) /// Used by examine to report what this thing is holding. diff --git a/code/game/objects/items/storage/storage.dm b/code/game/objects/items/storage/storage.dm index 8ea02a9a462..d9e2fe3ae67 100644 --- a/code/game/objects/items/storage/storage.dm +++ b/code/game/objects/items/storage/storage.dm @@ -1,6 +1,7 @@ /obj/item/storage name = "storage" icon = 'icons/obj/storage/storage.dmi' + abstract_type = /obj/item/storage w_class = WEIGHT_CLASS_NORMAL interaction_flags_click = ALLOW_RESTING | FORBID_TELEKINESIS_REACH action_slots = ALL diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 1e2405c126d..4a39fb5f5d2 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -27,6 +27,7 @@ * Intento */ /obj/item/toy + abstract_type = /obj/item/toy throwforce = 0 throw_speed = 3 throw_range = 7 @@ -296,6 +297,7 @@ inhand_icon_state = "balloon" lefthand_file = 'icons/mob/inhands/items/balloons_lefthand.dmi' righthand_file = 'icons/mob/inhands/items/balloons_righthand.dmi' + abstract_type = /obj/item/toy/balloon_animal throwforce = 0 throw_speed = 2 throw_range = 5 @@ -549,6 +551,9 @@ span_hear("You hear a gunshot!")) return ITEM_INTERACT_SUCCESS +/obj/item/toy/ammo + abstract_type = /obj/item/toy/ammo + /obj/item/toy/ammo/gun name = "capgun ammo" desc = "Make sure to recycle the box in an autolathe when it gets empty." diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index 1c8063885e3..9e513a939cf 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -3,6 +3,7 @@ icon = 'icons/obj/service/janitor.dmi' lefthand_file = 'icons/mob/inhands/items/food_lefthand.dmi' righthand_file = 'icons/mob/inhands/items/food_righthand.dmi' + abstract_type = /obj/item/trash desc = "This is rubbish." w_class = WEIGHT_CLASS_TINY resistance_flags = FLAMMABLE diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 458c5e8ce4a..84df412532e 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -1,5 +1,6 @@ /obj + abstract_type = /obj animate_movement = SLIDE_STEPS speech_span = SPAN_ROBOT var/obj_flags = CAN_BE_HIT diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 2ffeb37c226..3e7e13c1df2 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -1,6 +1,7 @@ /// Inert structures, such as girders, machine frames, and crates/lockers. /obj/structure icon = 'icons/obj/structures.dmi' + abstract_type = /obj/structure pressure_resistance = 8 max_integrity = 300 interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT diff --git a/code/game/objects/structures/mystery_box.dm b/code/game/objects/structures/mystery_box.dm index 764e5b25f8e..4f84c9f5d8a 100644 --- a/code/game/objects/structures/mystery_box.dm +++ b/code/game/objects/structures/mystery_box.dm @@ -173,15 +173,7 @@ GLOBAL_LIST_INIT(mystery_fishing, list( /// This proc is used to define what item types valid_types is filled with /obj/structure/mystery_box/proc/generate_valid_types() - valid_types = list() - - for(var/iter_path in typesof(selectable_base_type)) - if(!ispath(iter_path, /obj/item)) - continue - var/obj/item/iter_item = iter_path - if((initial(iter_item.item_flags) & ABSTRACT) || !initial(iter_item.icon_state) || !initial(iter_item.inhand_icon_state)) - continue - valid_types += iter_path + valid_types = get_sane_item_types(selectable_base_type) /// The box has been activated, play the sound and spawn the prop item /obj/structure/mystery_box/proc/activate(mob/living/user) @@ -275,6 +267,12 @@ GLOBAL_LIST_INIT(mystery_fishing, list( /obj/structure/mystery_box/wands/generate_valid_types() valid_types = GLOB.mystery_magic +/obj/structure/mystery_box/wildcard + desc = "A wooden crate that seems equally magical and mysterious, capable of granting the user all kinds of different pieces of gear. This one has an EXTREAMLY extended array of weaponry." + +/obj/structure/mystery_box/wildcard/generate_valid_types() + valid_types = GLOB.summoned_all_guns + ///A fishing and pirate-themed mystery box, rarely found by fishing in the ocean, then another cannot be caught for the next 30 minutes. /obj/structure/mystery_box/fishing name = "treasure chest" diff --git a/code/game/turfs/closed/_closed.dm b/code/game/turfs/closed/_closed.dm index cf287a6eb6d..c29772afc5b 100644 --- a/code/game/turfs/closed/_closed.dm +++ b/code/game/turfs/closed/_closed.dm @@ -1,6 +1,7 @@ /turf/closed layer = CLOSED_TURF_LAYER plane = WALL_PLANE + abstract_type = /turf/closed turf_flags = IS_SOLID opacity = TRUE density = TRUE diff --git a/code/game/turfs/closed/wall/mineral_walls.dm b/code/game/turfs/closed/wall/mineral_walls.dm index 460da266758..4b84200708e 100644 --- a/code/game/turfs/closed/wall/mineral_walls.dm +++ b/code/game/turfs/closed/wall/mineral_walls.dm @@ -2,6 +2,7 @@ name = "mineral wall" desc = "This shouldn't exist" icon_state = "" + abstract_type = /turf/closed/wall/mineral smoothing_flags = SMOOTH_BITMASK canSmoothWith = null rcd_memory = null diff --git a/code/game/turfs/open/_open.dm b/code/game/turfs/open/_open.dm index 81f14245bea..ee889a87611 100644 --- a/code/game/turfs/open/_open.dm +++ b/code/game/turfs/open/_open.dm @@ -1,4 +1,5 @@ /turf/open + abstract_type = /turf/open layer = LOW_FLOOR_LAYER plane = FLOOR_PLANE ///negative for faster, positive for slower diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 39bd54253b8..28439ffc9a5 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -3,6 +3,7 @@ GLOBAL_LIST_EMPTY(station_turfs) /// Any floor or wall. What makes up the station and the rest of the map. /turf icon = 'icons/turf/floors.dmi' + abstract_type = /turf datum_flags = DF_STATIC_OBJECT vis_flags = VIS_INHERIT_ID // Important for interaction with and visualization of openspace. luminosity = 1 diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index f5958a127f4..f708ec696e0 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -1,4 +1,5 @@ /obj/item/antag_spawner + abstract_type = /obj/item/antag_spawner throw_speed = 1 throw_range = 5 w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm index b056ecbef30..febfa8758a4 100644 --- a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm +++ b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm @@ -2,6 +2,7 @@ icon = 'icons/obj/antags/abductor.dmi' lefthand_file = 'icons/mob/inhands/antag/abductor_lefthand.dmi' righthand_file = 'icons/mob/inhands/antag/abductor_righthand.dmi' + abstract_type = /obj/item/abductor /obj/item/proc/AbductorCheck(mob/user) if (HAS_TRAIT(user, TRAIT_ABDUCTOR_TRAINING)) diff --git a/code/modules/antagonists/changeling/changeling_power.dm b/code/modules/antagonists/changeling/changeling_power.dm index 85fa4b53780..82b0120a7b6 100644 --- a/code/modules/antagonists/changeling/changeling_power.dm +++ b/code/modules/antagonists/changeling/changeling_power.dm @@ -3,6 +3,7 @@ */ /datum/action/changeling + abstract_type = /datum/action/changeling name = "Prototype Sting - Debug button, ahelp this" background_icon_state = "bg_changeling" overlay_icon_state = "bg_changeling_border" diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 028ba5aaa96..dbf97c2f6f4 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -11,6 +11,7 @@ //Parent to shields and blades because muh copypasted code. /datum/action/changeling/weapon + abstract_type = /datum/action/changeling/weapon name = "Organic Weapon" desc = "Go tell a coder if you see this" helptext = "Yell at Miauw and/or Perakp" @@ -87,6 +88,7 @@ //Parent to space suits and armor. /datum/action/changeling/suit + abstract_type = /datum/action/changeling/suit name = "Organic Suit" desc = "Go tell a coder if you see this" helptext = "Yell at Miauw and/or Perakp" diff --git a/code/modules/antagonists/changeling/powers/transform.dm b/code/modules/antagonists/changeling/powers/transform.dm index 20519d2d8b7..81b62be3df7 100644 --- a/code/modules/antagonists/changeling/powers/transform.dm +++ b/code/modules/antagonists/changeling/powers/transform.dm @@ -9,6 +9,7 @@ /obj/item/clothing/glasses/changeling name = "flesh" + spawn_blacklisted = TRUE item_flags = DROPDEL //ATTACK HAND IGNORING PARENT RETURN VALUE @@ -24,6 +25,7 @@ /obj/item/clothing/under/changeling name = "flesh" + spawn_blacklisted = TRUE item_flags = DROPDEL //ATTACK HAND IGNORING PARENT RETURN VALUE @@ -39,6 +41,7 @@ /obj/item/clothing/suit/changeling name = "flesh" + spawn_blacklisted = TRUE allowed = list(/obj/item/changeling) item_flags = DROPDEL @@ -56,6 +59,7 @@ /obj/item/clothing/head/changeling name = "flesh" icon_state = null + spawn_blacklisted = TRUE item_flags = DROPDEL //ATTACK HAND IGNORING PARENT RETURN VALUE @@ -71,6 +75,7 @@ /obj/item/clothing/shoes/changeling name = "flesh" + spawn_blacklisted = TRUE item_flags = DROPDEL //ATTACK HAND IGNORING PARENT RETURN VALUE @@ -86,6 +91,7 @@ /obj/item/clothing/gloves/changeling name = "flesh" + spawn_blacklisted = TRUE item_flags = DROPDEL //ATTACK HAND IGNORING PARENT RETURN VALUE @@ -101,6 +107,7 @@ /obj/item/clothing/mask/changeling name = "flesh" + spawn_blacklisted = TRUE item_flags = DROPDEL //ATTACK HAND IGNORING PARENT RETURN VALUE @@ -116,6 +123,7 @@ /obj/item/changeling name = "flesh" + spawn_blacklisted = TRUE slot_flags = ALL item_flags = DROPDEL diff --git a/code/modules/art/statues.dm b/code/modules/art/statues.dm index 7f467a411b4..7a2fc5a8f5a 100644 --- a/code/modules/art/statues.dm +++ b/code/modules/art/statues.dm @@ -7,6 +7,8 @@ desc = "Placeholder. Yell at Firecage if you SOMEHOW see this." icon = 'icons/obj/art/statue.dmi' icon_state = "" + /// Abstract root type + abstract_type = /obj/structure/statue density = TRUE anchored = FALSE max_integrity = 100 @@ -18,8 +20,6 @@ var/impressiveness = 15 /// Art component subtype added to this statue var/art_type = /datum/element/art - /// Abstract root type - var/abstract_type = /obj/structure/statue /obj/structure/statue/Initialize(mapload) . = ..() diff --git a/code/modules/client/preferences/_preference.dm b/code/modules/client/preferences/_preference.dm index 1d06060d91f..d1bac0a82f8 100644 --- a/code/modules/client/preferences/_preference.dm +++ b/code/modules/client/preferences/_preference.dm @@ -79,6 +79,9 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key()) /// Represents an individual preference. /datum/preference + /// Do not instantiate if type matches this. + abstract_type = /datum/preference + /// The key inside the savefile to use. /// This is also sent to the UI. /// Once you pick this, don't change it. @@ -89,9 +92,6 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key()) /// It is up to the PreferencesMenu UI itself to interpret it. var/category = "misc" - /// Do not instantiate if type matches this. - var/abstract_type = /datum/preference - /// What savefile should this preference be read from? /// Valid values are PREFERENCE_CHARACTER and PREFERENCE_PLAYER. /// See the documentation in [code/__DEFINES/preferences.dm]. diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index f388cea8805..50204df47b1 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -1,5 +1,6 @@ /obj/item/clothing name = "clothing" + abstract_type = /obj/item/clothing resistance_flags = FLAMMABLE max_integrity = 200 integrity_failure = 0.4 @@ -85,6 +86,7 @@ /obj/item/food/clothing name = "temporary moth clothing snack item" desc = "If you're reading this it means I messed up. This is related to moths eating clothes and I didn't know a better way to do it than making a new food object. <--- stinky idiot wrote this" + spawn_blacklisted = TRUE bite_consumption = 1 // sigh, ok, so it's not ACTUALLY infinite nutrition. this is so you can eat clothes more than...once. // bite_consumption limits how much you actually get, and the take_damage in after eat makes sure you can't abuse this. diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index e14fb8a13dd..a5a654687c5 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -4,6 +4,7 @@ name = "ears" lefthand_file = 'icons/mob/inhands/clothing/ears_lefthand.dmi' righthand_file = 'icons/mob/inhands/clothing/ears_righthand.dmi' + abstract_type = /obj/item/clothing/ears w_class = WEIGHT_CLASS_TINY throwforce = 0 slot_flags = ITEM_SLOT_EARS diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 9147a0e1e15..69476431f6d 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -4,6 +4,7 @@ icon = 'icons/obj/clothing/glasses.dmi' lefthand_file = 'icons/mob/inhands/clothing/glasses_lefthand.dmi' righthand_file = 'icons/mob/inhands/clothing/glasses_righthand.dmi' + abstract_type = /obj/item/clothing/glasses w_class = WEIGHT_CLASS_SMALL slot_flags = ITEM_SLOT_EYES strip_delay = 2 SECONDS diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index f1c7785e323..20b321592b7 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -6,6 +6,7 @@ inhand_icon_state = "greyscale_gloves" lefthand_file = 'icons/mob/inhands/clothing/gloves_lefthand.dmi' righthand_file = 'icons/mob/inhands/clothing/gloves_righthand.dmi' + abstract_type = /obj/item/clothing/gloves greyscale_colors = null greyscale_config_inhand_left = /datum/greyscale_config/gloves_inhand_left greyscale_config_inhand_right = /datum/greyscale_config/gloves_inhand_right diff --git a/code/modules/clothing/gloves/insulated.dm b/code/modules/clothing/gloves/insulated.dm index df1e00cf3a8..c3d44c9c760 100644 --- a/code/modules/clothing/gloves/insulated.dm +++ b/code/modules/clothing/gloves/insulated.dm @@ -1,4 +1,5 @@ /obj/item/clothing/gloves/color + abstract_type = /obj/item/clothing/gloves/color dying_key = DYE_REGISTRY_GLOVES greyscale_colors = null diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index a732613edf7..71e3b789a6c 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -4,6 +4,7 @@ worn_icon = 'icons/mob/clothing/head/default.dmi' lefthand_file = 'icons/mob/inhands/clothing/hats_lefthand.dmi' righthand_file = 'icons/mob/inhands/clothing/hats_righthand.dmi' + abstract_type = /obj/item/clothing/head body_parts_covered = HEAD slot_flags = ITEM_SLOT_HEAD diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index ef9385f40ef..8c10a3126d5 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -7,6 +7,7 @@ icon = 'icons/obj/clothing/head/costume.dmi' worn_icon = 'icons/mob/clothing/head/costume.dmi' icon_state = null + abstract_type = /obj/item/clothing/head/collectable /obj/item/clothing/head/collectable/Initialize(mapload) . = ..() diff --git a/code/modules/clothing/head/costume.dm b/code/modules/clothing/head/costume.dm index 971470bdf1d..7607dc8631c 100644 --- a/code/modules/clothing/head/costume.dm +++ b/code/modules/clothing/head/costume.dm @@ -1,6 +1,7 @@ /obj/item/clothing/head/costume icon = 'icons/obj/clothing/head/costume.dmi' worn_icon = 'icons/mob/clothing/head/costume.dmi' + abstract_type = /obj/item/clothing/head/costume /obj/item/clothing/head/costume/powdered_wig name = "powdered wig" diff --git a/code/modules/clothing/head/hat.dm b/code/modules/clothing/head/hat.dm index 86476cceb21..048e7c2285b 100644 --- a/code/modules/clothing/head/hat.dm +++ b/code/modules/clothing/head/hat.dm @@ -1,6 +1,7 @@ /obj/item/clothing/head/hats icon = 'icons/obj/clothing/head/hats.dmi' worn_icon = 'icons/mob/clothing/head/hats.dmi' + abstract_type = /obj/item/clothing/head/hats /obj/item/clothing/head/hats/centhat name = "\improper CentCom hat" @@ -356,6 +357,9 @@ upsprite = "ushankaup_polar" downsprite = "ushankadown_polar" +/obj/item/clothing/head/costume/nightcap + abstract_type = /obj/item/clothing/head/costume/nightcap + /obj/item/clothing/head/costume/nightcap/blue name = "blue nightcap" desc = "A blue nightcap for all the dreamers and snoozers out there." diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index d593119dafe..be5c86740c3 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -398,6 +398,7 @@ /obj/item/clothing/head/hats/hos name = "generic head of security hat" desc = "Please contact the Nanotrasen Costuming Department if found." + abstract_type = /obj/item/clothing/head/hats/hos armor_type = /datum/armor/hats_hos strip_delay = 8 SECONDS diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index bed6d8afab7..8682dc4a927 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -3,6 +3,7 @@ icon = 'icons/obj/clothing/masks.dmi' lefthand_file = 'icons/mob/inhands/clothing/masks_lefthand.dmi' righthand_file = 'icons/mob/inhands/clothing/masks_righthand.dmi' + abstract_type = /obj/item/clothing/mask body_parts_covered = HEAD slot_flags = ITEM_SLOT_MASK strip_delay = 4 SECONDS diff --git a/code/modules/clothing/masks/animal_masks.dm b/code/modules/clothing/masks/animal_masks.dm index d3482a2c39e..2913ae101ff 100644 --- a/code/modules/clothing/masks/animal_masks.dm +++ b/code/modules/clothing/masks/animal_masks.dm @@ -14,6 +14,7 @@ GLOBAL_LIST_INIT(cursed_animal_masks, list( )) /obj/item/clothing/mask/animal + abstract_type = /obj/item/clothing/mask w_class = WEIGHT_CLASS_SMALL clothing_flags = VOICEBOX_TOGGLABLE var/modifies_speech = TRUE @@ -193,6 +194,7 @@ GLOBAL_LIST_INIT(cursed_animal_masks, list( /obj/item/clothing/mask/animal/small name = "A small animal mask" desc = "If you're seeing this, yell at a coder." + abstract_type = /obj/item/clothing/mask/animal/small flags_inv = HIDEFACE|HIDESNOUT /obj/item/clothing/mask/animal/small/make_cursed() diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index f47f470580b..b70e7105bf4 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -1,6 +1,7 @@ /obj/item/clothing/neck name = "necklace" icon = 'icons/obj/clothing/neck.dmi' + abstract_type = /obj/item/clothing/neck body_parts_covered = NECK slot_flags = ITEM_SLOT_NECK interaction_flags_click = NEED_DEXTERITY diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 5463ac03d1c..dc3dbe27cf9 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -3,6 +3,7 @@ icon = 'icons/obj/clothing/shoes.dmi' lefthand_file = 'icons/mob/inhands/clothing/shoes_lefthand.dmi' righthand_file = 'icons/mob/inhands/clothing/shoes_righthand.dmi' + abstract_type = /obj/item/clothing/shoes desc = "Comfortable-looking shoes." pickup_sound = 'sound/items/handling/shoes/sneakers_pickup1.ogg' drop_sound = 'sound/items/handling/shoes/sneakers_drop1.ogg' diff --git a/code/modules/clothing/suits/_suits.dm b/code/modules/clothing/suits/_suits.dm index 6df25ca10bb..74bb02622fc 100644 --- a/code/modules/clothing/suits/_suits.dm +++ b/code/modules/clothing/suits/_suits.dm @@ -3,6 +3,7 @@ icon = 'icons/obj/clothing/suits/default.dmi' lefthand_file = 'icons/mob/inhands/clothing/suits_lefthand.dmi' righthand_file = 'icons/mob/inhands/clothing/suits_righthand.dmi' + abstract_type = /obj/item/clothing/suit var/fire_resist = T0C+100 allowed = list( /obj/item/tank/internals/emergency_oxygen, diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 939912dd95e..3fc343810cb 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -2,6 +2,7 @@ name = "armor" icon = 'icons/obj/clothing/suits/armor.dmi' worn_icon = 'icons/mob/clothing/suits/armor.dmi' + abstract_type = /obj/item/clothing/suit/armor allowed = null body_parts_covered = CHEST cold_protection = CHEST|GROIN @@ -755,6 +756,9 @@ acid = 50 wound = 30 +/obj/item/clothing/suit/armor/durability + abstract_type = /obj/item/clothing/suit/armor/durability + /obj/item/clothing/suit/armor/durability/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE) take_damage(1, BRUTE, 0, 0) diff --git a/code/modules/clothing/suits/costume.dm b/code/modules/clothing/suits/costume.dm index f0e2ed59831..656cdd287bd 100644 --- a/code/modules/clothing/suits/costume.dm +++ b/code/modules/clothing/suits/costume.dm @@ -1,6 +1,7 @@ /obj/item/clothing/suit/costume icon = 'icons/obj/clothing/suits/costume.dmi' worn_icon = 'icons/mob/clothing/suits/costume.dmi' + abstract_type = /obj/item/clothing/suit/costume /obj/item/clothing/suit/hooded/flashsuit name = "flashy costume" diff --git a/code/modules/clothing/suits/ghostsheet.dm b/code/modules/clothing/suits/ghostsheet.dm index 52c19be3bd1..d5d9c370ae9 100644 --- a/code/modules/clothing/suits/ghostsheet.dm +++ b/code/modules/clothing/suits/ghostsheet.dm @@ -28,8 +28,9 @@ desc = "This is obviously just a bedsheet, but maybe try it on?" icon = 'icons/obj/clothing/suits/costume.dmi' worn_icon = 'icons/mob/clothing/suits/costume.dmi' - user_vars_to_edit = list("name" = "Spooky Ghost", "real_name" = "Spooky Ghost" , "incorporeal_move" = INCORPOREAL_MOVE_BASIC, "appearance_flags" = KEEP_TOGETHER|TILE_BOUND, "alpha" = 150) + icon_state = "ghost_sheet" inhand_icon_state = null + user_vars_to_edit = list("name" = "Spooky Ghost", "real_name" = "Spooky Ghost", "incorporeal_move" = INCORPOREAL_MOVE_BASIC, "appearance_flags" = KEEP_TOGETHER|TILE_BOUND, "alpha" = 150) throwforce = 0 throw_speed = 1 throw_range = 2 diff --git a/code/modules/clothing/suits/jacket.dm b/code/modules/clothing/suits/jacket.dm index 558d8d61583..820aeba2e14 100644 --- a/code/modules/clothing/suits/jacket.dm +++ b/code/modules/clothing/suits/jacket.dm @@ -1,6 +1,7 @@ /obj/item/clothing/suit/jacket icon = 'icons/obj/clothing/suits/jacket.dmi' worn_icon = 'icons/mob/clothing/suits/jacket.dmi' + abstract_type = /obj/item/clothing/suit/jacket allowed = list( /obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, @@ -22,6 +23,7 @@ /obj/item/clothing/suit/toggle/jacket icon = 'icons/obj/clothing/suits/jacket.dmi' worn_icon = 'icons/mob/clothing/suits/jacket.dmi' + abstract_type = /obj/item/clothing/suit/toggle/jacket allowed = list( /obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 1040bc03120..12ba36c89eb 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -58,9 +58,13 @@ return /obj/item/clothing/suit/toggle + abstract_type = /obj/item/clothing/suit/toggle /// The noun that is displayed to the user on toggle. EX: "Toggles the suit's [buttons]". var/toggle_noun = "buttons" /obj/item/clothing/suit/toggle/Initialize(mapload) . = ..() AddComponent(/datum/component/toggle_icon, toggle_noun) + +/obj/item/clothing/head/hooded + abstract_type = /obj/item/clothing/head/hooded diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index 0d03a636201..556ce0a1327 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -4,6 +4,7 @@ worn_icon = 'icons/mob/clothing/under/default.dmi' lefthand_file = 'icons/mob/inhands/clothing/suits_lefthand.dmi' righthand_file = 'icons/mob/inhands/clothing/suits_righthand.dmi' + abstract_type = /obj/item/clothing/under body_parts_covered = CHEST|GROIN|LEGS|ARMS slot_flags = ITEM_SLOT_ICLOTHING interaction_flags_click = NEED_DEXTERITY @@ -533,4 +534,5 @@ return ..() /obj/item/clothing/under/rank + abstract_type = /obj/item/clothing/under/rank dying_key = DYE_REGISTRY_UNDER diff --git a/code/modules/clothing/under/accessories/_accessories.dm b/code/modules/clothing/under/accessories/_accessories.dm index 60fcbf97e5c..954652621a5 100644 --- a/code/modules/clothing/under/accessories/_accessories.dm +++ b/code/modules/clothing/under/accessories/_accessories.dm @@ -15,6 +15,7 @@ worn_icon = 'icons/mob/clothing/accessories.dmi' icon_state = "plasma" inhand_icon_state = "" //no inhands + abstract_type = /obj/item/clothing/accessory slot_flags = NONE w_class = WEIGHT_CLASS_SMALL item_flags = NOBLUDGEON diff --git a/code/modules/clothing/under/jobs/cargo.dm b/code/modules/clothing/under/jobs/cargo.dm index 1d39d2f1ad7..c2c1325d4aa 100644 --- a/code/modules/clothing/under/jobs/cargo.dm +++ b/code/modules/clothing/under/jobs/cargo.dm @@ -1,6 +1,7 @@ /obj/item/clothing/under/rank/cargo icon = 'icons/obj/clothing/under/cargo.dmi' worn_icon = 'icons/mob/clothing/under/cargo.dmi' + abstract_type = /obj/item/clothing/under/rank/cargo /obj/item/clothing/under/rank/cargo/qm name = "quartermaster's uniform" diff --git a/code/modules/clothing/under/jobs/centcom.dm b/code/modules/clothing/under/jobs/centcom.dm index ccd268eb764..38bcafe1211 100644 --- a/code/modules/clothing/under/jobs/centcom.dm +++ b/code/modules/clothing/under/jobs/centcom.dm @@ -1,6 +1,7 @@ /obj/item/clothing/under/rank/centcom icon = 'icons/obj/clothing/under/centcom.dmi' worn_icon = 'icons/mob/clothing/under/centcom.dmi' + abstract_type = /obj/item/clothing/under/rank/centcom /obj/item/clothing/under/rank/centcom/commander name = "\improper CentCom commander's suit" diff --git a/code/modules/clothing/under/jobs/civilian/civilian.dm b/code/modules/clothing/under/jobs/civilian/civilian.dm index d906bc3d879..923cfbaa74c 100644 --- a/code/modules/clothing/under/jobs/civilian/civilian.dm +++ b/code/modules/clothing/under/jobs/civilian/civilian.dm @@ -3,6 +3,7 @@ /obj/item/clothing/under/rank/civilian icon = 'icons/obj/clothing/under/civilian.dmi' worn_icon = 'icons/mob/clothing/under/civilian.dmi' + abstract_type = /obj/item/clothing/under/rank/civilian /obj/item/clothing/under/rank/civilian/purple_bartender desc = "It looks like it has lots of flair!" @@ -113,6 +114,7 @@ desc = "Slick threads." icon = 'icons/obj/clothing/under/suits.dmi' worn_icon = 'icons/mob/clothing/under/suits.dmi' + abstract_type = /obj/item/clothing/under/rank/civilian/lawyer can_adjust = FALSE /obj/item/clothing/under/rank/civilian/lawyer/dye_item(dye_color, dye_key_override) diff --git a/code/modules/clothing/under/jobs/engineering.dm b/code/modules/clothing/under/jobs/engineering.dm index 85ce2c2976f..257312ffff8 100644 --- a/code/modules/clothing/under/jobs/engineering.dm +++ b/code/modules/clothing/under/jobs/engineering.dm @@ -3,6 +3,7 @@ /obj/item/clothing/under/rank/engineering icon = 'icons/obj/clothing/under/engineering.dmi' worn_icon = 'icons/mob/clothing/under/engineering.dmi' + abstract_type = /obj/item/clothing/under/rank/engineering armor_type = /datum/armor/clothing_under/rank_engineering resistance_flags = NONE diff --git a/code/modules/clothing/under/jobs/medical.dm b/code/modules/clothing/under/jobs/medical.dm index 9937e23929a..6cf86c8770e 100644 --- a/code/modules/clothing/under/jobs/medical.dm +++ b/code/modules/clothing/under/jobs/medical.dm @@ -1,6 +1,7 @@ /obj/item/clothing/under/rank/medical icon = 'icons/obj/clothing/under/medical.dmi' worn_icon = 'icons/mob/clothing/under/medical.dmi' + abstract_type = /obj/item/clothing/under/rank/medical armor_type = /datum/armor/clothing_under/rank_medical /datum/armor/clothing_under/rank_medical diff --git a/code/modules/clothing/under/jobs/rnd.dm b/code/modules/clothing/under/jobs/rnd.dm index bb65ef5801f..b5731ac06a4 100644 --- a/code/modules/clothing/under/jobs/rnd.dm +++ b/code/modules/clothing/under/jobs/rnd.dm @@ -1,6 +1,7 @@ /obj/item/clothing/under/rank/rnd icon = 'icons/obj/clothing/under/rnd.dmi' worn_icon = 'icons/mob/clothing/under/rnd.dmi' + abstract_type = /obj/item/clothing/under/rank/rnd armor_type = /datum/armor/clothing_under/science /datum/armor/clothing_under/science diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm index 1753c9311e1..8d6753afadb 100644 --- a/code/modules/clothing/under/jobs/security.dm +++ b/code/modules/clothing/under/jobs/security.dm @@ -12,6 +12,7 @@ /obj/item/clothing/under/rank/security icon = 'icons/obj/clothing/under/security.dmi' worn_icon = 'icons/mob/clothing/under/security.dmi' + abstract_type = /obj/item/clothing/under/rank/security armor_type = /datum/armor/clothing_under/rank_security strip_delay = 5 SECONDS sensor_mode = SENSOR_COORDS diff --git a/code/modules/clothing/under/jobs/station_trait.dm b/code/modules/clothing/under/jobs/station_trait.dm index 034641d35b1..b351bd2a17e 100644 --- a/code/modules/clothing/under/jobs/station_trait.dm +++ b/code/modules/clothing/under/jobs/station_trait.dm @@ -4,6 +4,7 @@ /obj/item/clothing/under/rank/station_trait icon = 'icons/obj/clothing/under/station_trait.dmi' worn_icon = 'icons/mob/clothing/under/station_trait.dmi' + abstract_type = /obj/item/clothing/under/rank/station_trait /obj/item/clothing/under/rank/station_trait/human_ai name = "ai's uniform" diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index ba7a6b8c0ba..91ca031837f 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -1,6 +1,7 @@ /obj/item/clothing/under/misc icon = 'icons/obj/clothing/under/misc.dmi' worn_icon = 'icons/mob/clothing/under/misc.dmi' + abstract_type = /obj/item/clothing/under/misc /obj/item/clothing/under/misc/pj name = "\improper PJs" diff --git a/code/modules/clothing/under/pants.dm b/code/modules/clothing/under/pants.dm index 90f05d8f2ea..ea76c0b6153 100644 --- a/code/modules/clothing/under/pants.dm +++ b/code/modules/clothing/under/pants.dm @@ -6,6 +6,7 @@ custom_price = PAYCHECK_CREW icon = 'icons/obj/clothing/under/shorts_pants_shirts.dmi' worn_icon = 'icons/mob/clothing/under/shorts_pants_shirts.dmi' + abstract_type = /obj/item/clothing/under/pants species_exception = list(/datum/species/golem) /obj/item/clothing/under/pants/slacks diff --git a/code/modules/explorer_drone/exploration_events/_exploration_event.dm b/code/modules/explorer_drone/exploration_events/_exploration_event.dm index 5385a48fbb4..d60b730e07d 100644 --- a/code/modules/explorer_drone/exploration_events/_exploration_event.dm +++ b/code/modules/explorer_drone/exploration_events/_exploration_event.dm @@ -1,7 +1,7 @@ /// Exploration event /datum/exploration_event /// These types will be ignored in event creation - var/root_abstract_type = /datum/exploration_event + abstract_type = /datum/exploration_event ///This name will show up in exploration list if it's repeatable var/name = "Something interesting" /// encountered at least once @@ -40,7 +40,7 @@ /// Simple events, not a full fledged adventure, consist only of single encounter screen /datum/exploration_event/simple - root_abstract_type = /datum/exploration_event/simple + abstract_type = /datum/exploration_event/simple var/ui_image = "default" /// Show ignore button. var/skippable = TRUE diff --git a/code/modules/explorer_drone/exploration_events/adventure.dm b/code/modules/explorer_drone/exploration_events/adventure.dm index bdf9b62c10b..f7127d67778 100644 --- a/code/modules/explorer_drone/exploration_events/adventure.dm +++ b/code/modules/explorer_drone/exploration_events/adventure.dm @@ -2,7 +2,7 @@ /datum/exploration_event/adventure discovery_log = "Encountered something unexpected" var/datum/adventure/adventure - root_abstract_type = /datum/exploration_event/adventure + abstract_type = /datum/exploration_event/adventure /datum/exploration_event/adventure/encounter(obj/item/exodrone/drone) . = ..() diff --git a/code/modules/explorer_drone/exploration_events/danger.dm b/code/modules/explorer_drone/exploration_events/danger.dm index 605974fa828..5a4d7020742 100644 --- a/code/modules/explorer_drone/exploration_events/danger.dm +++ b/code/modules/explorer_drone/exploration_events/danger.dm @@ -1,6 +1,6 @@ /// Danger event - unskippable, if you have appriopriate tool you can mitigate damage. /datum/exploration_event/simple/danger - root_abstract_type = /datum/exploration_event/simple/danger + abstract_type = /datum/exploration_event/simple/danger description = "You encounter a giant error." var/required_tool = EXODRONE_TOOL_LASER var/has_tool_action_text = "Fight" @@ -88,7 +88,7 @@ required_tool = EXODRONE_TOOL_MULTITOOL deep_scan_description = "Site is exposed to space radiation. Using self-diagnostic multiool attachment advised." description = "The drone feed suddenly goes haywire! It seems that the drone got hit by a burst of cosmic rays! You'll have to wait for the signal to be restored." - has_tool_description = "Your multitool should allow a significant amount of the damage to be repaired on its own." //wait, what? + has_tool_description = "Your multitool should allow a significant amount of the damage to be repaired on its own." //wait, what? no_tool_description = "Nothing more to be done than to wait and assess the damage." has_tool_action_text = "Wait" no_tool_action_text = "Wait" diff --git a/code/modules/explorer_drone/exploration_events/resource.dm b/code/modules/explorer_drone/exploration_events/resource.dm index 762f661aa6c..908ad0cb81d 100644 --- a/code/modules/explorer_drone/exploration_events/resource.dm +++ b/code/modules/explorer_drone/exploration_events/resource.dm @@ -1,7 +1,7 @@ /// Simple event type that checks if you have a tool and after a retrieval delay adds loot to drone. /datum/exploration_event/simple/resource name = "retrievable resource" - root_abstract_type = /datum/exploration_event/simple/resource + abstract_type = /datum/exploration_event/simple/resource discovery_log = "Encountered recoverable resource." action_text = "Extract" /// Tool type required to recover this resource diff --git a/code/modules/explorer_drone/exploration_events/trader.dm b/code/modules/explorer_drone/exploration_events/trader.dm index 0367eb71516..ba0bbdf22ed 100644 --- a/code/modules/explorer_drone/exploration_events/trader.dm +++ b/code/modules/explorer_drone/exploration_events/trader.dm @@ -1,6 +1,6 @@ /// Trader events - If drone is loaded with X exchanges it for Y, might require translator tool. /datum/exploration_event/simple/trader - root_abstract_type = /datum/exploration_event/simple/trader + abstract_type = /datum/exploration_event/simple/trader action_text = "Trade" /// Obj path we'll take or list of paths ,one path will be picked from it at init var/required_path diff --git a/code/modules/explorer_drone/exploration_site.dm b/code/modules/explorer_drone/exploration_site.dm index 9a21203d596..4a8be99417e 100644 --- a/code/modules/explorer_drone/exploration_site.dm +++ b/code/modules/explorer_drone/exploration_site.dm @@ -120,7 +120,7 @@ GLOBAL_LIST_EMPTY(exploration_sites) . = list() for(var/event_type in subtypesof(/datum/exploration_event)) var/datum/exploration_event/event = event_type - if(initial(event.root_abstract_type) == event_type) + if(initial(event.abstract_type) == event_type) continue event = new event_type .[event_type] = list("required" = event.required_site_traits,"blacklisted" = event.blacklisted_site_traits) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index a254241d1fd..3a819bf9941 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -11,10 +11,11 @@ // Base type. Subtypes are found in /grown dir. Lavaland-based subtypes can be found in mining/ash_flora.dm /obj/item/food/grown + name = "fresh produce" // so recipe text doesn't say 'snack' icon = 'icons/obj/service/hydroponics/harvest.dmi' icon_state = "berrypile" worn_icon = 'icons/mob/clothing/head/hydroponics.dmi' - name = "fresh produce" // so recipe text doesn't say 'snack' + abstract_type = /obj/item/food/grown max_volume = PLANT_REAGENT_VOLUME w_class = WEIGHT_CLASS_SMALL resistance_flags = FLAMMABLE diff --git a/code/modules/hydroponics/grown/citrus.dm b/code/modules/hydroponics/grown/citrus.dm index f23bb43305b..93be3a4a05f 100644 --- a/code/modules/hydroponics/grown/citrus.dm +++ b/code/modules/hydroponics/grown/citrus.dm @@ -1,11 +1,12 @@ // Citrus - base type /obj/item/food/grown/citrus - seed = /obj/item/seeds/lime name = "citrus" desc = "It's so sour, your face will twist." icon_state = "lime" + abstract_type = /obj/item/food/grown/citrus foodtypes = FRUIT wine_power = 30 + seed = /obj/item/seeds/lime // Lime /obj/item/seeds/lime diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 9d0e465d033..7a1003ed2ad 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -1,5 +1,6 @@ /obj/item/food/grown/mushroom name = "mushroom" + abstract_type = /obj/item/food/grown/mushroom // This is a prototype that should never be spawned // but we'll default it to SOME seed if it does end up spawning just so we don't runtime horribly seed = /obj/item/seeds/chanter diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index 2b2556790e2..1565c3113ac 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -6,6 +6,7 @@ name = "grown_weapon" icon = 'icons/obj/service/hydroponics/harvest.dmi' worn_icon = 'icons/mob/clothing/head/hydroponics.dmi' + abstract_type = /obj/item/grown resistance_flags = FLAMMABLE var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item. /// Should we pixel offset ourselves at init? for mapping @@ -13,7 +14,7 @@ /// The reagent this plant distill to. If NULL, it uses a generic fruit_wine reagent and adjusts its variables. var/distill_reagent -// This may look like it's doing nothing but it's necessary, we do this to have kwargs work in New (for passing into Initialize) +// This may look like it's doing nothing but it's necessary, we do this to have kwargs work in New (for passing into Initialize) /obj/item/grown/New(loc, obj/item/seeds/new_seed) return ..() diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 6a186a183d0..fd84d079554 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -6,6 +6,7 @@ icon = 'icons/obj/service/hydroponics/seeds.dmi' icon_state = "seed" // Unknown plant seed - these shouldn't exist in-game. worn_icon_state = "seed" + abstract_type = /obj/item/seeds w_class = WEIGHT_CLASS_TINY resistance_flags = FLAMMABLE /// Name of plant when planted. diff --git a/code/modules/instruments/instrument_data/_instrument_data.dm b/code/modules/instruments/instrument_data/_instrument_data.dm index 12a4b17062a..2f3929fdfaa 100644 --- a/code/modules/instruments/instrument_data/_instrument_data.dm +++ b/code/modules/instruments/instrument_data/_instrument_data.dm @@ -17,14 +17,14 @@ * Since songs cache them while playing, there isn't realistic issues regarding performance from accessing. */ /datum/instrument + /// Used for categorization subtypes + abstract_type = /datum/instrument /// Name of the instrument var/name = "Generic instrument" /// Uniquely identifies this instrument so runtime changes are possible as opposed to paths. If this is unset, things will use path instead. var/id /// Category var/category = "Unsorted" - /// Used for categorization subtypes - var/abstract_type = /datum/instrument /// Write here however many samples, follow this syntax: "%note num%"='%sample file%' eg. "27"='synthesizer/e2.ogg'. Key must never be lower than 0 and higher than 127 var/list/real_samples /// assoc list key = /datum/instrument_key. do not fill this yourself! diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm index de6ae2d0bbf..cde0adbdc94 100644 --- a/code/modules/instruments/items.dm +++ b/code/modules/instruments/items.dm @@ -7,6 +7,7 @@ icon = 'icons/obj/art/musician.dmi' lefthand_file = 'icons/mob/inhands/equipment/instruments_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/instruments_righthand.dmi' + abstract_type = /obj/item/instrument /// Our song datum. var/datum/song/handheld/song /// Our allowed list of instrument ids. This is nulled on initialize. diff --git a/code/modules/loadout/loadout_items.dm b/code/modules/loadout/loadout_items.dm index a74e87b4c0e..2400798bbeb 100644 --- a/code/modules/loadout/loadout_items.dm +++ b/code/modules/loadout/loadout_items.dm @@ -30,6 +30,8 @@ GLOBAL_LIST_INIT(all_loadout_categories, init_loadout_categories()) * Singleton that holds all the information about each loadout items, and how to equip them. */ /datum/loadout_item + /// The abstract parent of this loadout item, to determine which items to not instantiate + abstract_type = /datum/loadout_item /// The category of the loadout item. Set automatically in New VAR_FINAL/datum/loadout_category/category /// Displayed name of the loadout item. @@ -49,8 +51,6 @@ GLOBAL_LIST_INIT(all_loadout_categories, init_loadout_categories()) /// Whether this item can be reskinned. /// Only works if the item has a "unique reskin" list set. var/can_be_reskinned = FALSE - /// The abstract parent of this loadout item, to determine which items to not instantiate - var/abstract_type = /datum/loadout_item /// The actual item path of the loadout item. var/obj/item/item_path /// Icon file (DMI) for the UI to use for preview icons. diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index e5d6e82cf74..d9e6b3c16c8 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -185,6 +185,7 @@ desc = "Some shavings from a tall mushroom. With enough, might serve as a bowl." icon = 'icons/obj/mining_zones/ash_flora.dmi' icon_state = "mushroom_shavings" + abstract_type = /obj/item/food/grown/ash_flora w_class = WEIGHT_CLASS_TINY resistance_flags = FLAMMABLE max_integrity = 100 diff --git a/code/modules/mob/living/basic/basic.dm b/code/modules/mob/living/basic/basic.dm index 9ee2145dff2..e2d1482c8a5 100644 --- a/code/modules/mob/living/basic/basic.dm +++ b/code/modules/mob/living/basic/basic.dm @@ -2,6 +2,7 @@ /mob/living/basic name = "basic mob" icon = 'icons/mob/simple/animal.dmi' + abstract_type = /mob/living/basic health = 20 maxHealth = 20 max_stamina = BASIC_MOB_STAMINA_MATCH_HEALTH diff --git a/code/modules/mob/living/blood_types.dm b/code/modules/mob/living/blood_types.dm index f379900acb7..c2c68428ec5 100644 --- a/code/modules/mob/living/blood_types.dm +++ b/code/modules/mob/living/blood_types.dm @@ -15,8 +15,6 @@ var/datum/reagent/reagent_type = /datum/reagent/blood /// What chem is used to restore this blood type (outside of itself, of course)? var/datum/reagent/restoration_chem = /datum/reagent/iron - /// Exclude abstract root types from being initialized by defining them here - var/root_abstract_type /// If this blood type is meant to persist across species changes var/is_species_universal /// Splash and expose behaviors for this blood type's reagent, to prevent water-blood covered items, as well as information transfer flags @@ -165,7 +163,7 @@ /datum/blood_type/human desc = "Blood cells suspended in plasma, the most abundant of which being the hemoglobin-containing red blood cells." dna_string = "Human DNA" - root_abstract_type = /datum/blood_type/human + abstract_type = /datum/blood_type/human /datum/blood_type/human/a_minus name = BLOOD_TYPE_A_MINUS @@ -384,7 +382,7 @@ /// An abstract-ish blood type used particularly for species with blood set to random reagents, such as podpeople /datum/blood_type/random_chemical - root_abstract_type = /datum/blood_type/random_chemical + abstract_type = /datum/blood_type/random_chemical /datum/blood_type/random_chemical/New(datum/reagent/reagent) name = initial(reagent.name) @@ -393,7 +391,7 @@ id = type_key() color = initial(reagent.color) reagent_type = reagent - root_abstract_type = null + abstract_type = null /datum/blood_type/random_chemical/type_key() return reagent_type diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index d137f110f3a..90896042dbe 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -1,4 +1,5 @@ /mob/living/carbon + abstract_type = /mob/living/carbon blood_volume = BLOOD_VOLUME_NORMAL gender = MALE pressure_resistance = 15 diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 7b455134bc5..5269d7ebefb 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -14,6 +14,7 @@ initial_language_holder = /datum/language_holder/empty // We get stuff from our species flags_1 = PREVENT_CONTENTS_EXPLOSION_1 max_grab = GRAB_KILL + examine_thats = "This is" //Hair colour and style var/hair_color = COLOR_BLACK diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 7754593a432..505000db767 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -1,5 +1,6 @@ /mob/living see_invisible = SEE_INVISIBLE_LIVING + abstract_type = /mob/living hud_possible = list(HEALTH_HUD,STATUS_HUD,ANTAG_HUD) pressure_resistance = 10 hud_type = /datum/hud/living diff --git a/code/modules/mob/living/silicon/robot/robot_defines.dm b/code/modules/mob/living/silicon/robot/robot_defines.dm index 07eb2b23611..8ae9d1cf0c6 100644 --- a/code/modules/mob/living/silicon/robot/robot_defines.dm +++ b/code/modules/mob/living/silicon/robot/robot_defines.dm @@ -19,6 +19,7 @@ mouse_drop_zone = TRUE held_items = list(null, null, null) //we use held_items for the module holding, because that makes sense to do! default_hand_amount = 3 + examine_thats = "This is" ///Represents the cyborg's model (engineering, medical, etc.) var/obj/item/robot_model/model = null diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index b8c1c7d281f..a5a08116aff 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -1,5 +1,6 @@ /mob/living/silicon gender = NEUTER + abstract_type = /mob/living/silicon verb_say = "states" verb_ask = "queries" verb_exclaim = "declares" diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index c6e03028a26..bd8b6fdc01c 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -1,4 +1,5 @@ /mob/living/simple_animal/hostile + abstract_type = /mob/living/simple_animal/hostile faction = list(FACTION_HOSTILE) stop_automated_movement_when_pulled = 0 obj_damage = 40 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm index ace7f2d257e..909a0670630 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/_megafauna.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/megafauna name = "boss of this gym" desc = "Attack the weak point for massive damage." + abstract_type = /mob/living/simple_animal/hostile/megafauna health = 1000 maxHealth = 1000 combat_mode = TRUE diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm index 8cc6fc3e02f..e105ab56cd1 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm @@ -7,6 +7,7 @@ name = "elite" desc = "An elite monster, found in one of the strange tumors on lavaland." icon = 'icons/mob/simple/lavaland/lavaland_elites.dmi' + abstract_type = /mob/living/simple_animal/hostile/asteroid/elite faction = list(FACTION_MINING, FACTION_BOSS) robust_searching = TRUE ranged_ignores_vision = TRUE diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm index 9999736abf7..a2e718aa851 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/mining_mobs.dm @@ -1,5 +1,6 @@ //the base mining mob /mob/living/simple_animal/hostile/asteroid + abstract_type = /mob/living/simple_animal/hostile/asteroid vision_range = 2 atmos_requirements = null faction = list(FACTION_MINING) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index c65176ceacd..d324557412d 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal name = "animal" icon = 'icons/mob/simple/animal.dmi' + abstract_type = /mob/living/simple_animal health = 20 maxHealth = 20 gender = PLURAL //placeholder diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index fe91176128b..d43edf33d74 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -9,6 +9,7 @@ /mob density = TRUE layer = MOB_LAYER + abstract_type = /mob animate_movement = SLIDE_STEPS hud_possible = list(ANTAG_HUD) pressure_resistance = 8 diff --git a/code/modules/mod/modules/_module.dm b/code/modules/mod/modules/_module.dm index 57765677d46..ecf20ae2532 100644 --- a/code/modules/mod/modules/_module.dm +++ b/code/modules/mod/modules/_module.dm @@ -3,6 +3,7 @@ name = "MOD module" icon = 'icons/obj/clothing/modsuit/mod_modules.dmi' icon_state = "module" + abstract_type = /obj/item/mod/module /// If it can be removed var/removable = TRUE /// If it's passive, togglable, usable or active diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm index 4194badcc0e..f708ec04f6c 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -3,6 +3,7 @@ name = "ammo box (null_reference_exception)" desc = "A box of ammo." icon = 'icons/obj/weapons/guns/ammo.dmi' + abstract_type = /obj/item/ammo_box obj_flags = CONDUCTS_ELECTRICITY slot_flags = ITEM_SLOT_BELT inhand_icon_state = "syringe_kit" @@ -258,6 +259,7 @@ /obj/item/ammo_box/magazine name = "A magazine (what?)" desc = "A magazine of rounds, they look like error signs... this should probably be reported somewhere." + abstract_type = /obj/item/ammo_box/magazine ammo_box_multiload = AMMO_BOX_MULTILOAD_IN // so you can't use a magazine like a bootleg speedloader drop_sound = 'sound/items/handling/gun/ballistics/magazine/magazine_drop1.ogg' pickup_sound = 'sound/items/handling/gun/ballistics/magazine/magazine_pickup1.ogg' diff --git a/code/modules/projectiles/boxes_magazines/external/toy.dm b/code/modules/projectiles/boxes_magazines/external/toy.dm index ff45d604ebc..1db22717181 100644 --- a/code/modules/projectiles/boxes_magazines/external/toy.dm +++ b/code/modules/projectiles/boxes_magazines/external/toy.dm @@ -1,6 +1,7 @@ /obj/item/ammo_box/magazine/toy name = "foam force META magazine" desc = "A magazine specifically designed for foam force \"firearms\". Probably not great for actually killing your fellow spaceman." + abstract_type = /obj/item/ammo_box/magazine/toy ammo_type = /obj/item/ammo_casing/foam_dart caliber = CALIBER_FOAM diff --git a/code/modules/projectiles/boxes_magazines/internal/_internal.dm b/code/modules/projectiles/boxes_magazines/internal/_internal.dm index 0579d19234b..43b34979e44 100644 --- a/code/modules/projectiles/boxes_magazines/internal/_internal.dm +++ b/code/modules/projectiles/boxes_magazines/internal/_internal.dm @@ -1,5 +1,7 @@ /obj/item/ammo_box/magazine/internal desc = "Oh god, this shouldn't be here" + abstract_type = /obj/item/ammo_box/magazine/internal + spawn_blacklisted = TRUE obj_flags = CONDUCTS_ELECTRICITY item_flags = ABSTRACT diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 38f1b6d944b..c33d36dd589 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -9,6 +9,7 @@ icon_state = "revolver" inhand_icon_state = "gun" worn_icon_state = "gun" + abstract_type = /obj/item/gun obj_flags = CONDUCTS_ELECTRICITY appearance_flags = TILE_BOUND|PIXEL_SCALE|LONG_GLIDE|KEEP_TOGETHER slot_flags = ITEM_SLOT_BELT diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index c963f524c3b..1c639ab9026 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -1,9 +1,10 @@ ///Subtype for any kind of ballistic gun ///This has a shitload of vars on it, and I'm sorry for that, but it does make making new subtypes really easy /obj/item/gun/ballistic - desc = "Now comes in flavors like GUN. Uses 10mm ammo, for some reason." name = "projectile gun" + desc = "Now comes in flavors like GUN. Uses 10mm ammo, for some reason." icon_state = "debug" + abstract_type = /obj/item/gun/ballistic w_class = WEIGHT_CLASS_NORMAL pickup_sound = 'sound/items/handling/gun/gun_pick_up.ogg' drop_sound = 'sound/items/handling/gun/gun_drop.ogg' diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 426d8ef0a60..a404221fb1d 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -1,4 +1,5 @@ /obj/item/gun/ballistic/automatic + abstract_type = /obj/item/gun/ballistic/automatic w_class = WEIGHT_CLASS_NORMAL can_suppress = TRUE burst_size = 3 diff --git a/code/modules/projectiles/guns/ballistic/launchers.dm b/code/modules/projectiles/guns/ballistic/launchers.dm index a9e1cb184a7..2a3d22e0064 100644 --- a/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/code/modules/projectiles/guns/ballistic/launchers.dm @@ -22,6 +22,7 @@ /obj/item/gun/ballistic/revolver/grenadelauncher/underbarrel name = "underbarrel grenade launcher" + spawn_blacklisted = TRUE pin = null /obj/item/gun/ballistic/revolver/grenadelauncher/underbarrel/Initialize(mapload) diff --git a/code/modules/projectiles/guns/energy/laser_gatling.dm b/code/modules/projectiles/guns/energy/laser_gatling.dm index 32c17488158..670f0b0c370 100644 --- a/code/modules/projectiles/guns/energy/laser_gatling.dm +++ b/code/modules/projectiles/guns/energy/laser_gatling.dm @@ -99,6 +99,7 @@ slowdown = 1 slot_flags = null w_class = WEIGHT_CLASS_HUGE + spawn_blacklisted = TRUE custom_materials = null weapon_weight = WEAPON_HEAVY ammo_type = list(/obj/item/ammo_casing/energy/laser/minigun) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 3bd0429db4b..b613e641a35 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -8,6 +8,7 @@ name = "projectile" icon = 'icons/obj/weapons/guns/projectiles.dmi' icon_state = "bullet" + abstract_type = /obj/projectile density = FALSE anchored = TRUE mouse_opacity = MOUSE_OPACITY_TRANSPARENT diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index d69410bd0ce..30339d1f0dc 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -3,6 +3,7 @@ desc = "..." icon = 'icons/obj/medical/chemical.dmi' icon_state = null + abstract_type = /obj/item/reagent_containers w_class = WEIGHT_CLASS_TINY sound_vary = TRUE /// The maximum amount of reagents per transfer that will be moved out of this reagent container. diff --git a/code/modules/reagents/reagent_containers/applicator.dm b/code/modules/reagents/reagent_containers/applicator.dm index 25e6cec8cca..d832f15d304 100644 --- a/code/modules/reagents/reagent_containers/applicator.dm +++ b/code/modules/reagents/reagent_containers/applicator.dm @@ -2,6 +2,7 @@ /obj/item/reagent_containers/applicator name = "generic reagent applicator" desc = "Report this please." + abstract_type = /obj/item/reagent_containers/applicator has_variable_transfer_amount = FALSE grind_results = list() /// Action string displayed in vis_message diff --git a/code/modules/reagents/reagent_containers/cups/_cup.dm b/code/modules/reagents/reagent_containers/cups/_cup.dm index 6da1a4c0d8e..b66794e41d1 100644 --- a/code/modules/reagents/reagent_containers/cups/_cup.dm +++ b/code/modules/reagents/reagent_containers/cups/_cup.dm @@ -1,5 +1,6 @@ /obj/item/reagent_containers/cup name = "open container" + abstract_type = /obj/item/reagent_containers/cup amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50) volume = 50 diff --git a/code/modules/reagents/reagent_containers/cups/drinks.dm b/code/modules/reagents/reagent_containers/cups/drinks.dm index ea4c4a4c891..b25e99e7000 100644 --- a/code/modules/reagents/reagent_containers/cups/drinks.dm +++ b/code/modules/reagents/reagent_containers/cups/drinks.dm @@ -6,6 +6,7 @@ desc = "yummy" icon = 'icons/obj/drinks/drinks.dmi' icon_state = "glass_empty" + abstract_type = /obj/item/reagent_containers/cup/glass possible_transfer_amounts = list(5,10,15,20,25,30,50) resistance_flags = NONE diff --git a/code/modules/reagents/reagent_containers/cups/soda.dm b/code/modules/reagents/reagent_containers/cups/soda.dm index c9380d2b9b9..34c9d0d9233 100644 --- a/code/modules/reagents/reagent_containers/cups/soda.dm +++ b/code/modules/reagents/reagent_containers/cups/soda.dm @@ -11,6 +11,7 @@ icon = 'icons/obj/drinks/soda.dmi' icon_state = "cola" icon_state_preview = "cola" + abstract_type = /obj/item/reagent_containers/cup/soda_cans reagent_flags = NONE spillable = FALSE custom_price = PAYCHECK_CREW * 0.9 diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 7d35f43b103..52f4f92b54b 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -6,6 +6,7 @@ desc = "..." icon = 'icons/obj/medical/chemical_tanks.dmi' icon_state = "water" + abstract_type = /obj/structure/reagent_dispensers density = TRUE anchored = FALSE pressure_resistance = 2*ONE_ATMOSPHERE diff --git a/code/modules/research/stock_parts.dm b/code/modules/research/stock_parts.dm index e05a1d58d4d..5a2a2a47630 100644 --- a/code/modules/research/stock_parts.dm +++ b/code/modules/research/stock_parts.dm @@ -6,13 +6,13 @@ If you create T5+ please take a pass at mech_fabricator.dm. The parts being good name = "stock part" desc = "What?" icon = 'icons/obj/devices/stock_parts.dmi' + ///The generic category type that the stock part belongs to. Generic objects that should not be instantiated should have the same type and abstract_type + abstract_type = /obj/item/stock_parts w_class = WEIGHT_CLASS_SMALL var/rating = 1 ///Used when a base part has a different name to higher tiers of part. For example, machine frames want any servo and not just a micro-servo. var/base_name var/energy_rating = 1 - ///The generic category type that the stock part belongs to. Generic objects that should not be instantiated should have the same type and abstract_type - var/abstract_type = /obj/item/stock_parts /obj/item/stock_parts/Initialize(mapload) . = ..() diff --git a/code/modules/spells/spell_types/right_and_wrong.dm b/code/modules/spells/spell_types/right_and_wrong.dm index 05a7da0fada..b85d9ba43d8 100644 --- a/code/modules/spells/spell_types/right_and_wrong.dm +++ b/code/modules/spells/spell_types/right_and_wrong.dm @@ -11,6 +11,8 @@ GLOBAL_DATUM(mass_teaching, /datum/summon_things_controller/spellbook_entry) // 1 in 50 chance of getting something really special. #define SPECIALIST_MAGIC_PROB 2 +GLOBAL_LIST_INIT(summoned_all_guns, get_sane_item_types(/obj/item/gun)) + GLOBAL_LIST_INIT(summoned_guns, list( /obj/item/gun/energy/disabler, /obj/item/gun/energy/e_gun, diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index 1dc9ee3069b..3b7052caeb2 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -1,6 +1,7 @@ /obj/item/bodypart name = "limb" desc = "Why is it detached..." + abstract_type = /obj/item/bodypart force = 3 throwforce = 3 w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm index 6cff487a837..d6086208672 100644 --- a/code/modules/surgery/bodyparts/parts.dm +++ b/code/modules/surgery/bodyparts/parts.dm @@ -135,6 +135,7 @@ /obj/item/bodypart/arm name = "arm" desc = "Hey buddy give me a HAND and report this to the github because you shouldn't be seeing this." + abstract_type = /obj/item/bodypart/arm attack_verb_continuous = list("slaps", "punches") attack_verb_simple = list("slap", "punch") max_damage = LIMB_MAX_HP_DEFAULT @@ -400,6 +401,7 @@ /obj/item/bodypart/leg name = "leg" desc = "This item shouldn't exist. Talk about breaking a leg. Badum-Tss!" + abstract_type = /obj/item/bodypart/leg attack_verb_continuous = list("kicks", "stomps") attack_verb_simple = list("kick", "stomp") max_damage = LIMB_MAX_HP_DEFAULT diff --git a/code/modules/surgery/organs/_organ.dm b/code/modules/surgery/organs/_organ.dm index 66164ada11e..69f0809dc89 100644 --- a/code/modules/surgery/organs/_organ.dm +++ b/code/modules/surgery/organs/_organ.dm @@ -1,6 +1,7 @@ /obj/item/organ name = "organ" icon = 'icons/obj/medical/organs/organs.dmi' + abstract_type = /obj/item/organ w_class = WEIGHT_CLASS_SMALL throwforce = 0 /// The mob that owns this organ. diff --git a/code/modules/surgery/organs/internal/cyberimp/augments_arms.dm b/code/modules/surgery/organs/internal/cyberimp/augments_arms.dm index 681d68e6282..6181ce1105b 100644 --- a/code/modules/surgery/organs/internal/cyberimp/augments_arms.dm +++ b/code/modules/surgery/organs/internal/cyberimp/augments_arms.dm @@ -1,6 +1,7 @@ /obj/item/organ/cyberimp/arm name = "arm-mounted implant" desc = "An implant that goes in your arm to improve it." + abstract_type = /obj/item/organ/cyberimp/arm zone = BODY_ZONE_R_ARM slot = ORGAN_SLOT_RIGHT_ARM_AUG w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/surgery/organs/internal/cyberimp/augments_chest.dm b/code/modules/surgery/organs/internal/cyberimp/augments_chest.dm index c5dedb71fab..767e759e794 100644 --- a/code/modules/surgery/organs/internal/cyberimp/augments_chest.dm +++ b/code/modules/surgery/organs/internal/cyberimp/augments_chest.dm @@ -1,6 +1,7 @@ /obj/item/organ/cyberimp/chest name = "cybernetic torso implant" desc = "Implants for the organs in your torso." + abstract_type = /obj/item/organ/cyberimp/chest zone = BODY_ZONE_CHEST /obj/item/organ/cyberimp/chest/nutriment diff --git a/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm b/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm index e548b25e835..18a77821228 100644 --- a/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm +++ b/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm @@ -2,7 +2,7 @@ /obj/item/organ/cyberimp name = "cybernetic implant" desc = "A state-of-the-art implant that improves a baseline's functionality." - + abstract_type = /obj/item/organ/cyberimp organ_flags = ORGAN_ROBOTIC failing_desc = "seems to be broken." /// icon of the bodypart overlay we're going to be applying to our owner diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index 49ee85862be..be08e4f82ae 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -31,6 +31,9 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests()) return focused_tests.len > 0 ? focused_tests : null /datum/unit_test + /// Do not instantiate if type matches this + abstract_type = /datum/unit_test + //Bit of metadata for the future maybe var/list/procs_tested @@ -47,9 +50,6 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests()) var/list/allocated var/list/fail_reasons - /// Do not instantiate if type matches this - var/abstract_type = /datum/unit_test - /// List of atoms that we don't want to ever initialize in an agnostic context, like for Create and Destroy. Stored on the base datum for usability in other relevant tests that need this data. var/static/list/uncreatables = null diff --git a/code/modules/vehicles/_vehicle.dm b/code/modules/vehicles/_vehicle.dm index 5f80cf57e3d..e039d97d077 100644 --- a/code/modules/vehicles/_vehicle.dm +++ b/code/modules/vehicles/_vehicle.dm @@ -3,6 +3,7 @@ desc = "Yell at coderbus." icon = 'icons/mob/rideables/vehicles.dmi' icon_state = "error" + abstract_type = /obj/vehicle max_integrity = 300 armor_type = /datum/armor/obj_vehicle layer = VEHICLE_LAYER diff --git a/code/modules/vehicles/mecha/equipment/mecha_equipment.dm b/code/modules/vehicles/mecha/equipment/mecha_equipment.dm index e4532f23f06..5d28d2be6f6 100644 --- a/code/modules/vehicles/mecha/equipment/mecha_equipment.dm +++ b/code/modules/vehicles/mecha/equipment/mecha_equipment.dm @@ -5,6 +5,7 @@ /obj/item/mecha_parts/mecha_equipment name = "mecha equipment" icon = 'icons/obj/devices/mecha_equipment.dmi' + abstract_type = /obj/item/mecha_parts/mecha_equipment icon_state = "mecha_equip" force = 5 max_integrity = 300 diff --git a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm index d4dbc1257f6..0cfc0712b59 100644 --- a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm +++ b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm @@ -1,5 +1,6 @@ /obj/item/mecha_parts/mecha_equipment/weapon name = "mecha weapon" + abstract_type = /obj/item/mecha_parts/mecha_equipment/weapon range = MECHA_RANGED equipment_slot = MECHA_WEAPON destroy_sound = 'sound/vehicles/mecha/weapdestr.ogg' diff --git a/code/modules/vehicles/mecha/mecha_parts.dm b/code/modules/vehicles/mecha/mecha_parts.dm index 57a3f6c0413..a8719eb1d4d 100644 --- a/code/modules/vehicles/mecha/mecha_parts.dm +++ b/code/modules/vehicles/mecha/mecha_parts.dm @@ -6,6 +6,7 @@ name = "mecha part" icon = 'icons/mob/rideables/mech_construct.dmi' icon_state = "blank" + abstract_type = /obj/item/mecha_parts w_class = WEIGHT_CLASS_GIGANTIC obj_flags = CONDUCTS_ELECTRICITY diff --git a/code/modules/vending/subtype.dm b/code/modules/vending/subtype.dm index e9633c56cb9..d189435e18c 100644 --- a/code/modules/vending/subtype.dm +++ b/code/modules/vending/subtype.dm @@ -22,7 +22,7 @@ ///Adds the subtype to the product list /obj/machinery/vending/subtype_vendor/RefreshParts() products.Cut() - for(var/type in typesof(type_to_vend)) + for(var/type in get_sane_item_types(type_to_vend)) LAZYADDASSOC(products, type, 50) //no refill canister so we fill the records with their max amounts directly diff --git a/code/modules/vending/vendor/_vending.dm b/code/modules/vending/vendor/_vending.dm index eec128f0f32..1a97b034fa8 100644 --- a/code/modules/vending/vendor/_vending.dm +++ b/code/modules/vending/vendor/_vending.dm @@ -38,6 +38,7 @@ desc = "A generic vending machine." icon = 'icons/obj/machines/vending.dmi' icon_state = "generic" + abstract_type = /obj/machinery/vending layer = BELOW_OBJ_LAYER density = TRUE verb_say = "beeps" diff --git a/code/modules/wiremod/shell/shell_items.dm b/code/modules/wiremod/shell/shell_items.dm index 0db08ab7bb8..eac5715f22b 100644 --- a/code/modules/wiremod/shell/shell_items.dm +++ b/code/modules/wiremod/shell/shell_items.dm @@ -7,6 +7,7 @@ name = "assembly" desc = "A shell assembly that can be completed by screwdrivering it." icon = 'icons/obj/science/circuits.dmi' + abstract_type = /obj/item/shell var/shell_to_spawn var/screw_delay = 3 SECONDS diff --git a/tgstation.dme b/tgstation.dme index e76b233b2c9..cb1998e6a57 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -472,6 +472,7 @@ #include "code\__HELPERS\qdel.dm" #include "code\__HELPERS\radiation.dm" #include "code\__HELPERS\radio.dm" +#include "code\__HELPERS\random_items.dm" #include "code\__HELPERS\randoms.dm" #include "code\__HELPERS\reagents.dm" #include "code\__HELPERS\ref.dm" @@ -2448,6 +2449,7 @@ #include "code\game\objects\effects\spawners\random\techstorage.dm" #include "code\game\objects\effects\spawners\random\trash.dm" #include "code\game\objects\effects\spawners\random\vending.dm" +#include "code\game\objects\effects\spawners\random\weapon.dm" #include "code\game\objects\effects\temporary_visuals\cult.dm" #include "code\game\objects\effects\temporary_visuals\effect_trail.dm" #include "code\game\objects\effects\temporary_visuals\miscellaneous.dm"