From 980c3205157aed8d66f354687f67c17bee411c3d Mon Sep 17 00:00:00 2001 From: Changelogs Date: Mon, 25 Sep 2023 00:46:29 +0000 Subject: [PATCH 1/3] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-2368.yml | 8 -------- html/changelogs/archive/2023-09.yml | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-2368.yml diff --git a/html/changelogs/AutoChangeLog-pr-2368.yml b/html/changelogs/AutoChangeLog-pr-2368.yml deleted file mode 100644 index bb7868d63fb8..000000000000 --- a/html/changelogs/AutoChangeLog-pr-2368.yml +++ /dev/null @@ -1,8 +0,0 @@ -author: retlaw34, Ebin-Halcyon, triplezeta -delete-after: true -changes: - - rscadd: IRMG Pointman hardsuit, admin only at the moment - - rscadd: Resprites and reworks the Cybersun hardsuit a little - - rscadd: Cybersun Medical technician hardsuit - - rscdel: Old cybersun hardsuit, It was unused anyways - - tweak: Extremely minor Blood red hardsuit sprite tweaks diff --git a/html/changelogs/archive/2023-09.yml b/html/changelogs/archive/2023-09.yml index 1de0aaf70c4a..4a25453990fd 100644 --- a/html/changelogs/archive/2023-09.yml +++ b/html/changelogs/archive/2023-09.yml @@ -138,3 +138,10 @@ 2023-09-23: Apogee-dev: - tweak: Removed RnD from the Colossus and updated its looks +2023-09-25: + retlaw34, Ebin-Halcyon, triplezeta: + - rscadd: IRMG Pointman hardsuit, admin only at the moment + - rscadd: Resprites and reworks the Cybersun hardsuit a little + - rscadd: Cybersun Medical technician hardsuit + - rscdel: Old cybersun hardsuit, It was unused anyways + - tweak: Extremely minor Blood red hardsuit sprite tweaks From 10850cb83006c1b49101896577f87024d7bba43c Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Mon, 25 Sep 2023 13:46:27 -0500 Subject: [PATCH 2/3] Fixes radiation runtime and firebot GC (#2364) ## About The Pull Request Fixes a spurious runtime on checks related to anomalies and radiation, and makes firebots not hang onto references to targets. ## Why It's Good For The Game I will fix these test fails one at a time just you watch me ## Changelog :cl: tweak: Firebots now extinguish turf fires. /:cl: --- code/__DEFINES/statpanel.dm | 2 - code/datums/map_zones.dm | 2 +- .../effects/anomalies/anomalies_heartbeat.dm | 3 + .../mob/living/simple_animal/bot/firebot.dm | 64 +++++++++++-------- 4 files changed, 40 insertions(+), 31 deletions(-) diff --git a/code/__DEFINES/statpanel.dm b/code/__DEFINES/statpanel.dm index 65b35e7654a2..8ce6ba624a1b 100644 --- a/code/__DEFINES/statpanel.dm +++ b/code/__DEFINES/statpanel.dm @@ -11,6 +11,4 @@ GLOBAL_LIST_INIT(client_verbs_required, list( /client/verb/forum, /client/verb/github, /client/verb/joindiscord, - // Admin help - /client/verb/adminhelp, )) diff --git a/code/datums/map_zones.dm b/code/datums/map_zones.dm index b0f13fe19302..c50b93cb2dd7 100644 --- a/code/datums/map_zones.dm +++ b/code/datums/map_zones.dm @@ -412,7 +412,7 @@ unlink(dir) parent_level.virtual_levels -= src parent_level = null - SSidlenpcpool.idle_mobs_by_virtual_level["[id]"] = null + LAZYREMOVE(SSidlenpcpool.idle_mobs_by_virtual_level, "[id]") SSmapping.virtual_z_translation -= "[id]" parent_map_zone.remove_virtual_level(src) if(up_linkage) diff --git a/code/game/objects/effects/anomalies/anomalies_heartbeat.dm b/code/game/objects/effects/anomalies/anomalies_heartbeat.dm index 33a2983fcff4..1b691d898436 100644 --- a/code/game/objects/effects/anomalies/anomalies_heartbeat.dm +++ b/code/game/objects/effects/anomalies/anomalies_heartbeat.dm @@ -24,6 +24,9 @@ COOLDOWN_START(src, pulse_secondary_cooldown, pulse_delay*4) var/turf/spot = locate(rand(src.x-effectrange, src.x+effectrange), rand(src.y-effectrange, src.y+effectrange), src.z) + if(!spot) + return + playsound(spot, 'sound/health/slowbeat2.ogg', 100) radiation_pulse(spot, 200, effectrange) for(var/mob/living/carbon/nearby in range(effectrange, spot)) diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm index 4bfa9dd98a6c..ba8eafba9010 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -23,8 +23,8 @@ window_name = "Mobile Fire Extinguisher v1.0" path_image_color = "#FFA500" - var/atom/target_fire - var/atom/old_target_fire + var/datum/weakref/target_fire_ref + var/datum/weakref/old_target_fire_ref var/obj/item/extinguisher/internal_ext @@ -106,15 +106,15 @@ /mob/living/simple_animal/bot/firebot/bot_reset() ..() - target_fire = null - old_target_fire = null + target_fire_ref = null + old_target_fire_ref = null ignore_list = list() anchored = FALSE update_appearance() /mob/living/simple_animal/bot/firebot/proc/soft_reset() path = list() - target_fire = null + target_fire_ref = null mode = BOT_IDLE last_found = world.time update_appearance() @@ -149,7 +149,7 @@ audible_message("[src] buzzes oddly!") playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) if(user) - old_target_fire = user + old_target_fire_ref = WEAKREF(user) extinguish_fires = FALSE extinguish_people = TRUE @@ -184,7 +184,7 @@ else if(isturf(target)) var/turf/open/T = target - if(T.active_hotspot) + if(T.active_hotspot || T.turf_fire) return TRUE return FALSE @@ -194,12 +194,12 @@ return if(IsStun() || IsParalyzed()) - old_target_fire = target_fire - target_fire = null + old_target_fire_ref = target_fire_ref + target_fire_ref = null mode = BOT_IDLE return - if(prob(1) && target_fire == null) + if(prob(1) && !target_fire_ref) var/list/messagevoice = list("No fires detected." = 'sound/voice/firebot/nofires.ogg', "Only you can prevent station fires." = 'sound/voice/firebot/onlyyou.ogg', "Temperature nominal." = 'sound/voice/firebot/tempnominal.ogg', @@ -210,24 +210,39 @@ // Couldn't reach the target, reset and try again ignoring the old one if(frustration > 8) - old_target_fire = target_fire + old_target_fire_ref = target_fire_ref soft_reset() + var/atom/target_fire = target_fire_ref?.resolve() + // We extinguished our target or it was deleted if(QDELETED(target_fire) || !is_burning(target_fire) || isdead(target_fire)) target_fire = null + target_fire_ref = null var/scan_range = (stationary_mode ? 1 : DEFAULT_SCAN_RANGE) + var/old_target_fire = old_target_fire_ref?.resolve() if(extinguish_people) target_fire = scan(/mob/living, old_target_fire, scan_range) // Scan for burning humans first + target_fire_ref = WEAKREF(target_fire) - if(target_fire == null && extinguish_fires) + if(!target_fire && extinguish_fires) target_fire = scan(/turf/open, old_target_fire, scan_range) // Scan for burning turfs second + target_fire_ref = WEAKREF(target_fire) - old_target_fire = target_fire + old_target_fire_ref = target_fire_ref + + if(!target_fire) + if(auto_patrol) + if(mode == BOT_IDLE || mode == BOT_START_PATROL) + start_patrol() + + if(mode == BOT_PATROL) + bot_patrol() + return // Target reached ENGAGE WATER CANNON - if(target_fire && (get_dist(src, target_fire) <= (emagged == 2 ? 1 : 2))) // Make the bot spray water from afar when not emagged + if(get_dist(src, target_fire) <= (emagged == 2 ? 1 : 2)) // Make the bot spray water from afar when not emagged if((speech_cooldown + SPEECH_INTERVAL) < world.time) if(ishuman(target_fire)) speak("Stop, drop and roll!") @@ -243,39 +258,32 @@ soft_reset() // Target ran away - else if(target_fire && path.len && (get_dist(target_fire,path[path.len]) > 2)) + else if(length(path) && (get_dist(target_fire, path[length(path)]) > 2)) path = list() mode = BOT_IDLE last_found = world.time - else if(target_fire && stationary_mode) + else if(stationary_mode) soft_reset() return - if(target_fire && (get_dist(src, target_fire) > 2)) + if(get_dist(src, target_fire) > 2) path = get_path_to(src, get_turf(target_fire), /turf/proc/Distance_cardinal, 0, 30, 1, id=access_card) mode = BOT_MOVING - if(!path.len) + if(!length(path)) soft_reset() - if(path.len > 0 && target_fire) + if(length(path)) if(!bot_move(path[path.len])) - old_target_fire = target_fire + old_target_fire_ref = target_fire_ref soft_reset() return // We got a target but it's too far away from us - if(path.len > 8 && target_fire) + if(length(path) > 8) frustration++ - if(auto_patrol && !target_fire) - if(mode == BOT_IDLE || mode == BOT_START_PATROL) - start_patrol() - - if(mode == BOT_PATROL) - bot_patrol() - //Look for burning people or turfs around the bot /mob/living/simple_animal/bot/firebot/process_scan(atom/scan_target) From 30710b8a6956cfce6b1e9cc47e1d30abb3700a6f Mon Sep 17 00:00:00 2001 From: Changelogs Date: Mon, 25 Sep 2023 14:16:21 -0500 Subject: [PATCH 3/3] Automatic changelog generation for PR #2364 [ci skip] --- html/changelogs/AutoChangeLog-pr-2364.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-2364.yml diff --git a/html/changelogs/AutoChangeLog-pr-2364.yml b/html/changelogs/AutoChangeLog-pr-2364.yml new file mode 100644 index 000000000000..5179e7187687 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2364.yml @@ -0,0 +1,4 @@ +author: MarkSuckerberg +delete-after: true +changes: + - tweak: Firebots now extinguish turf fires.