diff --git a/code/__DEFINES/machines.dm b/code/__DEFINES/machines.dm index 25893cae63f72..4de254ce7868d 100644 --- a/code/__DEFINES/machines.dm +++ b/code/__DEFINES/machines.dm @@ -69,6 +69,8 @@ // DOPPLER EDIT ADDITION /// Can be made by the orderable colony fabricator #define COLONY_FABRICATOR (1<<11) +/// Can be made in emergency damage lathes +#define DAMAGE_FAB (1<<12) // DOPPLER EDIT END #define HYPERTORUS_INACTIVE 0 // No or minimal energy diff --git a/code/__DEFINES/~doppler_defines/techweb_nodes.dm b/code/__DEFINES/~doppler_defines/techweb_nodes.dm index 1243df6ce241d..2a6be496862c9 100644 --- a/code/__DEFINES/~doppler_defines/techweb_nodes.dm +++ b/code/__DEFINES/~doppler_defines/techweb_nodes.dm @@ -6,3 +6,4 @@ #define TECHWEB_NODE_COLONY_FLATPACKS "colony_fabricator_flatpacks" #define TECHWEB_NODE_COLONY_STRUCTURES "colony_fabricator_structures" #define TECHWEB_NODE_COLONY_TOOLS "colony_fabricator_tools" +#define TECHWEB_NODE_EMERGENCY_FAB "emergency_fab_designs" diff --git a/modular_doppler/damage_control/code/breach_gear.dm b/modular_doppler/damage_control/code/breach_gear.dm index c91753e20217a..1e7cded57bede 100644 --- a/modular_doppler/damage_control/code/breach_gear.dm +++ b/modular_doppler/damage_control/code/breach_gear.dm @@ -1,3 +1,10 @@ +// Yellow tank but empty, for the printer + +/obj/item/tank/internals/oxygen/yellow/empty + +/obj/item/tank/internals/oxygen/yellow/empty/populate_gas() + return + // Breach helmet, its a hardhat but cooler /obj/item/clothing/head/utility/hardhat/welding/doppler_dc diff --git a/modular_doppler/damage_control/code/emergency_fab.dm b/modular_doppler/damage_control/code/emergency_fab.dm new file mode 100644 index 0000000000000..ae2c1c8359f5f --- /dev/null +++ b/modular_doppler/damage_control/code/emergency_fab.dm @@ -0,0 +1,82 @@ +/obj/machinery/rnd/production/damage_control_fab + name = "emergency repair lathe" + desc = "A small little machine with no material insertion ports and no power connectors. \ + Able to use the small trickle of power an internal source creates to slowly create \ + essential damage control equipment." + icon = 'modular_doppler/damage_control/icons/machines.dmi' + icon_state = "damage_fab" + base_icon_state = "damage_fab" + circuit = null + production_animation = "damage_fab_working" + light_color = LIGHT_COLOR_INTENSE_RED + light_power = 5 + allowed_buildtypes = DAMAGE_FAB + /// The item we turn into when repacked + var/repacked_type = /obj/item/flatpacked_machine/damage_lathe + +/obj/machinery/rnd/production/damage_control_fab/Initialize(mapload) + . = ..() + AddElement(/datum/element/repackable, repacked_type, 5 SECONDS) + stored_research = locate(/datum/techweb/admin) in SSresearch.techwebs + if(!mapload) + flick("damage_fab_deploy", src) + +// formerly NO_DECONSTRUCTION +/obj/machinery/rnd/production/damage_control_fab/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/screwdriver) + return NONE + +/obj/machinery/rnd/production/damage_control_fab/default_deconstruction_crowbar(obj/item/crowbar, ignore_panel, custom_deconstruct) + return NONE + +/obj/machinery/rnd/production/damage_control_fab/default_pry_open(obj/item/crowbar, close_after_pry, open_density, closed_density) + return NONE + +/obj/machinery/rnd/production/damage_control_fab/start_printing_visuals() + set_light(l_range = 1.5) + icon_state = "colony_lathe_working" + update_appearance() + +/obj/machinery/rnd/production/damage_control_fab/finalize_build() + . = ..() + set_light(l_range = 0) + icon_state = base_icon_state + update_appearance() + flick("colony_lathe_finish_print", src) + +/obj/machinery/rnd/production/damage_control_fab/build_efficiency() + return 1 + +// We take from all nodes even unresearched ones +/obj/machinery/rnd/production/damage_control_fab/update_designs() + var/previous_design_count = cached_designs.len + + cached_designs.Cut() + + for(var/design_id in SSresearch.techweb_designs) + var/datum/design/design = SSresearch.techweb_designs[design_id] + + if((isnull(allowed_department_flags) || (design.departmental_flags & allowed_department_flags)) && (design.build_type & allowed_buildtypes)) + cached_designs |= design + + var/design_delta = cached_designs.len - previous_design_count + + if(design_delta > 0) + say("Received [design_delta] new design[design_delta == 1 ? "" : "s"].") + playsound(src, 'sound/machines/beep/twobeep_high.ogg', 50, TRUE) + + update_static_data_for_all_viewers() + +// Item for carrying the lathe around and building it + +/obj/item/flatpacked_machine/damage_lathe + name = "packed emergency repair lathe" + /// For all flatpacked machines, set the desc to the type_to_deploy followed by ::desc to reuse the type_to_deploy's description + desc = /obj/machinery/rnd/production/damage_control_fab::desc + icon = 'modular_doppler/damage_control/icons/packed_machines.dmi' + icon_state = "damage_lathe_packed" + w_class = WEIGHT_CLASS_BULKY + type_to_deploy = /obj/machinery/rnd/production/damage_control_fab + deploy_time = 4 SECOND + +/obj/item/flatpacked_machine/damage_lathe/give_manufacturer_examine() + return diff --git a/modular_doppler/damage_control/code/emergency_fab_designs.dm b/modular_doppler/damage_control/code/emergency_fab_designs.dm new file mode 100644 index 0000000000000..d62c61acdba58 --- /dev/null +++ b/modular_doppler/damage_control/code/emergency_fab_designs.dm @@ -0,0 +1,130 @@ +/datum/techweb_node/emergency_fab_designs + id = TECHWEB_NODE_EMERGENCY_FAB + display_name = "Emergency Repair Lathe Designs" + description = "All of the designs that work for the emergency repair lathe." + design_ids = list( + "breach_bag_doppla", + "breach_helmet_doppla", + "empty_yellow_tank_doppla", + "door_seal_doppla", + "damage_fab_plastic_wall_panel", + "damage_fab_medbed", + "damage_fab_crowbar", + "damage_fab_flare", + ) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 50000000000000) // God save you + hidden = TRUE + show_on_wiki = FALSE + starting_node = TRUE + +// Breach helmet + +/datum/design/breach_helmet_doppla + name = "Breach Helmet" + id = "breach_helmet_doppla" + build_type = DAMAGE_FAB + build_path = /obj/item/storage/bag/breach_bag + construction_time = 2 MINUTES + materials = list() + category = list( + RND_CATEGORY_INITIAL, + RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_ATMOSPHERICS, + ) + +// Entire filled breach bag + +/datum/design/breach_bag_doppla + name = "Damage Control Ensemble Bag" + id = "breach_bag_doppla" + build_type = DAMAGE_FAB + build_path = /obj/item/storage/bag/breach_bag + construction_time = 7 MINUTES + materials = list() + category = list( + RND_CATEGORY_INITIAL, + RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_ATMOSPHERICS, + ) + +// Entire filled breach bag + +/datum/design/empty_yellow_tank_doppla + name = "Empty Internals Tank" + id = "empty_yellow_tank_doppla" + build_type = DAMAGE_FAB + build_path = /obj/item/tank/internals/oxygen/yellow/empty + construction_time = 1 MINUTES + materials = list() + category = list( + RND_CATEGORY_INITIAL, + RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_ATMOSPHERICS, + ) + +// Door seals + +/datum/design/door_seal_doppla + name = "Door Seal" + id = "door_seal_doppla" + build_type = DAMAGE_FAB + build_path = /obj/item/door_seal + construction_time = 2 MINUTES + materials = list() + category = list( + RND_CATEGORY_INITIAL, + RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_ENGINEERING, + ) + +// Plastic wall panels are good for sealing holes in the wall + +/datum/design/damage_fab_plastic_wall + name = "Plastic Paneling" + id = "damage_fab_plastic_wall_panel" + build_type = DAMAGE_FAB + materials = list() + build_path = /obj/item/stack/sheet/plastic_wall_panel + category = list( + RND_CATEGORY_INITIAL, + RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_ENGINEERING, + ) + construction_time = 10 SECONDS + +// Rollerbeds for saving people + +/datum/design/damage_fab_rollerbed + name = "Emergency Medical Bed" + id = "damage_fab_medbed" + build_type = DAMAGE_FAB + materials = list() + build_path = /obj/item/emergency_bed + category = list( + RND_CATEGORY_INITIAL, + RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_MEDICAL, + ) + construction_time = 1 MINUTES + +// Bar with crows in it + +/datum/design/damage_fab_rollerbed + name = "Emergency Crowbar" + id = "damage_fab_crowbar" + build_type = DAMAGE_FAB + materials = list() + build_path = /obj/item/crowbar/red + category = list( + RND_CATEGORY_INITIAL, + RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_ENGINEERING, + ) + construction_time = 1 MINUTES + +// Flare + +/datum/design/damage_fab_flare + name = "Flare" + id = "damage_fab_flare" + build_type = DAMAGE_FAB + materials = list() + build_path = /obj/item/flashlight/flare + category = list( + RND_CATEGORY_INITIAL, + RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_ENGINEERING, + ) + construction_time = 30 SECONDS diff --git a/modular_doppler/damage_control/icons/machines.dmi b/modular_doppler/damage_control/icons/machines.dmi new file mode 100644 index 0000000000000..1249748fd156f Binary files /dev/null and b/modular_doppler/damage_control/icons/machines.dmi differ diff --git a/modular_doppler/damage_control/icons/packed_machines.dmi b/modular_doppler/damage_control/icons/packed_machines.dmi new file mode 100644 index 0000000000000..caf5689163173 Binary files /dev/null and b/modular_doppler/damage_control/icons/packed_machines.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 9487675167ebf..10dc2213d22f4 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6626,6 +6626,8 @@ #include "modular_doppler\cryosleep\code\objective.dm" #include "modular_doppler\cryosleep\code\objects\structures\signs\signs_maps.dm" #include "modular_doppler\damage_control\code\breach_gear.dm" +#include "modular_doppler\damage_control\code\emergency_fab.dm" +#include "modular_doppler\damage_control\code\emergency_fab_designs.dm" #include "modular_doppler\deathmatch\deathmatch_loadouts.dm" #include "modular_doppler\deathmatch\deathmatch_maps.dm" #include "modular_doppler\deathmatch\deathmatch_structures.dm"