From 46b6bbaf74996c9d7ffc25125491e2293e136a1c Mon Sep 17 00:00:00 2001 From: VerySoft Date: Thu, 17 Feb 2022 07:36:53 -0500 Subject: [PATCH 1/2] Misc Tweaks Fixes a space vine runtime Makes it so space vines can't climb stairs (because that leads to practically unkillable stacks of vines that lag the server) Makes it so space vines can't grow on open space (because you usually can't kill vines if they're way out in open space and that doesn't make much sense anyway.) Attempts to limit the maximum range of plant bioluminescence (having hundreds or thousands of dynamic light sources with maximum possible light range seems to lag the server) Adds a funny dog that no one should ever actually spawn but I will one day as a joke and everyone will cry. (its base form is actually not hostile so if you kill that one the hell you earn will all be on you) --- .../atmoalter/portable_atmospherics.dm | 8 +-- code/modules/hydroponics/seed.dm | 15 ++++-- .../hydroponics/spreading/spreading.dm | 12 ++++- .../hydroponics/spreading/spreading_growth.dm | 13 ++++- code/modules/hydroponics/trays/tray_soil.dm | 4 ++ .../simple_mob/subtypes/vore/softdog.dm | 51 ++++++++++++++++++- code/modules/multiz/stairs.dm | 23 ++++++--- 7 files changed, 110 insertions(+), 16 deletions(-) diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index e51b4825cc0..6bdf71c5254 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -15,9 +15,11 @@ /obj/machinery/portable_atmospherics/New() ..() - - air_contents.volume = volume - air_contents.temperature = T20C + //VOREStation Edit - Fix runtime + if(air_contents) + air_contents.volume = volume + air_contents.temperature = T20C + //VOREStation Edit End return 1 diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 54e9b58cbf5..655aa012a01 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -190,7 +190,12 @@ var/clr if(get_trait(TRAIT_BIOLUM_COLOUR)) clr = get_trait(TRAIT_BIOLUM_COLOUR) - splat.set_light(get_trait(TRAIT_BIOLUM), l_color = clr) + //VOREStation Edit Start - Tons of super bright super long range lights everywhere is annoying and laggy, so let's limit it a bit. + var/blight = get_trait(TRAIT_BIOLUM) + if(blight >= 5) + blight = 5 + splat.set_light(blight, 0.5, l_color = clr) + //VOREStation Edit End var/flesh_colour = get_trait(TRAIT_FLESH_COLOUR) if(!flesh_colour) flesh_colour = get_trait(TRAIT_PRODUCT_COLOUR) if(flesh_colour) splat.color = get_trait(TRAIT_PRODUCT_COLOUR) @@ -836,8 +841,12 @@ var/clr if(get_trait(TRAIT_BIOLUM_COLOUR)) clr = get_trait(TRAIT_BIOLUM_COLOUR) - product.set_light(get_trait(TRAIT_BIOLUM), l_color = clr) - + //VOREStation Edit Start - Tons of super bright super long range lights everywhere is annoying and laggy, so let's limit it a bit. + var/blight = get_trait(TRAIT_BIOLUM) + if(blight >= 5) + blight = 5 + product.set_light(blight, 0.5, l_color = clr) + //VOREStation Edit End if(get_trait(TRAIT_STINGS)) product.force = 1 diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 393089ebff0..f1c92dd0818 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -77,6 +77,11 @@ spread_chance = 0 /obj/effect/plant/New(var/newloc, var/datum/seed/newseed, var/obj/effect/plant/newparent) + //VOREStation Edit Start + var/obj/structure/stairs/s + if(istype(loc, /turf/simulated/open) || s in loc) + qdel(src) + //VOREStation Edit End ..() if(!newparent) @@ -159,7 +164,12 @@ var/clr if(seed.get_trait(TRAIT_BIOLUM_COLOUR)) clr = seed.get_trait(TRAIT_BIOLUM_COLOUR) - set_light(1+round(seed.get_trait(TRAIT_POTENCY)/20), l_color = clr) + //VOREStation Edit Start - Tons of super bright super long range lights everywhere is annoying and laggy, so let's limit it a bit. + var/blight = 1+round(seed.get_trait(TRAIT_POTENCY)/20) + if(blight >= 5) + blight = 5 + set_light(blight, 0.5, l_color = clr) + //VOREStation Edit End return else set_light(0) diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm index eebcbc93892..ba17151793d 100644 --- a/code/modules/hydroponics/spreading/spreading_growth.dm +++ b/code/modules/hydroponics/spreading/spreading_growth.dm @@ -4,8 +4,12 @@ var/list/cardinal_neighbors = list() for(var/check_dir in cardinal) var/turf/simulated/T = get_step(get_turf(src), check_dir) - if(istype(T)) + //VOREStation Edit Start - Vines can go up/down stairs, but don't register that they have done this, so do so infinitely, which is annoying and laggy. + if(/obj/structure/stairs in check_dir) + continue + else if(istype(T) && !istype(check_dir, /turf/simulated/open)) //Let's not have them go on open space where you can't really get to them. cardinal_neighbors |= T + //VOREStation Edit End return cardinal_neighbors /obj/effect/plant/proc/update_neighbors() @@ -114,6 +118,13 @@ //spreading vines aren't created on their final turf. //Instead, they are created at their parent and then move to their destination. /obj/effect/plant/proc/spread_to(turf/target_turf) + //VOREStation Edit Start - Vines can go up/down stairs, but don't register that they have done this, so do so infinitely, which is annoying and laggy. + var/obj/structure/stairs/s + if(s in target_turf.contents) + return + if(istype(target_turf, /turf/simulated/open)) + return + //VOREStation Edit End var/obj/effect/plant/child = new(get_turf(src),seed,parent) spawn(1) // This should do a little bit of animation. diff --git a/code/modules/hydroponics/trays/tray_soil.dm b/code/modules/hydroponics/trays/tray_soil.dm index f396b00dbf3..4a9e37e30e7 100644 --- a/code/modules/hydroponics/trays/tray_soil.dm +++ b/code/modules/hydroponics/trays/tray_soil.dm @@ -41,6 +41,10 @@ icon_state = "blank" /obj/machinery/portable_atmospherics/hydroponics/soil/invisible/New(var/newloc,var/datum/seed/newseed) + //VOREStation Addition Start + if(istype(loc, /turf/simulated/open) || istype(loc, /turf/space)) + qdel(src) + //VOREStation Addition End ..() seed = newseed dead = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/softdog.dm b/code/modules/mob/living/simple_mob/subtypes/vore/softdog.dm index 97f5e636f5b..be4e903681e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/softdog.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/softdog.dm @@ -263,4 +263,53 @@ visible_message("[src] stops playing dead.", runemessage = "[src] stops playing dead") else M.visible_message("The petting was interrupted!!!", runemessage = "The petting was interrupted") - return \ No newline at end of file + return + +/mob/living/simple_mob/vore/woof/hostile/aweful + maxHealth = 100 + health = 100 + var/killswitch = FALSE + + +/mob/living/simple_mob/vore/woof/hostile/aweful/Initialize() + . = ..() + var/thismany = (rand(25,500)) / 100 + resize(thismany, animate = FALSE, uncapped = TRUE, ignore_prefs = TRUE) + +/mob/living/simple_mob/vore/woof/hostile/aweful/death() + . = ..() + if(killswitch) + visible_message("\The [src] evaporates into nothing...") + qdel(src) + return + var/thismany = rand(0,3) + var/list/possiblewoofs = list(/mob/living/simple_mob/vore/woof/hostile/aweful/melee, /mob/living/simple_mob/vore/woof/hostile/aweful/ranged) + if(thismany == 0) + visible_message("\The [src] evaporates into nothing...") + if(thismany >= 1) + var/thiswoof = pick(possiblewoofs) + new thiswoof(loc, src) + visible_message("Another [src] appears!") + if(thismany >= 2) + var/thiswoof = pick(possiblewoofs) + new thiswoof(loc, src) + visible_message("Another [src] appears!") + if(thismany >= 3) + var/thiswoof = pick(possiblewoofs) + new thiswoof(loc, src) + visible_message("Another [src] appears!") + qdel(src) + +/mob/living/simple_mob/vore/woof/hostile/aweful/melee + + movement_cooldown = 0 + + ai_holder_type = /datum/ai_holder/simple_mob/woof/hostile + +/mob/living/simple_mob/vore/woof/hostile/aweful/ranged + movement_cooldown = 0 + + ai_holder_type = /datum/ai_holder/simple_mob/ranged/kiting/threatening/woof + + projectiletype = /obj/item/projectile/awoo_missile + projectilesound = 'sound/voice/long_awoo.ogg' diff --git a/code/modules/multiz/stairs.dm b/code/modules/multiz/stairs.dm index 5ce4b2ec264..59e6374895c 100644 --- a/code/modules/multiz/stairs.dm +++ b/code/modules/multiz/stairs.dm @@ -148,10 +148,12 @@ // Or if we fell down the openspace if((top in oldloc) || oldloc == GetAbove(src)) return - + //VOREStation Addition Start + if(istype(AM, /obj/effect/plant)) + return + //VOREStation Addition End if(isobserver(AM)) // Ghosts have their own methods for going up and down return - if(AM.pulledby) // Animating the movement of pulled things is handled when the puller goes up the stairs return @@ -199,7 +201,10 @@ /obj/structure/stairs/bottom/use_stairs_instant(var/atom/movable/AM) if(isobserver(AM)) // Ghosts have their own methods for going up and down return - + //VOREStation Addition Start + if(istype(AM, /obj/effect/plant)) + return + //VOREStation Addition End if(isliving(AM)) var/mob/living/L = AM @@ -401,10 +406,12 @@ // Or if we climb up the middle if((bottom in oldloc) || oldloc == GetBelow(src)) return - + //VOREStation Addition Start + if(istype(AM, /obj/effect/plant)) + return + //VOREStation Addition End if(isobserver(AM)) // Ghosts have their own methods for going up and down return - if(AM.pulledby) // Animating the movement of pulled things is handled when the puller goes up the stairs return @@ -450,10 +457,12 @@ /obj/structure/stairs/top/use_stairs_instant(var/atom/movable/AM) if(isobserver(AM)) // Ghosts have their own methods for going up and down return - + //VOREStation Addition Start + if(istype(AM, /obj/effect/plant)) + return + //VOREStation Addition End if(isliving(AM)) var/mob/living/L = AM - if(L.grabbed_by.len) // Same as pulledby, whoever's holding you will keep you from going down stairs. return From ad936326c1631f14bdb6cbeb3af9e09a717d1958 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Thu, 17 Feb 2022 07:50:08 -0500 Subject: [PATCH 2/2] How about this? --- code/modules/hydroponics/spreading/spreading.dm | 3 +-- code/modules/hydroponics/spreading/spreading_growth.dm | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index f1c92dd0818..e820af130ed 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -78,8 +78,7 @@ /obj/effect/plant/New(var/newloc, var/datum/seed/newseed, var/obj/effect/plant/newparent) //VOREStation Edit Start - var/obj/structure/stairs/s - if(istype(loc, /turf/simulated/open) || s in loc) + if(istype(loc, /turf/simulated/open)) qdel(src) //VOREStation Edit End ..() diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm index ba17151793d..f85209884b0 100644 --- a/code/modules/hydroponics/spreading/spreading_growth.dm +++ b/code/modules/hydroponics/spreading/spreading_growth.dm @@ -5,9 +5,7 @@ for(var/check_dir in cardinal) var/turf/simulated/T = get_step(get_turf(src), check_dir) //VOREStation Edit Start - Vines can go up/down stairs, but don't register that they have done this, so do so infinitely, which is annoying and laggy. - if(/obj/structure/stairs in check_dir) - continue - else if(istype(T) && !istype(check_dir, /turf/simulated/open)) //Let's not have them go on open space where you can't really get to them. + if(istype(T) && !istype(check_dir, /turf/simulated/open)) //Let's not have them go on open space where you can't really get to them. cardinal_neighbors |= T //VOREStation Edit End return cardinal_neighbors @@ -119,9 +117,6 @@ //Instead, they are created at their parent and then move to their destination. /obj/effect/plant/proc/spread_to(turf/target_turf) //VOREStation Edit Start - Vines can go up/down stairs, but don't register that they have done this, so do so infinitely, which is annoying and laggy. - var/obj/structure/stairs/s - if(s in target_turf.contents) - return if(istype(target_turf, /turf/simulated/open)) return //VOREStation Edit End