Skip to content

Commit

Permalink
Merge pull request #5935 from Trilbyspaceclone/slime_fixes
Browse files Browse the repository at this point in the history
fixes slime gun and makes feeding less exploitable
  • Loading branch information
Trilbyspaceclone authored Jan 29, 2025
2 parents 27781c6 + 75667a3 commit 4fb4847
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
8 changes: 5 additions & 3 deletions code/modules/mob/living/carbon/slime/powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
return "I cannot feed on other slimes..."
if (!Adjacent(M))
return "This subject is too far away..."
if (iscarbon(M) && M.getFireLoss() >= M.maxHealth * 1.5 || isanimal(M) && M.stat == DEAD)
//Dead things dont have life also overly burned do not as well, walking corps
if (M.getFireLoss() >= M.maxHealth * 1.5 || M.stat == DEAD)
return "This subject does not have an edible life energy..."
for(var/mob/living/carbon/slime/met in view())
if(met.Victim == M && met != src)
Expand All @@ -44,9 +45,10 @@

if(iscarbon(M))
Victim.adjustFireLoss(rand(5,6))
Victim.adjustToxLoss(rand(1,2))
Victim.adjustCloneLoss(rand(6,8))
if(Victim.health <= 0)
Victim.adjustToxLoss(rand(2,4))
Victim.adjustCloneLoss(rand(8,12))
Victim.adjustFireLoss(rand(10,12))

else if(isanimal(M))
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/slime/slime.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@
/mob/living/carbon/slime/bullet_act(var/obj/item/projectile/Proj)
if (!(Proj.testing))
attacked += 10
//Fast return for this as we always hit and always kill
if(istype(Proj, /obj/item/projectile/slime_death))
death() //We just die
return TRUE
..(Proj)
if (!(Proj.testing))
handle_regular_status_updates()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/energy/misc/slimegun.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/item/gun/energy/slimegun
name = "\"Ranch\" core stopper gun"
desc = "A gun suited for dealing with slime outbreaks, due to many safety innovations the beam will be harmless for anything other than slime lifeforms. \
desc = "A gun suited for dealing with slime outbreaks, due to many safety innovations the beam will be harmless for anything other than simple slime lifeforms. \
When hitting a slime, the beam will directly attack its core, shutting it down for an instantaneous death while keeping it intact for harvesting. Due to its small design it only takes small cells."
icon = 'icons/obj/guns/energy/slimegun.dmi'
icon_state = "slimepistol"
Expand Down
8 changes: 0 additions & 8 deletions code/modules/projectiles/projectile/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,6 @@
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
hitscan = FALSE

/obj/item/projectile/slime_death/on_impact(atom/target)//These two could likely check temp protection on the mob
if (!testing)
if(isliving(target))
if(isslime(target))
var/mob/living/carbon/slime/cute = target
nodamage = FALSE
cute.death() // The cute slime dies.

/obj/item/projectile/meteor
name = "meteor"
icon = 'icons/obj/meteor.dmi'
Expand Down

0 comments on commit 4fb4847

Please sign in to comment.