mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Add Somatoray Mode to Remove Reagents (#10210)
Co-authored-by: NickBelmont <89628295+NickBelmont@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8848b31f37
commit
704dab9d46
@@ -245,6 +245,17 @@
|
||||
if(prob(mutchance))
|
||||
yield_mod = min(10,yield_mod+rand(1,2))
|
||||
return
|
||||
else if(istype(Proj, /obj/item/projectile/energy/floraprune))
|
||||
var/obj/item/projectile/energy/floraprune/GP = Proj
|
||||
mutchance *= GP.lasermod
|
||||
if(prob(mutchance) && seed)
|
||||
var/c = safepick(seed.chems)
|
||||
if(length(seed.chems) > 1 && c)
|
||||
var/turf/T = get_turf(loc)
|
||||
seed = seed.diverge()
|
||||
T.visible_message(span_infoplain(span_bold("\The [seed.display_name]") + " quivers!"))
|
||||
seed.chems -= c
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
list(mode_name="induce mutations", projectile_type=/obj/item/projectile/energy/floramut, modifystate="floramut"),
|
||||
list(mode_name="increase yield", projectile_type=/obj/item/projectile/energy/florayield, modifystate="florayield"),
|
||||
list(mode_name="induce specific mutations", projectile_type=/obj/item/projectile/energy/floramut/gene, modifystate="floramut"),
|
||||
list(mode_name="prune reagents", projectile_type=/obj/item/projectile/energy/floraprune, modifystate="floramut"),
|
||||
)
|
||||
|
||||
/obj/item/gun/energy/floragun/Initialize()
|
||||
@@ -126,6 +127,7 @@
|
||||
var/obj/item/projectile/energy/floramut/gene/G = .
|
||||
var/obj/item/projectile/energy/florayield/GY = .
|
||||
var/obj/item/projectile/energy/floramut/GM = .
|
||||
var/obj/item/projectile/energy/floraprune/GP = .
|
||||
// Inserting the upgrade level of the gun to the projectile as there isn't a better way to do this.
|
||||
if(istype(G))
|
||||
G.gene = gene
|
||||
@@ -134,6 +136,8 @@
|
||||
GY.lasermod = emitter.rating
|
||||
else if(istype(GM))
|
||||
GM.lasermod = emitter.rating
|
||||
else if(istype(GP))
|
||||
GP.lasermod = emitter.rating
|
||||
|
||||
/obj/item/gun/energy/meteorgun
|
||||
name = "meteor gun"
|
||||
|
||||
@@ -221,6 +221,32 @@
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/energy/floraprune
|
||||
name = "delta somatoray"
|
||||
icon_state = "energy2"
|
||||
fire_sound = 'sound/effects/stealthoff.ogg'
|
||||
damage = 0
|
||||
damage_type = TOX
|
||||
nodamage = 1
|
||||
check_armour = "energy"
|
||||
light_range = 2
|
||||
light_power = 0.5
|
||||
light_color = "#FFFFFF"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
||||
var/lasermod = 0
|
||||
hud_state = "electrothermal"
|
||||
|
||||
/obj/item/projectile/energy/floraprune/on_hit(var/atom/target, var/blocked = 0)
|
||||
var/mob/living/M = target
|
||||
if(ishuman(target)) //Make plantpeople thin, seeing as we're removing reagents from actual plants
|
||||
var/mob/living/carbon/human/H = M
|
||||
if((H.species.flags & IS_PLANT) && (M.nutrition > 30))
|
||||
M.adjust_nutrition(-30)
|
||||
else if (istype(target, /mob/living/carbon/))
|
||||
M.show_message(span_blue("The radiation beam dissipates harmlessly through your body."))
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/projectile/beam/mindflayer
|
||||
name = "flayer ray"
|
||||
|
||||
Reference in New Issue
Block a user