diff --git a/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon.dm b/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon.dm new file mode 100644 index 0000000000..cc8240b9af --- /dev/null +++ b/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon.dm @@ -0,0 +1,59 @@ +//Why is this in here when it's not a subtype of cell_loaded? Because it has a similar function, and I couldn't be assed to find a better suited spot. + +/obj/item/weapon/gun/projectile/multi_cannon + name = "Curabitur Cannon" + desc = "A cannon developed by Curabitur Scimed, this weapon incorporates both Vey-Med and precursor technology to create a medical alternative to chemicals on the field." + icon = 'icons/vore/custom_guns_vr.dmi' + icon_state = "healcannon" + + description_info = "Created to fulfill the needs and wants of the Curabitur Scimed personell during rescue operations, the Healcannon is a marvel of reverse-engineering and utilization of unknown technologies. \ + It makes use of the Vey-Med ML-3 'Medigun' microbattery technology, combining the effects of multiple 'microbatteries' into single 'macrobatteries' that are built around precursor void cores, \ + allowing for the batteries to self-charge for prolonged field use. However, the weakened beams caused by the use of ununderstood technology created a need for a VERY strong focus, \ + which lead to the Healcannon becoming a very bulky tool. Fortunately, it's not as heavy as it looks." + + w_class = ITEMSIZE_LARGE + load_method = SINGLE_CASING + max_shells = 1 + handle_casings = HOLD_CASINGS + auto_eject = FALSE + caliber = "macrobat" + icon_override = 'icons/vore/custom_guns_vr.dmi' + item_state = "multicannon" + slot_flags = SLOT_BACK + +/obj/item/weapon/gun/projectile/multi_cannon/update_icon() + . = ..() + cut_overlays() + var/istate = "healcannon_0" + var/indicator_colour = null + if(istype(chambered,/obj/item/ammo_casing/macrobattery)) //should never not happen. but. you never, never know with this damn, cursed game. + var/obj/item/ammo_casing/macrobattery/bat = chambered + indicator_colour = bat.bat_colour + if(bat.charge) + istate = "healcannon_20" + var/percent_charged = round((bat.charge/bat.max_charge)*100) + switch(percent_charged) + if(21 to 40) + istate = "healcannon_40" + if(41 to 60) + istate = "healcannon_60" + if(61 to 80) + istate = "healcannon_80" + if(81 to INFINITY)//gotta cover any admemes/other ways to get above max charge here. + istate = "healcannon_100" + else + indicator_colour = null + + var/image/x = image(icon = icon, icon_state = istate) + x.color = indicator_colour + add_overlay(x) + +/obj/item/weapon/gun/projectile/multi_cannon/load_ammo() + .=..() + consume_next_projectile() + update_icon() + +/obj/item/weapon/gun/projectile/multi_cannon/unload_ammo(mob/user, var/allow_dump=1) + .=..() + update_icon() + chambered = null \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon_cells.dm b/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon_cells.dm new file mode 100644 index 0000000000..3df1ef5022 --- /dev/null +++ b/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon_cells.dm @@ -0,0 +1,100 @@ +/obj/item/ammo_casing/macrobattery + caliber = "macrobat" + name = "macrobattery" + icon = 'icons/obj/ammo_vr.dmi' + icon_state = "macrobat_wtf" + desc = "A large nanite fabricator for a medigun. Powered by a mix of precursor and modern tech, this fancy device recharges without an outside power source." + + projectile_type = /obj/item/projectile/beam/chain_lightning //why the hell not + + var/bat_colour = "#ff33cc" + var/charge + var/max_charge = 10 + var/ticks = 1 + var/ticks_to_charge = 5 //10 secs per shot charged + +/obj/item/ammo_casing/macrobattery/Initialize(mapload, ...) + . = ..() + START_PROCESSING(SSobj, src) + charge = max_charge + +/obj/item/ammo_casing/macrobattery/Destroy() + STOP_PROCESSING(SSobj, src) + . = ..() + +/obj/item/ammo_casing/macrobattery/process() + ticks++ + if(ticks%ticks_to_charge == 0) + recharge() + if(charge >= max_charge) + return PROCESS_KILL + +/obj/item/ammo_casing/macrobattery/expend() + if(charge) + charge -- + ticks = 1 //so we have to start over on the charge time. + START_PROCESSING(SSobj, src) + . = BB + //alright, the below seems jank. it IS jank, but for whatever reason I can't reuse BB. big bad + BB = null + BB = new projectile_type + return + else + BB = null + return null + +/obj/item/ammo_casing/macrobattery/proc/recharge() + if(charge < max_charge) + charge ++ + if(!BB) + BB = new projectile_type + if(charge >= max_charge) + STOP_PROCESSING(SSobj, src) + if(istype(loc,/obj/item/weapon/gun/projectile/multi_cannon)) + loc.update_icon() + +//variants here, there's not many of them. + +/obj/item/ammo_casing/macrobattery/stabilize + name = "Macrobattery - STABILIZE" + icon_state = "macrobat_stabilize" + bat_colour = "#3399ff" + projectile_type = /obj/item/projectile/beam/medical_cell/stabilize2 + +/obj/item/ammo_casing/macrobattery/buff + name = "Macrobattery - BOOSTER" + icon_state = "macrobat_uber" + bat_colour = "#993300" + projectile_type = /obj/item/projectile/beam/medical_cell/resist + +/obj/item/ammo_casing/macrobattery/detox + name = "Macrobattery - DETOX" + icon_state = "macrobat_purifier" + bat_colour = "#339933" + projectile_type = /obj/item/projectile/beam/medical_cell/detox + +/obj/item/ammo_casing/macrobattery/ouchie + name = "Macrobattery - LETHAL" + icon_state = "macrobat_ouchie" + bat_colour = "#cc3300" + projectile_type = /obj/item/projectile/beam + +/obj/item/ammo_casing/macrobattery/healie + name = "Macrobattery - RESTORE" + icon_state = "macrobat_inverseouchie" + bat_colour = "#ff9966" + projectile_type = /obj/item/projectile/beam/medical_cell/phys_heal + +/obj/item/projectile/beam/medical_cell/phys_heal/on_hit(var/mob/living/carbon/human/target) + if(istype(target, /mob/living/carbon/human)) + target.adjustBruteLoss(-20) + target.adjustFireLoss(-20) + else + return 1 + +/obj/item/projectile/beam/medical_cell/detox/on_hit(var/mob/living/carbon/human/target) + if(istype(target, /mob/living/carbon/human)) + target.adjustToxLoss(-15) + target.radiation = max(target.radiation - 75, 0) //worse than mlem for rad, better for tox. + else + return 1 \ No newline at end of file diff --git a/icons/obj/ammo_vr.dmi b/icons/obj/ammo_vr.dmi index b3d64a736b..4d823c7542 100644 Binary files a/icons/obj/ammo_vr.dmi and b/icons/obj/ammo_vr.dmi differ diff --git a/icons/vore/custom_guns_vr.dmi b/icons/vore/custom_guns_vr.dmi index d4252110d3..05c146446d 100644 Binary files a/icons/vore/custom_guns_vr.dmi and b/icons/vore/custom_guns_vr.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 64714d7c56..e0eb9f8466 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1630,9 +1630,9 @@ #include "code\modules\ai\ai_holder_targeting_vr.dm" #include "code\modules\ai\interfaces.dm" #include "code\modules\ai\say_list.dm" -#include "code\modules\ai\ai_holder_subtypes\simple_mob_ai.dm" -#include "code\modules\ai\ai_holder_subtypes\simple_mob_ai_vr.dm" -#include "code\modules\ai\ai_holder_subtypes\slime_xenobio_ai.dm" +#include "code\modules\ai\aI_holder_subtypes\simple_mob_ai.dm" +#include "code\modules\ai\aI_holder_subtypes\simple_mob_ai_vr.dm" +#include "code\modules\ai\aI_holder_subtypes\slime_xenobio_ai.dm" #include "code\modules\alarm\alarm.dm" #include "code\modules\alarm\alarm_handler.dm" #include "code\modules\alarm\atmosphere_alarm.dm" @@ -3093,6 +3093,8 @@ #include "code\modules\projectiles\guns\energy\cell_loaded_vr\cell_loaded.dm" #include "code\modules\projectiles\guns\energy\cell_loaded_vr\ml3m.dm" #include "code\modules\projectiles\guns\energy\cell_loaded_vr\ml3m_cells.dm" +#include "code\modules\projectiles\guns\energy\cell_loaded_vr\multi_cannon.dm" +#include "code\modules\projectiles\guns\energy\cell_loaded_vr\multi_cannon_cells.dm" #include "code\modules\projectiles\guns\energy\cell_loaded_vr\nsfw.dm" #include "code\modules\projectiles\guns\energy\cell_loaded_vr\nsfw_cells.dm" #include "code\modules\projectiles\guns\launcher\crossbow.dm"