mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
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:
@@ -45,7 +45,7 @@
|
||||
desc = "It's a tiny chip! This one doesn't seem to do much, however."
|
||||
icon = 'icons/obj/assemblies/electronic_components.dmi'
|
||||
icon_state = "template"
|
||||
w_class = ITEMSIZE_TINY
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/obj/item/device/electronic_assembly/assembly // Reference to the assembly holding this circuit, if any.
|
||||
var/extended_desc
|
||||
var/list/inputs = list()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
/obj/item/integrated_circuit/passive/power/relay
|
||||
name = "tesla power relay"
|
||||
desc = "A seemingly enigmatic device which connects to nearby APCs wirelessly and draws power from them."
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
extended_desc = "The siphon generates 250W of energy, so long as an APC is in the same room, with a cell that has energy. It will always drain \
|
||||
from the 'equipment' power channel."
|
||||
icon_state = "power_relay"
|
||||
@@ -45,7 +45,7 @@
|
||||
/obj/item/integrated_circuit/passive/power/relay/large
|
||||
name = "large tesla power relay"
|
||||
desc = "A seemingly enigmatic device which connects to nearby APCs wirelessly and draws power from them, now in industiral size!"
|
||||
w_class = ITEMSIZE_LARGE
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
extended_desc = "The siphon generates 2 kW of energy, so long as an APC is in the same room, with a cell that has energy. It will always drain \
|
||||
from the 'equipment' power channel."
|
||||
icon_state = "power_relay"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/assemblies/electronic_components.dmi'
|
||||
icon_state = "template"
|
||||
size = -1
|
||||
w_class = ITEMSIZE_TINY
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
removable = FALSE // Determines if a circuit is removable from the assembly.
|
||||
|
||||
/obj/item/integrated_circuit/built_in/device_input
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
/obj/item/integrated_circuit/transfer/multiplexer/large
|
||||
name = "eight multiplexer"
|
||||
number_of_inputs = 8
|
||||
w_class = ITEMSIZE_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon_state = "mux8"
|
||||
|
||||
/obj/item/integrated_circuit/transfer/multiplexer/huge
|
||||
name = "sixteen multiplexer"
|
||||
icon_state = "mux16"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
number_of_inputs = 16
|
||||
|
||||
/obj/item/integrated_circuit/transfer/demultiplexer
|
||||
@@ -103,13 +103,13 @@
|
||||
/obj/item/integrated_circuit/transfer/demultiplexer/large
|
||||
name = "eight demultiplexer"
|
||||
icon_state = "dmux8"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
number_of_outputs = 8
|
||||
|
||||
/obj/item/integrated_circuit/transfer/demultiplexer/huge
|
||||
name = "sixteen demultiplexer"
|
||||
icon_state = "dmux16"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
number_of_outputs = 16
|
||||
|
||||
/obj/item/integrated_circuit/transfer/wireless
|
||||
@@ -120,7 +120,7 @@
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
icon_state = "bluespace"
|
||||
power_draw_per_use = 100 // fancy subspace comms aren't cheap power-wise
|
||||
w_class = ITEMSIZE_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
inputs = list(
|
||||
"data" = IC_PINTYPE_ANY,
|
||||
"channel" = IC_PINTYPE_STRING
|
||||
|
||||
@@ -546,7 +546,7 @@
|
||||
desc = "This monitors the charge level of an internal battery."
|
||||
icon_state = "internalbm"
|
||||
extended_desc = "This circuit will give you values of charge, max charge and percentage of the internal battery on demand."
|
||||
w_class = ITEMSIZE_TINY
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
complexity = 1
|
||||
inputs = list()
|
||||
outputs = list(
|
||||
@@ -579,7 +579,7 @@
|
||||
desc = "This can help watch the battery level of any device in range."
|
||||
icon_state = "externalbm"
|
||||
extended_desc = "This circuit will give you values of charge, max charge and percentage of any device or battery in view"
|
||||
w_class = ITEMSIZE_TINY
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
complexity = 2
|
||||
inputs = list("target" = IC_PINTYPE_REF)
|
||||
outputs = list(
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
activators = list("eject contents" = IC_PINTYPE_PULSE_IN)
|
||||
outputs = list("has item" = IC_PINTYPE_BOOLEAN)
|
||||
power_draw_per_use = 1
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
size = 5
|
||||
complexity = 1
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
The 'fire' activator will cause the mechanism to attempt to fire the weapon at the coordinates, if possible. Note that the \
|
||||
normal limitations to firearms, such as ammunition requirements and firing delays, still hold true if fired by the mechanism."
|
||||
complexity = 20
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
size = 3
|
||||
inputs = list(
|
||||
"target X rel" = IC_PINTYPE_NUMBER,
|
||||
@@ -88,7 +88,7 @@
|
||||
extended_desc = "The circuit accepts a 'dir' number as a direction to move towards.<br>\
|
||||
Pulsing the 'step towards dir' activator pin will cause the machine to move a meter in that direction, assuming it is not \
|
||||
being held, or anchored in some way. It should be noted that the ability to move is dependant on the type of assembly that this circuit inhabits."
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
complexity = 20
|
||||
// size = 5
|
||||
inputs = list("direction" = IC_PINTYPE_DIR)
|
||||
@@ -192,7 +192,7 @@
|
||||
desc = "A circuit with its own inventory for small/medium items, used to grab and store things."
|
||||
icon_state = "grabber"
|
||||
extended_desc = "The circuit accepts a reference to thing to be grabbed. It can store up to 10 things. Modes: 1 for grab. 0 for eject the first thing. -1 for eject all."
|
||||
w_class = ITEMSIZE_TINY
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
size = 3
|
||||
|
||||
complexity = 10
|
||||
@@ -211,7 +211,7 @@
|
||||
if(contents.len < 10)
|
||||
if(istype(AM,/obj/item))
|
||||
var/obj/item/A = AM
|
||||
if(A.w_class < ITEMSIZE_NORMAL)
|
||||
if(A.w_class < WEIGHT_CLASS_NORMAL)
|
||||
AM.forceMove(src)
|
||||
if(mode == 0)
|
||||
if(contents.len)
|
||||
@@ -237,7 +237,7 @@
|
||||
The 'fire' activator will cause the mechanism to attempt to throw thing at the coordinates, if possible. Note that the \
|
||||
projectile need to be inside the machine, or to be on an adjacent tile, and to be up to medium size."
|
||||
complexity = 15
|
||||
w_class = ITEMSIZE_TINY
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
size = 2
|
||||
inputs = list(
|
||||
"target X rel" = IC_PINTYPE_NUMBER,
|
||||
@@ -262,7 +262,7 @@
|
||||
var/obj/item/A = projectile.data.resolve()
|
||||
if(A.anchored)
|
||||
return
|
||||
if(A.w_class>ITEMSIZE_NORMAL)
|
||||
if(A.w_class>WEIGHT_CLASS_NORMAL)
|
||||
return
|
||||
var/turf/T = get_turf(src.assembly)
|
||||
var/turf/TP = get_turf(A)
|
||||
@@ -314,7 +314,7 @@
|
||||
icon_state = "shocker"
|
||||
extended_desc = "The circuit accepts a reference to creature to shock. It can shock a target on adjacent tiles. \
|
||||
Severity determines the power draw and usage of each shock. It accepts values between 0 and 20."
|
||||
w_class = ITEMSIZE_TINY
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
complexity = 24
|
||||
inputs = list("target" = IC_PINTYPE_REF,"severity" = IC_PINTYPE_NUMBER)
|
||||
outputs = list()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
name = "large memory stick"
|
||||
desc = "This stick of memory can hold up up to sixteen pieces of data."
|
||||
icon_state = "memory16"
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 4)
|
||||
power_draw_per_use = 8
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
desc = "This small camera allows a remote viewer to see what it sees."
|
||||
extended_desc = "The camera is linked to the Research camera network."
|
||||
icon_state = "video_camera"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
complexity = 10
|
||||
inputs = list(
|
||||
"camera name" = IC_PINTYPE_STRING,
|
||||
@@ -370,7 +370,7 @@
|
||||
activators = list("print page" = IC_PINTYPE_PULSE_IN)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 20
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
size = 5
|
||||
var/stuff_to_print = null
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
a reference to a machine to send electricity to. This can be a battery, or anything containing a battery. The machine can exist \
|
||||
inside the assembly, or adjacent to it. The power is sourced from the assembly's power cell. If the target is outside of the assembly, \
|
||||
some power is lost due to ineffiency."
|
||||
w_class = ITEMSIZE_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
complexity = 16
|
||||
inputs = list("target" = IC_PINTYPE_REF)
|
||||
outputs = list(
|
||||
@@ -30,7 +30,7 @@
|
||||
a reference to a machine to send electricity to. This can be a battery, or anything containing a battery. The machine can exist \
|
||||
inside the assembly, or adjacent to it. The power is sourced from the assembly's power cell. If the target is outside of the assembly, \
|
||||
some power is lost due to ineffiency."
|
||||
w_class = ITEMSIZE_LARGE
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
complexity = 32
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 4, TECH_POWER = 6, TECH_MAGNET = 5)
|
||||
power_draw_per_use = 2000
|
||||
|
||||
Reference in New Issue
Block a user