mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
[MIRROR] Patches gene shears click stack exploit (#2828)
* Patches gene shears click stack exploit (#56301) Fixes #55390 by checking the plant's heath again after the input is done and before the gene is removed. I'm not sure if it's the cleanest way to get around stacking inputs to exploit the health, but it works? * Patches gene shears click stack exploit Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
@@ -657,7 +657,7 @@
|
||||
if(!myseed)
|
||||
to_chat(user, "<span class='notice'>The tray is empty.</span>")
|
||||
return
|
||||
if(plant_health <= 15)
|
||||
if(plant_health <= GENE_SHEAR_MIN_HEALTH)
|
||||
to_chat(user, "<span class='notice'>This plant looks too unhealty to be sheared right now.</span>")
|
||||
return
|
||||
|
||||
@@ -673,6 +673,10 @@
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(!myseed)
|
||||
return
|
||||
if(plant_health <= GENE_SHEAR_MIN_HEALTH) //Check health again to make sure they're not keeping inputs open to get free shears.
|
||||
return
|
||||
for(var/datum/plant_gene/gene in myseed.genes)
|
||||
if(gene.name == removed_trait)
|
||||
if(myseed.genes.Remove(gene))
|
||||
|
||||
Reference in New Issue
Block a user