Skip to content

Commit 7ab523d

Browse files
authored
Circuits, Flatpacker, & Mail sorter cherrypicking (#741)
1 parent 828d997 commit 7ab523d

83 files changed

Lines changed: 2405 additions & 205 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

code/__DEFINES/construction/material.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#define MAXCOIL 30
1616

1717
//Category of materials
18-
/// Is the material from an ore? currently unused but exists atm for categorizations sake
19-
#define MAT_CATEGORY_ORE "ore capable"
18+
/// Can this material be stored in the ore silo
19+
#define MAT_CATEGORY_SILO "silo capable"
2020
/// Hard materials, such as iron or silver
2121
#define MAT_CATEGORY_RIGID "rigid material"
2222
/// Materials that can be used to craft items

code/__DEFINES/dcs/signals/signals_circuit.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
/// Sent when a circuit is removed from its shell
2323
#define COMSIG_CIRCUIT_SHELL_REMOVED "circuit_shell_removed"
2424

25+
/// Send to [/obj/item/circuit_component] when it is added to a circuit. (/obj/item/integrated_circuit)
26+
#define COMSIG_CIRCUIT_COMPONENT_ADDED "circuit_component_added"
27+
2528
/// Sent to [/obj/item/circuit_component] when it is removed from a circuit. (/obj/item/integrated_circuit)
2629
#define COMSIG_CIRCUIT_COMPONENT_REMOVED "circuit_component_removed"
2730

code/__DEFINES/dcs/signals/signals_object.dm

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,3 +515,51 @@
515515
#define COMSIG_ITEM_WEIGHT_CLASS_CHANGED "item_weight_class_changed"
516516
/// Sent from /obj/item/update_weight_class(), to it's loc. (obj/item/changed_item, old_w_class, new_w_class)
517517
#define COMSIG_ATOM_CONTENTS_WEIGHT_CLASS_CHANGED "atom_contents_weight_class_changed"
518+
519+
///Sent from /obj/item/skillchip/on_implant()
520+
#define COMSIG_SKILLCHIP_IMPLANTED "skillchip_implanted"
521+
522+
///Sent from /obj/item/skillchip/on_remove()
523+
#define COMSIG_SKILLCHIP_REMOVED "skillchip_removed"
524+
525+
/// from /obj/machinery/computer/camera_advanced/shuttle_docker/gatherNavComputerOverlays() : (list/images_out)
526+
#define COMSIG_SHUTTLE_NAV_COMPUTER_IMAGE_REQUESTED "shuttle_nav_computer_image_requested"
527+
528+
/// Sent from /obj/item/organ/wings/functional/proc/open_wings(): (mob/living/carbon/owner)
529+
#define COMSIG_WINGS_OPENED "wings_opened"
530+
/// Sent from /obj/item/organ/wings/functional/proc/close_wings(): (mob/living/carbon/owner)
531+
#define COMSIG_WINGS_CLOSED "wings_closed"
532+
533+
/// Sent from /obj/item/assembly/on_attach(): (atom/holder)
534+
#define COMSIG_ASSEMBLY_ATTACHED "assembly_attached"
535+
536+
/// Sent from /obj/item/assembly/on_detach(): (atom/holder)
537+
#define COMSIG_ASSEMBLY_DETACHED "assembly_detached"
538+
539+
/*
540+
* The following four signals are separate from the above two because buttons and pressure plates don't set the holder of the inserted assembly.
541+
* This causes subtle behavioral differences that future handlers for these signals may need to account for,
542+
* even if none of the currently implemented handlers do.
543+
*/
544+
545+
/// Sent when an assembly is added to a button : (obj/machinery/button/button, mob/user)
546+
#define COMSIG_ASSEMBLY_ADDED_TO_BUTTON "assembly_added_to_button"
547+
548+
/// Sent when an assembly is removed from a button : (obj/machinery/button/button, mob/user)
549+
#define COMSIG_ASSEMBLY_REMOVED_FROM_BUTTON "assembly_removed_from_button"
550+
551+
/// Sent when an assembly is added to a pressure plate : (obj/item/pressureplate/pressure_plate, mob/user)
552+
#define COMSIG_ASSEMBLY_ADDED_TO_PRESSURE_PLATE "assembly_added_to_pressure_plate"
553+
554+
/// Sent when an assembly is removed from a pressure plate : (obj/item/pressureplate/pressure_plate, mob/user)
555+
#define COMSIG_ASSEMBLY_REMOVED_FROM_PRESSURE_PLATE "assembly_removed_from_pressure_playe"
556+
557+
/// Sent from /datum/powernet/add_cable()
558+
#define COMSIG_CABLE_ADDED_TO_POWERNET "cable_added_to_powernet"
559+
560+
/// Sent from /datum/powernet/remove_cable()
561+
#define COMSIG_CABLE_REMOVED_FROM_POWERNET "cable_removed_from_powernet"
562+
563+
/// Sent from /datum/wires/attach_assembly() : (atom/holder)
564+
#define COMSIG_ASSEMBLY_PRE_ATTACH "assembly_pre_attach"
565+
#define COMPONENT_CANCEL_ATTACH (1<<0)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Powernet signals
2+
3+
/// Sent when a wirenet circuit component sends a signal (list/data)
4+
#define COMSIG_POWERNET_CIRCUIT_TRANSMISSION "powernet_circuit_transmision"

code/__DEFINES/traits/declarations.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,4 +1093,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
10931093
*/
10941094
#define TRAIT_COMBAT_MODE_SKIP_INTERACTION "combat_mode_skip_interaction"
10951095

1096+
/// Trait applied when the wire bundle component is added to an [/obj/item/integrated_circuit]
1097+
#define TRAIT_COMPONENT_WIRE_BUNDLE "component_wire_bundle"
1098+
10961099
// END TRAIT DEFINES

code/__DEFINES/wires.dm

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22
#define COMSIG_CUT_WIRE(wire) "cut_wire [wire]"
33
#define COMSIG_MEND_WIRE(wire) "mend_wire [wire]"
44

5+
/// from base of /datum/wires/proc/on_pulse : (wire, mob/user)
6+
#define COMSIG_PULSE_WIRE "pulse_wire"
7+
8+
// Directionality of wire pulses
9+
10+
/// The wires interact with their holder when pulsed
11+
#define WIRES_INPUT (1<<0)
12+
/// The wires have a reason to toggle whether attached assemblies are armed
13+
#define WIRES_TOGGLE_ARMED (1<<1)
14+
/// The wires only want to activate assemblies that do something other than (dis)arming themselves
15+
#define WIRES_FUNCTIONAL_OUTPUT (1<<2)
16+
/// The holder can both pulse its wires and be affected by its wires getting pulsed
17+
#define WIRES_ALL (WIRES_INPUT | WIRES_TOGGLE_ARMED | WIRES_FUNCTIONAL_OUTPUT)
18+
19+
/// The assembly can pulse a wire it is attached to
20+
#define ASSEMBLY_INPUT (1<<0)
21+
/// The assembly toggles whether it will pulse the attached wire when it is pulsed by the attached wire
22+
#define ASSEMBLY_TOGGLE_ARMED (1<<1)
23+
/// The assembly does something other than just (dis)arming itself when it is pulsed by the wire it is attached to
24+
#define ASSEMBLY_FUNCTIONAL_OUTPUT (1<<2)
25+
/// The assembly can both pulse the wire it is attached to, and (dis)arms itself when pulsed by the wire
26+
#define ASSEMBLY_TOGGLEABLE_INPUT (ASSEMBLY_INPUT | ASSEMBLY_TOGGLE_ARMED)
27+
#define ASSEMBLY_ALL (ASSEMBLY_TOGGLEABLE_INPUT | ASSEMBLY_FUNCTIONAL_OUTPUT)
28+
529
//retvals for attempt_wires_interaction
630
#define WIRE_INTERACTION_FAIL 0
731
#define WIRE_INTERACTION_SUCCESSFUL 1
@@ -72,3 +96,5 @@
7296
#define AI_WIRE_DISABLED 1
7397
#define AI_WIRE_HACKED 2
7498
#define AI_WIRE_DISABLED_HACKED -1
99+
100+
#define MAX_WIRE_COUNT 17

code/_globalvars/lists/objects.dm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ GLOBAL_LIST_EMPTY(deliverybeacontags)
3131
/// List of all singularity components that exist
3232
GLOBAL_LIST_EMPTY_TYPED(singularities, /datum/component/singularity)
3333

34-
/// list of all /datum/tech datums indexed by id.
35-
GLOBAL_LIST_EMPTY(tech_list)
34+
GLOBAL_LIST_EMPTY(item_to_design_list)
3635
/// list of all surgeries by name, associated with their path.
3736
GLOBAL_LIST_INIT(surgeries_list, init_surgeries())
3837

code/_globalvars/traits/_traits.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
545545
"TRAIT_CIRCUIT_UI_OPEN" = TRAIT_CIRCUIT_UI_OPEN,
546546
"TRAIT_CIRCUIT_UNDUPABLE" = TRAIT_CIRCUIT_UNDUPABLE,
547547
"TRAIT_COMPONENT_MMI" = TRAIT_COMPONENT_MMI,
548+
"TRAIT_COMPONENT_WIRE_BUNDLE" = TRAIT_COMPONENT_WIRE_BUNDLE,
548549
),
549550
/obj/item/modular_computer = list(
550551
"TRAIT_MODPC_HALVED_DOWNLOAD_SPEED" = TRAIT_MODPC_HALVED_DOWNLOAD_SPEED,

code/controllers/subsystem/research.dm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SUBSYSTEM_DEF(research)
77
//TECHWEB STATIC
88
var/list/techweb_nodes = list() //associative id = node datum
99
var/list/techweb_designs = list() //associative id = node datum
10+
var/list/datum/design/item_to_design = list() //typepath = list of design datums
1011

1112
///List of all techwebs, generating points or not.
1213
///Autolathes, Mechfabs, and others all have shared techwebs, for example.
@@ -168,6 +169,7 @@ SUBSYSTEM_DEF(research)
168169

169170
/datum/controller/subsystem/research/proc/initialize_all_techweb_designs(clearall = FALSE)
170171
if(islist(techweb_designs) && clearall)
172+
item_to_design = null
171173
QDEL_LIST(techweb_designs)
172174
var/list/returned = list()
173175
for(var/path in subtypesof(/datum/design))
@@ -182,6 +184,11 @@ SUBSYSTEM_DEF(research)
182184
stack_trace("WARNING: Design ID clash with ID [initial(DN.id)] detected! Path: [path]")
183185
errored_datums[DN] = initial(DN.id)
184186
continue
187+
var/build_path = initial(DN.build_path)
188+
if(!isnull(build_path))
189+
if(!(build_path in item_to_design))
190+
item_to_design[build_path] = list()
191+
item_to_design[build_path] += DN
185192
DN.InitializeMaterials() //Initialize the materials in the design
186193
returned[initial(DN.id)] = DN
187194
techweb_designs = returned

code/datums/components/crafting/furniture.dm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,15 @@
5959
tool_behaviors = list(TOOL_SCREWDRIVER)
6060
category = CAT_FURNITURE
6161
time = 7 SECONDS
62+
63+
/datum/crafting_recipe/flatpack_cart
64+
name = "Flatpack Cart"
65+
reqs = list(
66+
/obj/item/stack/sheet/iron = 4,
67+
/obj/item/stack/sheet/plasteel = 1,
68+
/obj/item/stack/rods = 8
69+
)
70+
result = /obj/structure/flatpack_cart
71+
tool_behaviors = list(TOOL_SCREWDRIVER)
72+
category = CAT_FURNITURE
73+
time = 10 SECONDS

0 commit comments

Comments
 (0)