Hitby refactor (#19624)

Refactored hitby to be in line with TG's version.
Refactored item weight defines to a more clear naming scheme, also in
line with TG's version.
Refactored how the movement bumps are handled, ported signals to handle
them, in preparation for the movement update.
Fixed disposal hit bouncing the hitting atom on the wall.
Items do not push other items anymore if they are tiny.
This commit is contained in:
Fluffy
2024-07-28 20:52:08 +00:00
committed by GitHub
parent b84acb8e03
commit a3a4d46fa7
510 changed files with 2282 additions and 1584 deletions
@@ -812,7 +812,7 @@
name = "shapesand"
desc = "A strangely animate clump of sand which can shift its color and consistency."
icon = 'icons/obj/mining.dmi'
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
icon_state = "ore_glass"
/obj/item/shapesand/attack() //can't be used to actually bludgeon things
+1 -1
View File
@@ -5,7 +5,7 @@
icon_state = "cartridge"
contained_sprite = TRUE
filling_states = "20;40;60;80;100"
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
volume = CARTRIDGE_VOLUME_LARGE
amount_per_transfer_from_this = 50
@@ -5,7 +5,7 @@
icon = 'icons/obj/drinks.dmi'
icon_state = "coffeejar"
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
volume = CARTRIDGE_VOLUME_LARGE
amount_per_transfer_from_this = 20
+1 -1
View File
@@ -3,7 +3,7 @@
desc = "..."
icon = 'icons/obj/chemical.dmi'
icon_state = null
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
recyclable = TRUE
var/amount_per_transfer_from_this = 5
var/possible_transfer_amounts = list(5,10,15,25,30)
@@ -19,7 +19,7 @@
icon = 'icons/obj/bloodpack.dmi'
icon_state = "bloodpack"
filling_states = "-10;10;25;50;75;80;100"
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
volume = 200
amount_per_transfer_from_this = 0.2
@@ -39,7 +39,7 @@
if(blood_type != null)
name = "\improper IV bag - [blood_type] blood"
reagents.add_reagent(/singleton/reagent/blood, volume, list("donor"=null,"blood_DNA"=null,"blood_type"=blood_type,"trace_chem"=null,"dose_chem"=null))
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
update_icon()
/obj/item/reagent_containers/blood/Destroy()
@@ -50,9 +50,9 @@
/obj/item/reagent_containers/blood/on_reagent_change()
update_icon()
if(reagents.total_volume > volume / 2)
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
else
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
/obj/item/reagent_containers/blood/update_icon()
ClearOverlays()
@@ -10,7 +10,7 @@
build_from_parts = TRUE
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(1,2,3,4,5)
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
slot_flags = SLOT_EARS
volume = 5
drop_sound = 'sound/items/drop/glass_small.ogg'
@@ -298,7 +298,7 @@
/obj/item/reagent_containers/food/condiment/small/packet
icon_state = "packet_small"
fixed_state = TRUE
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
possible_transfer_amounts = list(1,5,10)
amount_per_transfer_from_this = 1
volume = 10
@@ -242,7 +242,7 @@
var/static/icon/broken_outline = icon('icons/obj/item/reagent_containers/food/drinks/drink_effects.dmi', "broken")
///The mask image for mimicking a broken-off neck of the bottle
var/static/icon/flipped_broken_outline = icon('icons/obj/item/reagent_containers/food/drinks/drink_effects.dmi', "broken-flipped")
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
#define DRINK_FLUFF_GETMORE "This drink is made by Getmore Corporation, a subsidiary of NanoTrasen. It mostly specializes in fast food and consumer food products, \
but also makes average quality alcohol. Many can find Getmore products in grocery stores, vending machines, \
@@ -7,7 +7,7 @@
filling_states = "-10;10;25;50;75;80;100"
matter = list(MATERIAL_GLASS = 5000)
center_of_mass = list("x"=15, "y"=8)
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,60,120)
volume = 120
@@ -3,7 +3,7 @@
desc = "Everyone gets a trophy."
icon = 'icons/obj/item/reagent_containers/food/drinks/bottle.dmi'
icon_state = "pewter_cup"
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
force = 1
throwforce = 1
amount_per_transfer_from_this = 5
@@ -18,7 +18,7 @@
desc = "You're winner!"
icon_state = "golden_cup"
item_state = "golden_cup"
w_class = ITEMSIZE_LARGE
w_class = WEIGHT_CLASS_BULKY
force = 14
throwforce = 10
amount_per_transfer_from_this = 20
@@ -29,7 +29,7 @@
name = "silver cup"
desc = "Best loser!"
icon_state = "silver_cup"
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
force = 10
throwforce = 8
amount_per_transfer_from_this = 15
@@ -40,7 +40,7 @@
name = "bronze cup"
desc = "At least you ranked!"
icon_state = "bronze_cup"
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
force = 11
throwforce = 4
amount_per_transfer_from_this = 10
@@ -4,7 +4,7 @@
desc = "Yummy!"
icon_state = null
center_of_mass = list("x"=16, "y"=16)
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
is_liquid = FALSE
var/slice_path
var/slices_num
@@ -80,7 +80,7 @@
desc = "A tiny, delicious piece of milk chocolate with some sort of filling inside of it."
icon = 'icons/obj/item/reagent_containers/food/confections.dmi'
icon_state = "praline1"
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
filling_color = "#4d280f"
reagents_to_add = list(/singleton/reagent/nutriment = 1)
reagent_data = list(/singleton/reagent/nutriment = list("milk chocolate and caramel" = 1))
@@ -22,7 +22,7 @@
slices_num = 6
throw_range = 5
throwforce = 10
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
filling_color = "#BD8939"
desc_extended = "The adhomian hard bread is type of tajaran bread, made from Blizzard Ears's flour, water and spice, usually basked in the shape of a loaf. \
It is known for its hard crust, bland taste and for being long lasting. The hard bread was usually prepared for long journeys, hard winters or military campaigns, \
@@ -67,7 +67,7 @@
/obj/item/mollusc
name = "mollusc"
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
desc = "A small slimy mollusc. Fresh!"
desc_info = "You will need a sharp or edged implement to pry it open. You can also try opening it in your hand if you're strong enough."
icon = 'icons/obj/item/reagent_containers/food/meat.dmi'
@@ -4,7 +4,7 @@
// sliceable is just an organization type path, it doesn't have any additional code or variables tied to it.
/obj/item/reagent_containers/food/snacks/sliceable
w_class = ITEMSIZE_NORMAL //Whole pizzas and cakes shouldn't fit in a pocket, you can slice them if you want to do that.
w_class = WEIGHT_CLASS_NORMAL //Whole pizzas and cakes shouldn't fit in a pocket, you can slice them if you want to do that.
/obj/item/reagent_containers/food/snacks/sliceable/cheesewheel
name = "cheese wheel"
@@ -414,7 +414,7 @@
icon_type = "gum stick"
storage_type = "packaging"
slot_flags = SLOT_EARS
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
starts_with = list(/obj/item/clothing/mask/chewable/candy/gum = 5)
can_hold = list(/obj/item/clothing/mask/chewable/candy/gum, /obj/item/trash/spitgum)
max_storage_space = 5
@@ -453,7 +453,7 @@
icon_type = "mint"
storage_type = "packaging"
slot_flags = SLOT_EARS
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
starts_with = list(/obj/item/reagent_containers/food/snacks/mint/admints = 6)
can_hold = list(/obj/item/reagent_containers/food/snacks/mint/admints)
max_storage_space = 6
@@ -498,7 +498,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 4, /singleton/reagent/sugar = 1)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 2, "nougat" = 1, "caramel" = 1))
bitesize = 2
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/cb02
name = "hundred thousand credit bar"
@@ -510,7 +510,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 4, /singleton/reagent/sugar = 1)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 2, "caramel" = 1, "puffed rice" = 1))
bitesize = 2
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/cb03
name = "spacewind bar"
@@ -521,7 +521,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 4, /singleton/reagent/sugar = 1)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 4))
bitesize = 2
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/cb04
name = "crunchy crisp"
@@ -532,7 +532,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 4, /singleton/reagent/sugar = 1)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 3, "almonds" = 1))
bitesize = 2
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/cb05
name = "hearsay bar"
@@ -544,7 +544,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 3, /singleton/reagent/sugar = 3)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 2, "vomit" = 1))
bitesize = 3
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/cb06
name = "latte crunch"
@@ -555,7 +555,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 4, /singleton/reagent/sugar = 1)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 2, "coffee" = 1, "vanilla wafer" = 1))
bitesize = 3
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/cb07
name = "martian bar"
@@ -566,7 +566,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 4, /singleton/reagent/sugar = 1)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 2, "caramel" = 1, "nougat" = 1))
bitesize = 3
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/cb08
name = "crisp bar"
@@ -577,7 +577,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 4, /singleton/reagent/sugar = 1)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 2, "puffed rice" = 1))
bitesize = 3
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/cb09
name = "oh daddy bar"
@@ -589,7 +589,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 6, /singleton/reagent/sugar = 1)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 3, "caramel" = 1, "peanuts" = 2))
bitesize = 3
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/cb10
name = "laughter bar"
@@ -601,7 +601,7 @@
reagents_to_add = list(/singleton/reagent/nutriment = 5, /singleton/reagent/sugar = 1)
reagent_data = list(/singleton/reagent/nutriment = list("chocolate" = 2, "caramel" = 1, "peanuts" = 1, "nougat" = 1))
bitesize = 3
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
/obj/item/reagent_containers/food/snacks/meatcube
name = "cubed meat"
@@ -12,7 +12,7 @@
possible_transfer_amounts = list(5,10,15,25,30,60)
volume = 60
accuracy = 0.1
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
atom_flags = ATOM_FLAG_OPEN_CONTAINER
fragile = 2
unacidable = 1 //glass doesn't dissolve in acid
@@ -248,7 +248,7 @@
center_of_mass = list("x" = 16,"y" = 10)
accuracy = 1
matter = list(MATERIAL_PLASTIC = 200)
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
amount_per_transfer_from_this = 120
possible_transfer_amounts = list(5,10,15,25,30,50,60,100,120,250,300)
volume = 300
@@ -11,7 +11,7 @@
unacidable = 1
amount_per_transfer_from_this = 5
volume = 5
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
possible_transfer_amounts = null
atom_flags = ATOM_FLAG_OPEN_CONTAINER
slot_flags = SLOT_BELT
@@ -9,7 +9,7 @@
icon_state = "pi_cart_small"
contained_sprite = TRUE
volume = 15
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
unacidable = 1
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10,15)
@@ -72,7 +72,7 @@
desc = "A large inhaler cartridge. It contains enough aerosol for 30 units of reagents. The container must be activated for aerosol to mix with reagents."
icon_state = "pi_cart_medium"
volume = 30
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,30)
origin_tech = list(TECH_BIO = 4, TECH_MATERIAL = 4)
@@ -82,7 +82,7 @@
desc = "An experimental bluespace inhaler cartridge. It has enough aerosol for 60 units of reagents. The container must be activated to mix aerosol with reagents inside."
icon_state = "pi_cart_large"
volume = 60
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,30,60)
origin_tech = list(TECH_BLUESPACE = 2, TECH_BIO = 6, TECH_MATERIAL = 6)
@@ -94,7 +94,7 @@
item_state = "pi"
icon_state = "pi"
contained_sprite = TRUE
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
var/obj/item/reagent_containers/stored_cartridge
var/transfer_amount = 5
@@ -216,7 +216,7 @@
name = "combat inhaler"
desc = "A large, bulky inhaler design that injects the entire contents of the loaded cartridge via an aerosol system in a single button press."
icon_state = "pi_combat"
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
transfer_amount = 60
origin_tech = list(TECH_BIO = 4, TECH_MATERIAL = 4, TECH_ENGINEERING = 4)
eject_when_empty = TRUE
@@ -5,7 +5,7 @@
icon_state = "ladle"
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10, 15, 30)
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
volume = 30
force = 14
atom_flags = ATOM_FLAG_OPEN_CONTAINER
@@ -12,7 +12,7 @@
icon_state = null
item_state = "pill"
possible_transfer_amounts = null
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
slot_flags = SLOT_EARS
volume = 60
drop_sound = 'sound/items/drop/food.ogg'
@@ -13,7 +13,7 @@
item_flags = ITEM_FLAG_NO_BLUDGEON
slot_flags = SLOT_BELT
throwforce = 3
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
throw_speed = 2
throw_range = 10
amount_per_transfer_from_this = 10
@@ -211,7 +211,7 @@
contained_sprite = TRUE
center_of_mass = list("x" = 16,"y" = 16)
throwforce = 3
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
possible_transfer_amounts = null
volume = 600
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINEERING = 3)
@@ -19,7 +19,7 @@
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(1, 2, 5, 10, 15)
volume = 15
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
slot_flags = SLOT_EARS
sharp = 1
noslice = 1
@@ -6,7 +6,7 @@
icon_state = "welderpack"
item_state = "welderpack"
contained_sprite = TRUE
w_class = ITEMSIZE_LARGE
w_class = WEIGHT_CLASS_BULKY
volume = 350
reagents_to_add = list(/singleton/reagent/fuel = 350)
amount_per_transfer_from_this = 30