diff --git a/_maps/map_files/Aetherwhisp/Aetherwhisp2.dmm b/_maps/map_files/Aetherwhisp/Aetherwhisp2.dmm index 4969b02cb6e..bcd941f187c 100644 --- a/_maps/map_files/Aetherwhisp/Aetherwhisp2.dmm +++ b/_maps/map_files/Aetherwhisp/Aetherwhisp2.dmm @@ -792,10 +792,6 @@ /obj/machinery/chem_heater, /turf/open/floor/carpet/ship/purple_carpet, /area/science/xenobiology) -"aAA" = ( -/obj/item/kirbyplants/random, -/turf/open/floor/carpet/ship/orange_carpet, -/area/nsv/weapons/fore) "aAP" = ( /obj/machinery/door/airlock/vault/ship{ name = "Hangar Storage"; @@ -895,6 +891,7 @@ layer = 2.79; pixel_y = 26 }, +/obj/machinery/cooling/cooler, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "aDF" = ( @@ -1171,6 +1168,7 @@ layer = 2.79; pixel_y = 26 }, +/obj/machinery/cooling/storage, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "aNh" = ( @@ -1627,18 +1625,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 4 }, -/obj/structure/window/reinforced{ - dir = 4 - }, -/obj/structure/window/reinforced{ - layer = 2.89 - }, -/obj/structure/table, -/obj/item/multitool{ - pixel_x = 4; - pixel_y = -1 - }, -/obj/item/screwdriver, +/obj/machinery/cooling/storage, /turf/open/floor/engine, /area/nsv/weapons/starboard) "bfj" = ( @@ -3376,6 +3363,7 @@ /obj/structure/cable/white{ icon_state = "2-4" }, +/obj/machinery/cooling/cooler, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "cnq" = ( @@ -4048,13 +4036,16 @@ /turf/open/floor/plating, /area/maintenance/fore) "cFY" = ( -/obj/machinery/modular_computer/console/preset/engineering{ +/obj/effect/turf_decal/stripes/line{ + dir = 4 + }, +/obj/machinery/computer/cargo/request{ dir = 8 }, /obj/structure/window/reinforced{ dir = 4 }, -/turf/open/floor/carpet/ship/orange_carpet, +/turf/open/floor/engine, /area/nsv/weapons/fore) "cGt" = ( /obj/effect/turf_decal/arrows{ @@ -4656,12 +4647,22 @@ /obj/structure/cable/white{ icon_state = "1-2" }, -/obj/structure/cable/white{ - icon_state = "2-4" - }, /obj/structure/cable/yellow{ icon_state = "5-8" }, +/obj/machinery/computer/monitor{ + dir = 8; + name = "stormdrive power monitoring console" + }, +/obj/item/paper{ + default_raw_text = "
Engineering notice: There are three wire colors used on the Aetherwhisp 6 ship model. White cable is wired to the Stormdrive MK-4 and the supermatter crystal near atmospherics. These lead to their own SMES located nearby. Yellow wires are department distribution wires, which deliver power from the engines SMES to deparment SMES. Red wires deliver power from department SMES to department APCs.
" + }, +/obj/structure/cable/white{ + icon_state = "0-2" + }, +/obj/structure/window/reinforced{ + dir = 4 + }, /turf/open/floor/engine, /area/nsv/weapons/fore) "dhb" = ( @@ -5845,16 +5846,9 @@ /turf/open/floor/plasteel/freezer, /area/crew_quarters/toilet/auxiliary) "ecq" = ( -/obj/structure/window/reinforced{ - dir = 4 - }, /obj/structure/cable/yellow{ icon_state = "0-10" }, -/obj/machinery/computer/monitor{ - dir = 8; - name = "department distribution monitoring console" - }, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "ecu" = ( @@ -5911,6 +5905,7 @@ /obj/structure/cable/white{ icon_state = "2-4" }, +/obj/machinery/cooling/cooler, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "eex" = ( @@ -6057,7 +6052,6 @@ }, /obj/machinery/atmospherics/components/unary/outlet_injector/atmos/oxygen_input{ dir = 8; - icon_state = "inje_map-3"; id = "o2_in_alt"; piping_layer = 4 }, @@ -6140,6 +6134,11 @@ /obj/effect/landmark/start/cyborg, /turf/open/floor/plating, /area/quartermaster/warehouse) +"emk" = ( +/obj/machinery/atmospherics/pipe/simple/purple/hidden, +/obj/machinery/cooling/storage, +/turf/open/floor/carpet/ship/orange_carpet, +/area/nsv/weapons/fore) "emS" = ( /obj/structure/disposalpipe/segment{ dir = 4 @@ -6541,6 +6540,7 @@ /obj/structure/cable/white{ icon_state = "1-4" }, +/obj/machinery/cooling/cooler, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "ezz" = ( @@ -6982,6 +6982,12 @@ /obj/structure/cable/white{ icon_state = "1-2" }, +/obj/machinery/modular_computer/console/preset/engineering{ + dir = 8 + }, +/obj/structure/window/reinforced{ + dir = 4 + }, /turf/open/floor/engine, /area/nsv/weapons/fore) "eKM" = ( @@ -7787,20 +7793,17 @@ /turf/open/floor/plating, /area/science/server) "fmj" = ( -/obj/structure/window/reinforced{ +/obj/effect/turf_decal/stripes/line{ dir = 4 }, -/obj/structure/cable/white{ - icon_state = "0-8" - }, -/obj/machinery/computer/monitor{ +/obj/machinery/computer/ship/navigation/public{ dir = 8; - name = "stormdrive power monitoring console" + name = "starmap console" }, -/obj/item/paper{ - default_raw_text = "Engineering notice: There are three wire colors used on the Aetherwhisp 6 ship model. White cable is wired to the Stormdrive MK-4 and the supermatter crystal near atmospherics. These lead to their own SMES located nearby. Yellow wires are department distribution wires, which deliver power from the engines SMES to deparment SMES. Red wires deliver power from department SMES to department APCs.
" +/obj/structure/window/reinforced{ + dir = 4 }, -/turf/open/floor/carpet/ship/orange_carpet, +/turf/open/floor/engine, /area/nsv/weapons/fore) "fms" = ( /obj/machinery/dna_scannernew, @@ -8611,6 +8614,7 @@ /obj/structure/cable/white{ icon_state = "1-2" }, +/obj/machinery/cooling/cooler, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/starboard) "fLO" = ( @@ -8806,6 +8810,7 @@ /obj/structure/cable/white{ icon_state = "2-8" }, +/obj/machinery/cooling/cooler, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "fTg" = ( @@ -10667,8 +10672,11 @@ /turf/open/floor/plating, /area/maintenance/fore) "hgV" = ( -/obj/effect/landmark/event_spawn, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, +/obj/structure/chair/office/light{ + dir = 4 + }, +/obj/effect/landmark/start/munitions_tech, /turf/open/floor/engine, /area/nsv/weapons/fore) "hgZ" = ( @@ -13307,15 +13315,6 @@ }, /turf/open/floor/engine, /area/gateway) -"jaM" = ( -/obj/structure/window/reinforced{ - dir = 4 - }, -/obj/machinery/computer/cargo/request{ - dir = 8 - }, -/turf/open/floor/carpet/ship/orange_carpet, -/area/nsv/weapons/fore) "jaQ" = ( /obj/structure/cable{ icon_state = "1-2" @@ -14508,6 +14507,7 @@ /obj/structure/cable/white{ icon_state = "1-8" }, +/obj/machinery/cooling/cooler, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/starboard) "jNL" = ( @@ -19072,6 +19072,7 @@ /obj/structure/sign/solgov_seal{ pixel_y = 26 }, +/obj/machinery/cooling/storage, /turf/open/floor/plating, /area/nsv/weapons/fore) "njC" = ( @@ -20477,6 +20478,16 @@ icon_state = "1-2" }, /obj/structure/chair/office/light, +/obj/machinery/computer/monitor{ + dir = 8; + name = "department distribution monitoring console" + }, +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/structure/cable/yellow{ + icon_state = "0-2" + }, /turf/open/floor/engine, /area/nsv/weapons/fore) "nZu" = ( @@ -20570,6 +20581,10 @@ /obj/machinery/vending/sustenance, /turf/open/floor/wood, /area/maintenance/fore) +"ocW" = ( +/obj/effect/landmark/event_spawn, +/turf/open/floor/engine, +/area/nsv/weapons/fore) "odg" = ( /obj/structure/cable/white{ icon_state = "4-8" @@ -20581,16 +20596,6 @@ /obj/machinery/firealarm/directional/east, /turf/open/floor/carpet/ship, /area/hallway/nsv/deck2/primary) -"oec" = ( -/obj/structure/window/reinforced{ - dir = 4 - }, -/obj/machinery/computer/ship/navigation/public{ - dir = 8; - name = "starmap console" - }, -/turf/open/floor/carpet/ship/orange_carpet, -/area/nsv/weapons/fore) "ofC" = ( /obj/machinery/camera/autoname{ dir = 8 @@ -20934,6 +20939,7 @@ /obj/structure/cable/white{ icon_state = "1-4" }, +/obj/machinery/cooling/cooler, /turf/open/floor/carpet/ship/orange_carpet, /area/nsv/weapons/fore) "otN" = ( @@ -20989,6 +20995,11 @@ pixel_y = 26 }, /obj/structure/table, +/obj/item/multitool{ + pixel_x = 4; + pixel_y = -1 + }, +/obj/item/screwdriver, /turf/open/floor/engine, /area/nsv/weapons/starboard) "ovd" = ( @@ -23707,6 +23718,10 @@ /obj/effect/turf_decal/bot/left, /turf/open/floor/engine, /area/science/robotics/lab) +"qjG" = ( +/obj/machinery/cooling/storage, +/turf/open/floor/carpet/ship/orange_carpet, +/area/nsv/weapons/fore) "qjS" = ( /obj/effect/turf_decal/stripes/line{ dir = 8 @@ -25789,10 +25804,12 @@ /obj/effect/turf_decal/stripes/line{ dir = 4 }, -/obj/structure/chair/office/light{ +/obj/machinery/computer/ship/dradis/minor{ + dir = 8 + }, +/obj/structure/window/reinforced{ dir = 4 }, -/obj/effect/landmark/start/munitions_tech, /turf/open/floor/engine, /area/nsv/weapons/fore) "rxR" = ( @@ -27722,6 +27739,10 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /turf/open/floor/wood, /area/library) +"sGF" = ( +/obj/machinery/cooling/storage, +/turf/open/floor/carpet/ship/orange_carpet, +/area/nsv/weapons/starboard) "sGH" = ( /obj/machinery/chem_dispenser, /turf/open/floor/plating, @@ -28296,15 +28317,6 @@ /obj/machinery/light_switch/east, /turf/open/floor/carpet/ship/purple_carpet, /area/science/mixing) -"tbQ" = ( -/obj/structure/window/reinforced{ - dir = 4 - }, -/obj/machinery/computer/ship/dradis/minor{ - dir = 8 - }, -/turf/open/floor/carpet/ship/orange_carpet, -/area/nsv/weapons/fore) "tcI" = ( /obj/machinery/atmospherics/pipe/simple/general/visible, /obj/structure/disposalpipe/segment{ @@ -30294,6 +30306,10 @@ /obj/effect/landmark/start/cyborg, /turf/open/floor/carpet/ship/purple_carpet, /area/science/robotics/lab) +"uNg" = ( +/obj/machinery/cooling/cooler, +/turf/open/floor/carpet/ship/orange_carpet, +/area/nsv/weapons/starboard) "uNA" = ( /obj/structure/cable{ icon_state = "1-2" @@ -79168,7 +79184,7 @@ qqd iIw dnp oqH -wsl +ocW ccH ddg hWF @@ -79683,8 +79699,8 @@ nZt dgj gdL rxx -mNk -mNk +fmj +cFY mNk pqG ozk @@ -79933,15 +79949,15 @@ nZT aKK vnw aKK -aAA fDP -cFY +fDP +fDP ecq -fmj +fDP fQY -tbQ -oec -jaM +fDP +fDP +fDP fDP fDP fDP @@ -80459,7 +80475,7 @@ fDP bnc fDP fDP -fDP +qjG hIh tXU xdB @@ -80714,9 +80730,9 @@ imE fDP mUo fDP +qjG fDP -fDP -fDP +qjG hIh uhs xem @@ -80746,7 +80762,7 @@ xjr ouM beV gKC -gKC +beV gKC iRW gKC @@ -80964,7 +80980,7 @@ aKK aQt kJD cGU -kJD +emk cII hfr aKK @@ -81514,13 +81530,13 @@ nZT nZT hbT xjr +uNg wrq wrq wrq wrq wrq -wrq -wrq +sGF seW iyw xMP diff --git a/_maps/map_files/Aetherwhisp/job_changes.dm b/_maps/map_files/Aetherwhisp/job_changes.dm index 5c07d867bf3..734752442dc 100644 --- a/_maps/map_files/Aetherwhisp/job_changes.dm +++ b/_maps/map_files/Aetherwhisp/job_changes.dm @@ -1,19 +1,6 @@ // If you continue to complain that munitechs have nothing to do, then I guess you really have nothing to do now don't you? // I'm replacing your job with bridge officers who are perfectly capable of pushing a button on lasers -// MAP_REMOVE_JOB(master_at_arms) -MAP_REMOVE_JOB(munitions_tech) - -/datum/job/munitions_tech/New() - ..() - MAP_JOB_CHECK - total_positions = 0 - spawn_positions = 0 - -/datum/job/master_at_arms/New() - ..() - MAP_JOB_CHECK - total_positions = 0 - spawn_positions = 0 +// this file should be obsolete #undef JOB_MODIFICATION_MAP_NAME diff --git a/nsv13.dme b/nsv13.dme index 2abd39ff698..d6bf40995c4 100644 --- a/nsv13.dme +++ b/nsv13.dme @@ -3998,6 +3998,7 @@ #include "nsv13\code\modules\munitions\ship_weapons\energy_weapons\laser_ams.dm" #include "nsv13\code\modules\munitions\ship_weapons\energy_weapons\laser_pd.dm" #include "nsv13\code\modules\munitions\ship_weapons\energy_weapons\phaser.dm" +#include "nsv13\code\modules\munitions\ship_weapons\energy_weapons\subspacecooling.dm" #include "nsv13\code\modules\munitions\ship_weapons\hybrid_weapons\hybrid_railgun.dm" #include "nsv13\code\modules\overmap\ai-skynet.dm" #include "nsv13\code\modules\overmap\ai_interiors.dm" diff --git a/nsv13/code/game/objects/items/nsv_circuitboards.dm b/nsv13/code/game/objects/items/nsv_circuitboards.dm index 2191f4ded8d..1a0ef6359e6 100644 --- a/nsv13/code/game/objects/items/nsv_circuitboards.dm +++ b/nsv13/code/game/objects/items/nsv_circuitboards.dm @@ -477,3 +477,27 @@ icon_state = "science" build_path = /obj/machinery/navbeacon req_components = list() + +//energy weapon cooling +/obj/item/circuitboard/machine/cooling + name = "subspace cooling unit circuit board" + materials = list(/datum/material/glass=1000, /datum/material/gold=500) + build_path = /obj/machinery/cooling/cooler + req_components = list( + /obj/item/stack/cable_coil = 15, + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/capacitor = 2, + /obj/item/stock_parts/micro_laser =2, + /obj/item/stock_parts/heatsink = 1) + + +/obj/item/circuitboard/machine/cooling/storage + name = "subspace heatsink unit circuit board" + materials = list(/datum/material/glass=1000, /datum/material/gold=500) + build_path = /obj/machinery/cooling/storage + req_components = list( + /obj/item/stack/cable_coil = 15, + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/capacitor = 2, + /obj/item/stock_parts/micro_laser = 2, + /obj/item/stock_parts/heatsink = 1) diff --git a/nsv13/code/modules/munitions/ship_weapons/_ship_weapon.dm b/nsv13/code/modules/munitions/ship_weapons/_ship_weapon.dm index 3072234350b..b67bc490983 100644 --- a/nsv13/code/modules/munitions/ship_weapons/_ship_weapon.dm +++ b/nsv13/code/modules/munitions/ship_weapons/_ship_weapon.dm @@ -47,6 +47,7 @@ var/malfunction_sound = 'sound/effects/alert.ogg' + //Various traits that probably won't change var/maintainable = TRUE //Does the weapon require maintenance? var/bang = TRUE //Is firing loud? @@ -72,11 +73,7 @@ var/obj/item/ammo_box/magazine/magazine //Magazine if we have one var/obj/chambered //Chambered round if we have one. Extrapolate ammo type from this var/list/ammo = list() //All loaded ammo - - // These variables only pertain to energy weapons, but need to be checked later in /proc/fire - var/charge = 0 - var/charge_rate = 0 //How quickly do we charge? - var/charge_per_shot = 0 //How much power per shot do we have to use? + //energy weapon vars used to be here, they aren't anymore /** * Constructor for /obj/machinery/ship_weapon @@ -521,6 +518,7 @@ local_fire() overmap_fire(target) charge -= charge_per_shot + heat += heat_per_shot after_fire() . = TRUE if(shots > 1) diff --git a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/bsa.dm b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/bsa.dm index c6f5ccb71b7..154a081a5f8 100644 --- a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/bsa.dm +++ b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/bsa.dm @@ -227,3 +227,10 @@ var/mob/living/goodbye = target goodbye.dust(TRUE, FALSE) explosion(get_turf(target), 6, 8, 9, 12, ignorecap = TRUE, flame_range = 6) //I have to keep myself from letting it just truncate ships because thats a bit annoying to fix for the receiving side, even if accurate to appearance. + + +/obj/machinery/ship_weapon/energy/beam/bsa/after_fire() //NT gets to cheat and have no degadation or heating on their weapon because muni has enough to do and the BSA doesn't need buffs/nerfs + . = ..() + heat = 0 + alignment = 100 + freq = 100 diff --git a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_ams.dm b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_ams.dm index 3fed59003d7..ff385b8f702 100644 --- a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_ams.dm +++ b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_ams.dm @@ -14,9 +14,14 @@ idle_power_usage = 2500 active = FALSE charge = 0 + max_heat = 800 + heat_per_shot = 200 + heat_rate = 30 + storage_rate = 50 + // Hitscan antimissile laser, charges relatively quickly, but can't hold a decent buffer! - charge_rate = 1000000 // At power level 2, requires 2MW per tick to charge + charge_rate = 1500000 // At power level 2, requires 3MW per tick to charge charge_per_shot = 3000000 // At power level 2, requires 6MW total to fire, takes about 3 seconds to gain 1 charge max_charge = 3000000 // Store 1 charge diff --git a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_pd.dm b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_pd.dm index b5ccb16f47c..85c498d6bbc 100644 --- a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_pd.dm +++ b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_pd.dm @@ -64,8 +64,8 @@ fire_mode = FIRE_MODE_LASER_PD energy_weapon_type = /datum/ship_weapon/phaser_pd charge = 0 - charge_rate = 500000 - charge_per_shot = 1000000 // requires 2 MW to fire a burst + charge_rate = 700000 + charge_per_shot = 1000000 // requires 1 MW to fire a burst max_charge = 4000000 // Stores 1 burst base power_modifier_cap = 1 // PL cap of 2 static_charge = TRUE @@ -76,6 +76,11 @@ var/gunning_component_type = /datum/component/overmap_gunning/laser_pd var/mob/gunner = null var/gun_id = 0 // Used for map linkage + max_heat = 1000 + heat_per_shot = 80 + heat_rate = 15 + storage_rate = 100 + /obj/machinery/ship_weapon/energy/laser_pd/proc/start_gunning(mob/user) if(gunner) diff --git a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm index cd041f433e3..017f38335cc 100644 --- a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm +++ b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm @@ -1,3 +1,10 @@ +#define STATE_OVERLOAD 2 +#define STATE_VENTING 1 +#define STATE_NOTHING 0 +//#define STATE(ACTIVE) 1 +//#define STATE(INACTIVE) 0 dunno how to adapt somem of these things right now + + /obj/machinery/ship_weapon/energy name = "burst phaser MK2" desc = "A coaxial laser system, capable of firing controlled laser bursts at a target." @@ -13,14 +20,38 @@ safety = FALSE //Ready to go right from the start. idle_power_usage = 2500 var/active = FALSE - charge = 0 - charge_rate = 330000 //How quickly do we charge? - charge_per_shot = 660000 //How much power per shot do we have to use? var/max_charge = 3300000 //5 shots before it has to recharge. var/power_modifier = 0 //Power youre inputting into this thing. var/power_modifier_cap = 3 //Which means that your guns are spitting bursts that do 60 damage. var/energy_weapon_type = /datum/ship_weapon/burst_phaser var/static_charge = FALSE //Controls whether power and energy cost scale with power modifier. True = no scaling + var/alignment = 100 //stolen from railguns and the plasma gun + var/freq = 100 + var/max_freq = 100 + var/combo_target = "omega" //Randomized sequence for the recalibration minigame. + var/list/letters = list("delta,", "omega,", "phi,") + var/combo = null + var/combocount = 0 //How far into the combo are they? + var/overheat_sound = 'sound/effects/smoke.ogg' + var/list/cooling = list() + var/cooling_amount = 0 + var/storage_amount = 0 + var/storage_rate = 100 + var/weapon_state = STATE_NOTHING + var/ventnumber = 1 + // These variables only pertain to energy weapons, but need to be checked later in /proc/fire //I moved these over to the energyweapon basetype. if everything explodes, someone else told me to + var/charge = 0 + var/heat = 0 + var/charge_rate = 430000 //How quickly do we charge? + var/charge_per_shot = 660000 //How much power per shot do we have to use? + var/heat_per_shot = 250 //how much heat do we make per shot + var/heat_rate = 10 // how fast do we discharge heat + var/max_heat = 1000 //how much heat before ::fun:: happens + var/overloaded = 0 //have we cooked ourself + var/complexenergy = 1 //todo, makes special energy weapons exempt + var/lockout = 0 //todo, make only one person work on something at a time + max_integrity = 1200 //don't blow up before we're ready + obj_integrity = 1200 /obj/machinery/ship_weapon/energy/beam name = "phase cannon" @@ -29,10 +60,31 @@ fire_mode = FIRE_MODE_BLUE_LASER energy_weapon_type = /datum/ship_weapon/phaser circuit = /obj/item/circuitboard/machine/phase_cannon - charge_rate = 600000 // At power level 5, requires 3MW per tick to charge - charge_per_shot = 4000000 // At power level 5, requires 20MW total to fire, takes about 12 seconds to gain 1 charge + charge_rate = 800000 // At power level 5, requires 3MW per tick to charge(this is wrong. but I don't have the proper numbers) + charge_per_shot = 3800000 // At power level 5, requires 20MW total to fire, takes about 12 seconds to gain 1 charge (ditto). I'm actually making this less demanding so that heat becomes the limiting factor, especially for this one. max_charge = 8000000 // Store 2 charges power_modifier_cap = 5 //Allows you to do insanely powerful oneshot lasers. Maximum theoretical damage of 500. + max_heat = 2000 + heat_per_shot = 1200 + heat_rate = 5 + storage_rate = 140 + +/obj/machinery/ship_weapon/energy/Initialize() + . = ..() + combo_target = "[pick(letters)][pick(letters)][pick(letters)][pick(letters)][pick(letters)]" //actually making the random sequince + + +/obj/machinery/ship_weapon/energy/examine(mob/user) + . = ..() + . += "The Thermal Transceiver is currently at [length(cooling)]0% connection capacity." + if(in_range(user, src) || isobserver(user)) + . += "The heatsink display reads [(heat)] out of [(max_heat)]." + if(maint_state != MSTATE_CLOSED) + . += "[src]'s realignment sequence is: [combo_target]." + if(weapon_state == STATE_VENTING) //are we venting heat?) + . += "[src]'s thermal managment system is in overdrive." + if(weapon_state == STATE_OVERLOAD) //have we overheated? + . += "[src]'s thermal managment system is in failure recovery mode." /obj/machinery/ship_weapon/energy/lazyload() active = TRUE @@ -49,6 +101,16 @@ ui.open() ui.set_autoupdate(TRUE) +/obj/machinery/ship_weapon/energy/proc/vent() + if(heat > max_heat*0.25) + weapon_state = STATE_VENTING + ventnumber = max_heat*0.25 + else + ventnumber = max_heat + weapon_state = STATE_VENTING + playsound(src, 'sound/effects/turbolift/turbolift-close.ogg', 100, 1) + playsound(src, overheat_sound, 100, 1) + /obj/machinery/ship_weapon/energy/ui_act(action, params) if(..()) @@ -59,6 +121,8 @@ power_modifier = value if("activeToggle") active = !active + if("vent") + vent() return /obj/machinery/ship_weapon/energy/attack_hand(mob/user) @@ -75,6 +139,10 @@ var/list/data = list() data["progress"] = charge data["goal"] = max_charge + data["alignment"] = alignment + data["heat"] = heat + data["maxheat"] = max_heat + data["frequency"] = freq data["chargeRate"] = charge_rate data["maxChargeRate"] = initial(charge_rate)*power_modifier_cap data["powerAlloc"] = power_modifier @@ -107,8 +175,23 @@ return FALSE if(charge < charge_per_shot*shots) //Do we have enough ammo? return FALSE - else - return TRUE + if(weapon_state == STATE_OVERLOAD) //have we overheated? + return FALSE + if(weapon_state == STATE_VENTING) //are we venting heat?) + return FALSE + if(freq <=10) //is the frequincy of the weapon high enough to fire? + overload() + return FALSE + if(alignment == 0) + playsound(src, malfunction_sound, 100, 1) + for(var/mob/living/M in get_hearers_in_view(7, src)) //burn out eyes in view + if(M.stat != DEAD && M.get_eye_protection() < 2) //checks for eye protec + M.flash_act(10) + to_chat(M, "You have a second to watch the casing of the gun glow a dull red before it erupts in a blinding flash as it self-destructs") // stealing this from the plasmagun as well + explosion(get_turf(src), 0, 1, 3, 5, flame_range = 4) + overload() + return FALSE + return TRUE /obj/machinery/ship_weapon/energy/get_max_ammo() return max_charge @@ -120,8 +203,14 @@ var/obj/item/projectile/P = ..() if(!static_charge) P.damage *= power_modifier + P.damage *= (freq/100) /obj/machinery/ship_weapon/energy/process() + process_heat() + if(weapon_state == STATE_OVERLOAD) + return + if(weapon_state == STATE_VENTING) + return charge_rate = initial(charge_rate) * power_modifier max_charge = initial(max_charge) * power_modifier if(!static_charge) @@ -139,6 +228,20 @@ return charge += charge_rate +/obj/machinery/ship_weapon/energy/after_fire() + if(maint_state != MSTATE_CLOSED) //MSTATE_CLOSED + tesla_zap(src, 4, 1000) //Munitions Officer definitely had the best uniform + for(var/mob/living/carbon/C in orange(4, src)) + C.flash_act() + for(var/mob/living/carbon/C in orange(12, src)) + to_chat(C, "Electricity arcs from the exposed firing mechanism.") + handle_alignment() + ..() + + + + + //Well hey! here's this piece of code again... /obj/machinery/ship_weapon/energy/proc/try_use_power(amount) // Although the machine may physically be powered, it may not have enough power to sustain a shield. if(!powered()) @@ -159,3 +262,150 @@ /obj/machinery/ship_weapon/energy/beam/admin //ez weapon for quickly testing. charge_per_shot = 0 + + + +/obj/machinery/ship_weapon/energy/proc/process_heat()//heat management. don't push your weapons too hard. actual heat generation is in _ship_weapons.dm + cooling_amount = 0 + for(var/obj/machinery/cooling/cooler/C in cooling) + if(!(C.machine_stat & (BROKEN|NOPOWER|MAINT))) + cooling_amount++ + storage_amount = 0 + for(var/obj/machinery/cooling/storage/C in cooling) + if(!(C.machine_stat & (BROKEN|NOPOWER|MAINT))) + storage_amount++ + max_heat = initial(max_heat) + (storage_amount*storage_rate) + var/H = heat-cooling_amount*heat_rate + if(heat > 0) + heat = max((H),0) + switch(weapon_state) + if(STATE_OVERLOAD) + if(heat <= (max_heat/50)) + weapon_state = STATE_NOTHING + else + return + if(STATE_VENTING) + if(heat <= ventnumber) + weapon_state = STATE_NOTHING + return + heat = max(heat-(cooling_amount*(heat_rate+(0.25*heat_rate))),0) + return + if(heat >= max_heat) + overload() + + +/obj/machinery/ship_weapon/energy/proc/overload() //this is what happens when you can't control yourself + playsound(src, malfunction_sound, 100, 1) + playsound(src, overheat_sound, 100, 1) + do_sparks(4, FALSE, src) + weapon_state = STATE_OVERLOAD + alignment = 0 + freq = 0 + say("WARNING! Critical heat density, emergency venting and shutdown initiated!") + atmos_spawn_air("water_vapor=200;TEMP=1000") + heat = max_heat + charge = 0 + return + +/obj/machinery/ship_weapon/energy/proc/handle_alignment() //this is the basic bad stuff that happens, don't fire when your gun is at 0 alignment, or it'll blow itself up + var/turf/detonation_turf = get_turf(src) + if(heat >= (3*(max_heat/4))) + freq -= rand(1,4) + switch(alignment) + if(51 to 75) + if(prob(50)) + do_sparks(4, FALSE, src) + freq -= rand(1,10) + if(26 to 50) + var/roll = roll(1,20) + switch(roll) + if(1 to 9) + do_sparks(4, FALSE, src) + freq -= rand(1,10) + playsound(src, malfunction_sound, 100, 1) + if(10) + playsound(src, malfunction_sound, 100, 1) + freq -= rand(1,10) + explosion(detonation_turf, 0, 0, 2, 3, flame_range = 2) + if(0 to 25) + var/roll2 = roll(1,4) + switch(roll2) + if(1) + do_sparks(4, FALSE, src) + playsound(src, malfunction_sound, 100, 1) + freq -= rand(1,10) + if(2) + playsound(src, malfunction_sound, 100, 1) + freq -= rand(1,10) + explosion(detonation_turf, 0, 0, 3, 4, flame_range = 3) + if(3,4) + var/list/shootat_turf = RANGE_TURFS(5,detonation_turf) - RANGE_TURFS(4, detonation_turf) + var/obj/item/projectile/beam/laser/P = new(detonation_turf) + //Shooting Code: + P.range = 6 + P.preparePixelProjectile(pick(shootat_turf), detonation_turf) + P.fire() + freq -= rand(1,10) + alignment = max(alignment-(rand(0, 4)),0) + + + // dilithium crystal alignment minigame stolen from ds13 - I need to rip this out and rewrite it to not be completely cursed - TODO +/obj/machinery/ship_weapon/energy/screwdriver_act(mob/user, obj/item/tool) + . = ..() + if(maint_state == MSTATE_UNBOLTED) + .=TRUE + var/sound/thesound = pick('nsv13/sound/effects/computer/beep.ogg','nsv13/sound/effects/computer/beep2.ogg','nsv13/sound/effects/computer/beep3.ogg','nsv13/sound/effects/computer/beep4.ogg','nsv13/sound/effects/computer/beep5.ogg','nsv13/sound/effects/computer/beep6.ogg','nsv13/sound/effects/computer/beep7.ogg','nsv13/sound/effects/computer/beep8.ogg','nsv13/sound/effects/computer/beep9.ogg','nsv13/sound/effects/computer/beep10.ogg','nsv13/sound/effects/computer/beep11.ogg','nsv13/sound/effects/computer/beep12.ogg',) + SEND_SOUND(user, thesound) + var/list/options = letters + for(var/option in options) + options[option] = image(icon = 'nsv13/icons/actions/engine_actions.dmi', icon_state = "[option]") + var/dowhat = show_radial_menu(user,src,options) + if(!dowhat) + return + combo += "[dowhat]" + combocount ++ + to_chat(user, "You inputted [dowhat] into the command sequence.") + playsound(src, 'sound/machines/sm/supermatter3.ogg', 20, 1) + if(combocount <= 4) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom,screwdriver_act), user),2) // *scream addtimer(CALLBACK(object|null, GLOBAL_PROC_REF(type/path|procstring), arg1, arg2, ... argn), time, timertype) + if(combocount >= 5) //Completed the sequence + if(combo == combo_target) + to_chat(user, "Realignment of weapon energy direction matrix complete.") + playsound(src, 'sound/machines/sm/supermatter1.ogg', 30, 1) + freq = max_freq + combo = null + combocount = 0 + else + to_chat(user, "Realignment failed. Continued failure risks dangerous heat overload. Rotating command sequence.") + playsound(src, 'nsv13/sound/effects/warpcore/overload.ogg', 100, 1) + combo_target = "[pick(letters)][pick(letters)][pick(letters)][pick(letters)][pick(letters)]" + heat = max(heat+(heat_per_shot*4),max_heat) //Penalty for fucking it up. You risk destroying the crystal... //well... actually overheating the gun + combocount = 0 + combo = null + +/obj/machinery/ship_weapon/energy/multitool_act(mob/living/user, obj/item/multitool/I) + switch(maint_state) + if(MSTATE_CLOSED) + if(istype(I)) + to_chat(user, "You log [src] in the multitool's buffer.") + I.buffer = src + return TRUE + if(MSTATE_UNSCREWED) + to_chat(user, "You must unbolt the protective casing before aligning the lenses!") + return TRUE + if(MSTATE_UNBOLTED) + to_chat(user, "You being aligning the lenses.") + while(alignment < 100) + if(!do_after(user, 5, target = src)) + return TRUE + alignment += rand(1,2) + if(alignment >= 100) + alignment = 100 + to_chat(user, "You finish aligning the lenses.") + return TRUE + return ..() + +/obj/machinery/ship_weapon/energy/Destroy() + for(var/obj/machinery/cooling/E in cooling) + E.parent = null + . = ..() diff --git a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/subspacecooling.dm b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/subspacecooling.dm new file mode 100644 index 00000000000..b4fe10e5a87 --- /dev/null +++ b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/subspacecooling.dm @@ -0,0 +1,101 @@ +/obj/machinery/cooling + name = "subspace unit" + desc = "A subspace unit." + icon = 'nsv13/icons/obj/subspace.dmi' + icon_state = "cooler" + bound_width = 32 + pixel_x = 0 + pixel_y = 0 + idle_power_usage = 2000 + var/obj/machinery/ship_weapon/energy/parent + var/on = FALSE + density = TRUE + +/obj/machinery/cooling/cooler + name = "subspace cooling unit" + desc = "A cooling unit that dumps the massive amounts of heat energy weapons generate into subspace." + circuit = /obj/item/circuitboard/machine/cooling + + + +/obj/machinery/cooling/Destroy() + if(parent) + parent.cooling -= src + . = ..() + + +/obj/machinery/cooling/attack_hand(mob/user) + . = ..() + if(panel_open) + to_chat(user, "You must turn close the panel on [src] before turning it on.") + return + to_chat(user, "You press [src]'s power button.") + on = !on + update_icon() + +/obj/machinery/cooling/examine() + . = ..() + if(on) + . += "The power is on" + + if(!on) + . += "The power is off" + + if(parent) + . += "The thermal transcever is linked" + + if(!parent) + . += "The thermal transcever is waiting for pairing" + + +/obj/machinery/cooling/update_icon() + cut_overlays() + if(panel_open) +// icon_state = "smes-o" + if(on && parent) +// add_overlay("smes-op1") + if(on) +// add_overlay("smes-oc1") + else +// add_overlay("smes-op0") + + +/obj/machinery/cooling/multitool_act(mob/living/user, obj/item/multitool/I) + if(!multitool_check_buffer(user, I)) + return + var/obj/item/multitool/P = I + + if(istype(P.buffer, /obj/machinery/ship_weapon/energy)) + if(get_area(P.buffer) != get_area(src)) + to_chat(user, "-% Cannot link machines across power zones. %-") + return + + if(parent) + parent.cooling -= src + parent = null + parent = P.buffer + .=TRUE + parent.cooling |= src + to_chat(user, "-% Successfully linked [P.buffer] with [src] %-") + if(length(parent.cooling) >= 11) + var/E = pick(parent.cooling) + explosion(get_turf(E), 0, 1, 3, 5, flame_range = 4) + return + + return + + +/obj/machinery/cooling/storage + name = "subspace heatsink unit" + desc = "A cooling unit that stores the massive amounts of heat energy weapons generate in subspace." + icon_state = "storage" + circuit = /obj/item/circuitboard/machine/cooling/storage + + +/obj/item/stock_parts/heatsink + name = "heatsink" + desc = "A heavy duty heatsink used in certain devices." + icon = 'icons/obj/stock_parts.dmi' + icon_state = "matter_bin" //todo + materials = list(/datum/material/bluespace=2000, /datum/material/copper=30000, /datum/material/iron=1000) + w_class = WEIGHT_CLASS_BULKY diff --git a/nsv13/code/modules/research/designs/ship_weapon_designs.dm b/nsv13/code/modules/research/designs/ship_weapon_designs.dm index d6b8b6d2dce..d38d241cef7 100644 --- a/nsv13/code/modules/research/designs/ship_weapon_designs.dm +++ b/nsv13/code/modules/research/designs/ship_weapon_designs.dm @@ -200,3 +200,35 @@ build_path = /obj/item/ship_weapon/ammunition/railgun_ammo/uranium category = list("Advanced Munitions") departmental_flags = DEPARTMENTAL_FLAG_MUNITIONS + + +//subspace cooling stuff +/datum/design/board/subspace_cooler + name = "Machine Design (Experimental Subspace Cooling Unit)" + desc = "Allows for the construction of a Subspace Cooling Unit." + id = "subspace_cooler" + build_type = PROTOLATHE|IMPRINTER + materials = list(/datum/material/glass = 2000, /datum/material/gold = 1000) + build_path = /obj/item/circuitboard/machine/cooling + category = list("Advanced Munitions") + departmental_flags = DEPARTMENTAL_FLAG_MUNITIONS + +/datum/design/board/subspace_storage + name = "Machine Design (Experimental Subspace Storage Unit)" + desc = "Allows for the construction of a Subspace Storage Unit." + id = "subspace_storage" + build_type = PROTOLATHE|IMPRINTER + materials = list(/datum/material/glass = 2000, /datum/material/gold = 1000) + build_path = /obj/item/circuitboard/machine/cooling/storage + category = list("Advanced Munitions") + departmental_flags = DEPARTMENTAL_FLAG_MUNITIONS + +/datum/design/heatsink + name = "Subspace Heatsink" + desc = "Allows for the construction of a subspace enabled Heatsink." + id = "heatsink" + build_type = PROTOLATHE + materials = list(/datum/material/bluespace=2000, /datum/material/copper=30000, /datum/material/iron=1000) + build_path = /obj/item/stock_parts/heatsink + category = list("Advanced Munitions") + departmental_flags = DEPARTMENTAL_FLAG_MUNITIONS diff --git a/nsv13/code/modules/research/techweb/all_nsv_nodes.dm b/nsv13/code/modules/research/techweb/all_nsv_nodes.dm index af5aabeaa06..7e71e32b84a 100644 --- a/nsv13/code/modules/research/techweb/all_nsv_nodes.dm +++ b/nsv13/code/modules/research/techweb/all_nsv_nodes.dm @@ -261,3 +261,15 @@ design_ids = list("borg_upgrade_muniapp") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) export_price = 5000 + +/// Munitions Upgrade for Energy Weapons +/datum/techweb_node/weapon_cooling + id = "weapon_cooling" + tech_tier = 4 + display_name = "Subspace Manipulation" + description = "Experimental uses of subspace for more than just communications" + prereq_ids = list("comptech" , "adv_engi" , "adv_power") + design_ids = list("subspace_storage" , "subspace_cooler" , "heatsink") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3000) + export_price = 5000 + hidden = FALSE //Todo, make this specific diff --git a/nsv13/icons/actions/engine_actions.dmi b/nsv13/icons/actions/engine_actions.dmi new file mode 100644 index 00000000000..48e8c4433ba Binary files /dev/null and b/nsv13/icons/actions/engine_actions.dmi differ diff --git a/nsv13/icons/obj/subspace.dmi b/nsv13/icons/obj/subspace.dmi new file mode 100644 index 00000000000..0d7227e08ae Binary files /dev/null and b/nsv13/icons/obj/subspace.dmi differ diff --git a/nsv13/sound/effects/warpcore/overload.ogg b/nsv13/sound/effects/warpcore/overload.ogg new file mode 100644 index 00000000000..754cd4b4d49 Binary files /dev/null and b/nsv13/sound/effects/warpcore/overload.ogg differ diff --git a/tgui/packages/tgui/interfaces/EnergyWeapons.js b/tgui/packages/tgui/interfaces/EnergyWeapons.js index 6cd81a1ed01..cdd658295dd 100644 --- a/tgui/packages/tgui/interfaces/EnergyWeapons.js +++ b/tgui/packages/tgui/interfaces/EnergyWeapons.js @@ -13,6 +13,10 @@ export const EnergyWeapons = (props, context) => { const goal = data.goal; const powerAlloc = data.powerAlloc; const maxPower = data.maxPower; + const maxheat = data.maxheat; + const heat = data.heat; + const alignment = data.alignment; + const frequency = data.frequency; return (