diff --git a/code/modules/custom_ka/cells.dm b/code/modules/custom_ka/cells.dm index aa99a42c660..73ce5b7d33b 100644 --- a/code/modules/custom_ka/cells.dm +++ b/code/modules/custom_ka/cells.dm @@ -145,6 +145,41 @@ if(istype(external) && external.use(charge_to_give*5)) stored_charge += charge_to_give +/obj/item/custom_ka_upgrade/cells/exosuit + name = "exosuit KA cell" + build_name = "battery powered" + desc = "A pumpless cell assembly that leaches power from the exosuit's power core." + icon_state = "cell_cyborg" + damage_increase = 0 + recoil_increase = 0 + cost_increase = 0 + cell_increase = 150 + capacity_increase = 0 + mod_limit_increase = 0 + firedelay_increase = 0.1 SECONDS + + pump_restore = 0 + pump_delay = 0 + + origin_tech = list() + +/obj/item/custom_ka_upgrade/cells/exosuit/on_update(var/obj/item/gun/custom_ka/the_gun) + var/charge_to_give = cell_increase - stored_charge + if(!charge_to_give) + return + + var/obj/item/mecha_equipment/mounted_system/mining/kinetic_accelerator/owner_equipment = the_gun.loc + if(!istype(owner_equipment)) + return + + var/mob/living/heavy_vehicle/owner_exosuit = owner_equipment.loc + if(!istype(owner_exosuit)) + return + + var/obj/item/cell/external = owner_exosuit.get_cell() + if(istype(external) && external.use(charge_to_give * 5)) + stored_charge += charge_to_give + /obj/item/custom_ka_upgrade/cells/illegal //Pump Action name = "pump action KA cell" diff --git a/code/modules/custom_ka/frames.dm b/code/modules/custom_ka/frames.dm index 41672712059..77dc3dc845f 100644 --- a/code/modules/custom_ka/frames.dm +++ b/code/modules/custom_ka/frames.dm @@ -77,6 +77,23 @@ installed_barrel = /obj/item/custom_ka_upgrade/barrels/barrel02 installed_upgrade_chip = /obj/item/custom_ka_upgrade/upgrade_chips/damage +/obj/item/gun/custom_ka/exosuit + name = "exosuit kinetic accelerator" + build_name = "exosuit compatible" + icon_state = "frame_cyborg" + desc = "A kinetic accelerator frame meant for exosuits. Uses an exosuit's internal charge as power." + w_class = WEIGHT_CLASS_HUGE + recoil_increase = -10 + capacity_increase = 100 + mod_limit_increase = 100 + origin_tech = list() + can_disassemble_cell = FALSE + cyborg_maptext_override = TRUE + + installed_cell = /obj/item/custom_ka_upgrade/cells/exosuit + installed_barrel = /obj/item/custom_ka_upgrade/barrels/barrel04 + installed_upgrade_chip = /obj/item/custom_ka_upgrade/upgrade_chips/explosive/exosuit + /obj/item/gun/custom_ka/frameA name = "vented kinetic accelerator frame" build_name = "vented" diff --git a/code/modules/custom_ka/upgrade_chips.dm b/code/modules/custom_ka/upgrade_chips.dm index 5af8aeeff7e..df9125c1036 100644 --- a/code/modules/custom_ka/upgrade_chips.dm +++ b/code/modules/custom_ka/upgrade_chips.dm @@ -52,6 +52,14 @@ cost_increase = 5 aoe_increase = 2 +/obj/item/custom_ka_upgrade/upgrade_chips/explosive/exosuit + name = "upgrade chip - aoe explosion EXO" + desc = "Kinetic blasts explode in a massively increased AoE radius at significantly increased power drain per shot, leveraging the exosuit's internal power core to sustain itself." + icon_state = "upgrade_chip" + cost_increase = 10 + aoe_increase = 4 + range_increase = 2 + /obj/item/custom_ka_upgrade/upgrade_chips/illegal name = "illegal custom KA upgrade chip" desc = "Overrides safety settings for a custom kinetic accelerator. What's the worst that could happen?" diff --git a/code/modules/heavy_vehicle/equipment/mining.dm b/code/modules/heavy_vehicle/equipment/mining.dm index 2d83b99f567..b7e30e43abb 100644 --- a/code/modules/heavy_vehicle/equipment/mining.dm +++ b/code/modules/heavy_vehicle/equipment/mining.dm @@ -84,3 +84,37 @@ brace.dropInto(get_turf(src)) held_braces -= brace . = ..() + +ABSTRACT_TYPE(/obj/item/mecha_equipment/mounted_system/mining) + name = "mounted mining equipment" + desc = DESC_PARENT + icon_state = "mecha_taser" + restricted_hardpoints = list(HARDPOINT_LEFT_HAND, HARDPOINT_RIGHT_HAND, HARDPOINT_LEFT_SHOULDER, HARDPOINT_RIGHT_SHOULDER) + restricted_software = list(MECH_SOFTWARE_UTILITY) + +/obj/item/mecha_equipment/mounted_system/mining/kinetic_accelerator + name = "mounted heavy kinetic accelerator" + desc = "A heavy-duty kinetic accelerator designed to be mounted on an exosuit." + icon_state = "mecha_taser" // would be too difficult to get a proper sprite for this, would rather just get it in + holding_type = /obj/item/gun/custom_ka/exosuit + +/obj/item/mecha_equipment/mounted_system/mining/kinetic_accelerator/get_hardpoint_status_value() + if(!holding) + return null + + var/obj/item/gun/custom_ka/exosuit/exosuit_ka = holding + if(!exosuit_ka.installed_cell) + return null + + return exosuit_ka.installed_cell.stored_charge / exosuit_ka.installed_cell.cell_increase + + +/obj/item/mecha_equipment/mounted_system/mining/kinetic_accelerator/get_hardpoint_maptext() + if(!holding) + return null + + var/obj/item/gun/custom_ka/exosuit/exosuit_ka = holding + if(!exosuit_ka.installed_cell) + return null + + return "[exosuit_ka.get_ammo()]/[exosuit_ka.installed_cell.cell_increase / exosuit_ka.cost_increase]" diff --git a/code/modules/heavy_vehicle/premade/miner.dm b/code/modules/heavy_vehicle/premade/miner.dm index 211a81dd44c..d84b035599b 100644 --- a/code/modules/heavy_vehicle/premade/miner.dm +++ b/code/modules/heavy_vehicle/premade/miner.dm @@ -10,6 +10,7 @@ h_l_hand = /obj/item/mecha_equipment/drill h_r_hand = /obj/item/mecha_equipment/clamp + h_l_shoulder = /obj/item/mecha_equipment/mounted_system/mining/kinetic_accelerator /mob/living/heavy_vehicle/premade/miner/remote name = "remote mining mecha" diff --git a/code/modules/research/designs/mechfab/mechs/designs_exosuit_equipment.dm b/code/modules/research/designs/mechfab/mechs/designs_exosuit_equipment.dm index 7b19d6f2148..66a514dfba9 100644 --- a/code/modules/research/designs/mechfab/mechs/designs_exosuit_equipment.dm +++ b/code/modules/research/designs/mechfab/mechs/designs_exosuit_equipment.dm @@ -149,3 +149,8 @@ . = ..() desc += " It needs an anomaly core to function, however." +/datum/design/item/mechfab/exosuit_equipment/kinetic_accelerator + name = "Mounted Heavy Kinetic Accelerator" + materials = list(MATERIAL_STEEL = 25000, MATERIAL_GLASS = 5000) + req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_POWER = 3) + build_path = /obj/item/mecha_equipment/mounted_system/mining/kinetic_accelerator diff --git a/html/changelogs/geeves-mech_ka.yml b/html/changelogs/geeves-mech_ka.yml new file mode 100644 index 00000000000..1e9884dcddd --- /dev/null +++ b/html/changelogs/geeves-mech_ka.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added an exosuit compatible kinetic accelerator, capable of clearing vast swathes of mineable walls. Machinists can print them at a steep steel cost, and the mining mech dropped from the dropper comes with it equipped."