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
@@ -1,7 +1,7 @@
/obj/item/device/electronic_assembly
name = "electronic assembly"
desc = "It's a case, for building small electronics with."
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
icon = 'icons/obj/assemblies/electronic_setups.dmi'
icon_state = "setup_small"
item_flags = ITEM_FLAG_NO_BLUDGEON
@@ -17,7 +17,7 @@
name = "electronic implant"
icon_state = "setup_implant"
desc = "It's a case, for building very tiny electronics with."
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
var/obj/item/implant/integrated_circuit/implant = null
@@ -7,7 +7,7 @@
name = "electronic clothing"
var/clothing_icon_state = "circuitry" // Needs to match the clothing's base icon_state.
desc = "It's a case, for building machines attached to clothing."
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
max_components = IC_COMPONENTS_BASE
max_complexity = IC_COMPLEXITY_BASE
var/obj/item/clothing/clothing = null
@@ -33,13 +33,13 @@
/obj/item/device/electronic_assembly/clothing/small
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
// Ditto.
/obj/item/device/electronic_assembly/clothing/large
max_components = IC_COMPONENTS_BASE * 2
max_complexity = IC_COMPLEXITY_BASE * 2
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
/obj/item/device/electronic_assembly/clothing/rename()
var/input_name = ..()
@@ -36,7 +36,7 @@
name = "electronic device"
icon_state = "setup_device"
desc = "It's a case, for building tiny-sized electronics with."
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
@@ -69,7 +69,7 @@
name = "electronic mechanism"
icon_state = "setup_medium"
desc = "It's a case, for building medium-sized electronics with."
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
max_components = IC_COMPONENTS_BASE * 2
max_complexity = IC_COMPLEXITY_BASE * 2
@@ -109,7 +109,7 @@
name = "electronic machine"
icon_state = "setup_large"
desc = "It's a case, for building large electronics with."
w_class = ITEMSIZE_LARGE
w_class = WEIGHT_CLASS_BULKY
max_components = IC_COMPONENTS_BASE * 4
max_complexity = IC_COMPLEXITY_BASE * 4
can_anchor = TRUE
@@ -148,7 +148,7 @@
name = "electronic drone"
icon_state = "setup_drone"
desc = "It's a case, for building mobile electronics with."
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
max_components = IC_COMPONENTS_BASE * 1.5
max_complexity = IC_COMPLEXITY_BASE * 1.5
can_anchor = FALSE
@@ -186,7 +186,7 @@
icon_state = "setup_wallmount_medium"
desc = "It's a case, for building medium-sized electronics with. It has a magnetized \
backing to allow it to stick to walls."
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
max_components = IC_COMPONENTS_BASE * 2
max_complexity = IC_COMPLEXITY_BASE * 2
can_anchor = TRUE
@@ -226,7 +226,7 @@
icon_state = "setup_wallmount_large"
desc = "It's a case, for building large electronics with. It has a magnetized backing \
to allow it to stick to walls."
w_class = ITEMSIZE_LARGE
w_class = WEIGHT_CLASS_BULKY
max_components = IC_COMPONENTS_BASE * 4
max_complexity = IC_COMPLEXITY_BASE * 4
@@ -235,7 +235,7 @@
icon_state = "setup_wallmount_small"
desc = "It's a case, for building small electronics with. It has a magnetized backing \
to allow it to stick to walls."
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
max_components = IC_COMPONENTS_BASE
max_complexity = IC_COMPLEXITY_BASE
@@ -244,7 +244,7 @@
icon_state = "setup_wallmount_tiny"
desc = "It's a case, for building tiny electronics with. It has a magnetized backing \
to allow it to stick to walls."
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
max_components = IC_COMPONENTS_BASE / 2
max_complexity = IC_COMPLEXITY_BASE / 2
@@ -69,7 +69,7 @@
name = "electronic device"
icon_state = "setup_device"
desc = "It's a tiny electronic device with specific use for attaching to other devices."
w_class = ITEMSIZE_TINY
w_class = WEIGHT_CLASS_TINY
max_components = IC_COMPONENTS_BASE * 3/4
max_complexity = IC_COMPLEXITY_BASE * 3/4
@@ -3,7 +3,7 @@
desc = "A portable(ish) machine made to print tiny modular circuitry out of metal."
icon = 'icons/obj/assemblies/electronic_tools.dmi'
icon_state = "circuit_printer"
w_class = ITEMSIZE_LARGE
w_class = WEIGHT_CLASS_BULKY
var/metal = 0
var/max_metal = 100
var/metal_per_sheet = 10 // One sheet equals this much metal.
@@ -134,7 +134,7 @@
icon = 'icons/obj/assemblies/electronic_tools.dmi'
icon_state = "upgrade_disk"
item_state = "card-id"
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 4)
/obj/item/disk/integrated_circuit/upgrade/advanced
@@ -12,7 +12,7 @@
icon_state = "wirer-wire"
item_state = "wirer"
obj_flags = OBJ_FLAG_CONDUCTABLE
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
var/datum/integrated_io/selected_io
var/mode = WIRE
@@ -114,7 +114,7 @@
icon_state = "debugger"
obj_flags = OBJ_FLAG_CONDUCTABLE
item_flags = ITEM_FLAG_NO_BLUDGEON
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
var/data_to_write = null
var/accepting_refs = 0
@@ -175,7 +175,7 @@
icon = 'icons/obj/assemblies/electronic_tools.dmi'
icon_state = "detailer"
item_flags = ITEM_FLAG_NO_BLUDGEON
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
var/detail_color = COLOR_ASSEMBLY_WHITE
var/static/list/color_list = list(
"black" = COLOR_ASSEMBLY_BLACK,
@@ -220,7 +220,7 @@
desc = "This kit is essential for any circuitry projects."
icon = 'icons/obj/assemblies/electronic_tools.dmi'
icon_state = "circuit_kit"
w_class = ITEMSIZE_NORMAL
w_class = WEIGHT_CLASS_NORMAL
display_contents_with_number = 0
can_hold = list(
/obj/item/integrated_circuit,
@@ -281,7 +281,7 @@
/obj/item/storage/bag/circuits/mini
name = "circuit box"
desc = "Used to partition categories of circuits, for a neater workspace."
w_class = ITEMSIZE_SMALL
w_class = WEIGHT_CLASS_SMALL
display_contents_with_number = TRUE
pickup_blacklist = list(
/obj/item/storage/bag/circuits