From 5ab0752975e95eed813a5599104f4c4555bea299 Mon Sep 17 00:00:00 2001 From: Dip Date: Mon, 9 Nov 2020 00:04:53 -0300 Subject: [PATCH 1/2] Prevents slimes from attacking other slimes + Fixes invincible runtime --- code/modules/mob/living/living_defense.dm | 7 ++++++- code/modules/mob/living/simple_animal/friendly/cat.dm | 10 +++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 89695cce..dce2cbbd 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -294,7 +294,12 @@ if(!SSticker.HasRoundStarted()) to_chat(M, "You cannot attack people before the game has started.") return - +//Hyperstation Edit + if(istype(src, /mob/living/simple_animal/slime)) + M.visible_message("[M] boops \the [src].","You boop \the [src].") + //This was made to prevent sentient slime players from exploting removing infinite nutrient from other slimes. + return +//End of hyperstation edit if(M.buckled) if(M in buckled_mobs) M.Feedstop() diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index ea916dc9..a66abfdc 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -113,30 +113,26 @@ icon_dead = "original_dead" //Read_Memory() . = ..() - +/* /mob/living/simple_animal/pet/cat/Runtime/Life() - /* if(!cats_deployed && SSticker.current_state >= GAME_STATE_SETTING_UP) Deploy_The_Cats() if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved) Write_Memory() memory_saved = TRUE - */ ..() - +*/ /mob/living/simple_animal/pet/cat/Runtime/make_babies() var/mob/baby = ..() if(baby) children += baby return baby - -/mob/living/simple_animal/pet/cat/Runtime/death() /* +/mob/living/simple_animal/pet/cat/Runtime/death() if(!memory_saved) Write_Memory(TRUE) ..() */ - /mob/living/simple_animal/pet/cat/Runtime/proc/Read_Memory() if(fexists("data/npc_saves/Runtime.sav")) //legacy compatability to convert old format to new var/savefile/S = new /savefile("data/npc_saves/Runtime.sav") From 3f5d4fe6d5daf2734f28a95f62827f1baf7fba6a Mon Sep 17 00:00:00 2001 From: Dip Date: Mon, 9 Nov 2020 00:23:07 -0300 Subject: [PATCH 2/2] Right --- code/modules/mob/living/living_defense.dm | 7 +------ code/modules/mob/living/simple_animal/slime/slime.dm | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index dce2cbbd..89695cce 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -294,12 +294,7 @@ if(!SSticker.HasRoundStarted()) to_chat(M, "You cannot attack people before the game has started.") return -//Hyperstation Edit - if(istype(src, /mob/living/simple_animal/slime)) - M.visible_message("[M] boops \the [src].","You boop \the [src].") - //This was made to prevent sentient slime players from exploting removing infinite nutrient from other slimes. - return -//End of hyperstation edit + if(M.buckled) if(M in buckled_mobs) M.Feedstop() diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 023af30d..86e8d1ea 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -260,7 +260,7 @@ visible_message("[M] pulls [src] off!") return attacked += 5 - if(nutrition >= 100) //steal some nutrition. negval handled in life() + if(nutrition >= 100 && !istype(src, /mob/living/simple_animal/slime)) //steal some nutrition. negval handled in life() nutrition -= (50 + (40 * M.is_adult)) M.add_nutrition(50 + (40 * M.is_adult)) if(health > 0)