diff --git a/aurorastation.dme b/aurorastation.dme index a9602f242d9..db419061de1 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -905,6 +905,7 @@ #include "code\game\objects\items\weapons\paiwire.dm" #include "code\game\objects\items\weapons\policetape.dm" #include "code\game\objects\items\weapons\power_cells.dm" +#include "code\game\objects\items\weapons\research_slip.dm" #include "code\game\objects\items\weapons\RFD.dm" #include "code\game\objects\items\weapons\scrolls.dm" #include "code\game\objects\items\weapons\shields.dm" diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 24c90b72af7..d6ad82de4db 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -2,7 +2,7 @@ var/list/doppler_arrays = list() /obj/machinery/doppler_array name = "tachyon-doppler array" - desc = "A highly precise directional sensor array which measures the release of quants from decaying tachyons. The doppler shifting of the mirror-image formed by these quants can reveal the size, location and temporal affects of energetic disturbances within a large radius ahead of the array." + desc = "A highly precise sensor array which measures the release of quants from decaying tachyons. The doppler shifting of the mirror-image formed by these quants can reveal the size, location and temporal affects of energetic disturbances within a large radius ahead of the array." icon = 'icons/obj/computer.dmi' icon_state = "computer" @@ -39,32 +39,41 @@ var/list/doppler_arrays = list() add_overlay(image(icon, src, "teleport")) /obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range) - if(!active || (stat & NOPOWER) || z != z0) + if(!active) + return + if(stat & NOPOWER) + return + if(z != z0) return var/dx = abs(x0-x) var/dy = abs(y0-y) var/distance - var/direct if(dx > dy) distance = dx - if(x0 > x) direct = EAST - else direct = WEST else distance = dy - if(y0 > y) direct = NORTH - else direct = SOUTH if(distance > 100) return - if(!(direct & dir)) - return - var/message = "Explosive disturbance detected - Epicenter at: grid ([x0],[y0],[z0]). Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range]." global_announcer.autosay(message, "Tachyon-Doppler Array", "Science") + var/list/gained_tech + switch(devastation_range) + if(-INFINITY to 1) // minimum + gained_tech = list(TECH_BLUESPACE = 1, TECH_COMBAT = 2, TECH_MATERIAL = 2) + if(1 to 2) // starter bombs + gained_tech = list(TECH_BLUESPACE = 2, TECH_PHORON = 2, TECH_COMBAT = 3, TECH_MATERIAL = 3) + if(2 to 4) // max toxins can get + gained_tech = list(TECH_BLUESPACE = 3, TECH_PHORON = 3, TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) + else + gained_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 4, TECH_COMBAT = 4, TECH_MATERIAL = 4, TECH_ENGINEERING = 4) + + new /obj/item/research_slip(get_turf(src), gained_tech) + /obj/machinery/doppler_array/power_change() ..() update_icon() diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 4cf749bd899..bd0fd5a72e3 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -17,13 +17,9 @@ SSexplosives.queue(data) //Machines which report explosions. - for(var/i,i<=doppler_arrays.len,i++) - var/obj/machinery/doppler_array/Array = doppler_arrays[i] - if(Array) - var/x0 = epicenter.x - var/y0 = epicenter.y - var/z0 = epicenter.z - Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range) + for(var/thing in doppler_arrays) + var/obj/machinery/doppler_array/Array = thing + Array.sense_explosion(epicenter.x,epicenter.y,epicenter.z,devastation_range,heavy_impact_range,light_impact_range) // == Recursive Explosions stuff == diff --git a/code/game/objects/items/weapons/research_slip.dm b/code/game/objects/items/weapons/research_slip.dm new file mode 100644 index 00000000000..514c09f5c79 --- /dev/null +++ b/code/game/objects/items/weapons/research_slip.dm @@ -0,0 +1,12 @@ +/obj/item/research_slip + name = "research slip" + desc = "A small slip of plastic with an embedded chip. It is commonly used to store small amounts of research data." + desc_info = "This item is to be used in the destructive analyzer to gain research points." + icon = 'icons/obj/contained_items/tools/research_slip.dmi' + icon_state = "slip" + contained_sprite = TRUE + +/obj/item/research_slip/Initialize(mapload, var/list/research_levels) + . = ..() + if(length(research_levels)) + origin_tech = research_levels \ No newline at end of file diff --git a/html/changelogs/geeves-valid_bombing.yml b/html/changelogs/geeves-valid_bombing.yml new file mode 100644 index 00000000000..515638aaf16 --- /dev/null +++ b/html/changelogs/geeves-valid_bombing.yml @@ -0,0 +1,7 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "The Tachyon-Doppler array will now output research slips with research data based on the size of the explosion it detects. You can feed these into a destructive analyzer for research points." + - tweak: "The doppler array is no longer directional, meaning if it happens on its Z-level, it will detect it." diff --git a/icons/obj/contained_items/tools/research_slip.dmi b/icons/obj/contained_items/tools/research_slip.dmi new file mode 100644 index 00000000000..30ee90f4022 Binary files /dev/null and b/icons/obj/contained_items/tools/research_slip.dmi differ