diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 734e5b201e4..9dc331b4afe 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -188,15 +188,17 @@ SHOULD_NOT_SLEEP(TRUE) overlays.Cut() - var/growth = 0 - if(growth_threshold) - growth = min(max_growth, round(health/growth_threshold)) + var/effective_max = max_growth var/at_fringe = get_dist(src,parent) if(spread_distance > 5) if(at_fringe >= (spread_distance-3)) - max_growth-- + effective_max-- if(at_fringe >= (spread_distance-2)) - max_growth-- + effective_max-- + + var/growth = 0 + if(growth_threshold) + growth = min(effective_max, round(health/growth_threshold)) var/image/our_icon = seed.get_icon(growth) @@ -205,7 +207,7 @@ AddOverlays(our_icon) - if(growth>2 && growth == max_growth) + if(growth>2 && growth == effective_max) layer = (seed && seed.force_layer) ? seed.force_layer : 5 if(growth_type in list(GROWTH_VINES,GROWTH_BIOMASS)) opacity = 1 diff --git a/html/changelogs/hellfirejag-vines-bugfix.yml b/html/changelogs/hellfirejag-vines-bugfix.yml new file mode 100644 index 00000000000..ff64a418ccf --- /dev/null +++ b/html/changelogs/hellfirejag-vines-bugfix.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Fixed vines spamming runtime errors after they are 'damaged' by a player."