mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Adds Gene Targetting mode to Floral Somatoray
While I was rooting around in hydroponics code, I saw that a list was being regenerated with UI interaction, so I threw the list into the plant controller. No proper sprites for the Floral Somatoray's new mode yet, but it uses the gun sprite from mutate mode, and the projectile sprite from yield mode.
This commit is contained in:
@@ -44,10 +44,12 @@
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3)
|
||||
modifystate = "floramut"
|
||||
self_recharge = 1
|
||||
var/decl/plantgene/gene = null
|
||||
|
||||
firemodes = list(
|
||||
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"),
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/energy/floragun/afterattack(obj/target, mob/user, adjacent_flag)
|
||||
@@ -58,6 +60,28 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/floragun/verb/select_gene()
|
||||
set name = "Select Gene"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
var/genemask = input("Choose a gene to modify.") as null|anything in plant_controller.plant_gene_datums
|
||||
|
||||
if(!genemask)
|
||||
return
|
||||
|
||||
gene = plant_controller.plant_gene_datums[genemask]
|
||||
|
||||
to_chat(usr, "<span class='info'>You set the [src]'s targeted genetic area to [genemask].</span>")
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/floragun/consume_next_projectile()
|
||||
. = ..()
|
||||
var/obj/item/projectile/energy/floramut/gene/G = .
|
||||
if(istype(G))
|
||||
G.gene = gene
|
||||
|
||||
/obj/item/weapon/gun/energy/meteorgun
|
||||
name = "meteor gun"
|
||||
desc = "For the love of god, make sure you're aiming this the right way!"
|
||||
|
||||
@@ -121,6 +121,15 @@
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/energy/floramut/gene
|
||||
name = "gamma somatoray"
|
||||
icon_state = "energy2"
|
||||
damage = 0
|
||||
damage_type = TOX
|
||||
nodamage = 1
|
||||
check_armour = "energy"
|
||||
var/decl/plantgene/gene = null
|
||||
|
||||
/obj/item/projectile/energy/florayield
|
||||
name = "beta somatoray"
|
||||
icon_state = "energy2"
|
||||
|
||||
Reference in New Issue
Block a user