mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #7644 from TeleTubby2/bazingabeamnatje
Adds Natje's Curabitur Cannon
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user