-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] Bioscrambler Anomaly chases you (#2889)
* Bioscrambler Anomaly chases you (#82555) ## About The Pull Request I heard reports that people just ignore the bioscrambler anomaly because basically you just don't go into that room any more and depending on where it spawned, that's no big deal. That won't do. Now the Bioscrambler will be attracted to the nearest sign of advanced thinking life (read: nearest humanoid mob controlled by a player) and will very slowly pursue them, travelling through walls and obstacles in order to do so. Also if it decides to target you, you will get a foreboding psychic warning like with the dark matteor, because I think it's funny for dire warnings to have multiple obscuring sources. The Bioscrambler can be blocked with containment fields if you want to make an overly-elaborate pen for it. To accomplish this I refactored containment fields a little bit to apply turf traits instead of making four different `locate()` checks for different objects. Those files smell bad. Oh also I moved the dullahan organs to the Bioscrambler blacklist because they runtimed while I was testing it (see also: my other incoming PRs) and I can't see any other reasonable way to fix it (they expect to be in an abstract body zone...) ## Why It's Good For The Game Anomalies are generally meant to be problems that you deal with or face some kind of consequence. Because the Bioscrambler isn't a timed anomaly with a dramatic detonation effect, being spawned in a poorly-trafficked area could simply mean that it isn't a problem to anyone. Now it will make sure that it is a problem for someone until someone gets rid of it. I thought this solution was funnier than making it do something zany if you leave it alone for 3 minutes. ## Changelog :cl: balance: The Bioscrambler will now actively attempt to get closer to living targets rather than chilling in a closet nobody goes into (unless you trap it in a containment field). balance: Because it can now travel through walls, the Bioscrambler will no longer transform you THROUGH walls. /:cl: * Bioscrambler Anomaly chases you * Adds some limitations to the bioscrambler event (code courtesy of LT3) --------- Co-authored-by: NovaBot <[email protected]> Co-authored-by: Jacquerel <[email protected]> Co-authored-by: Mal <[email protected]>
- Loading branch information
1 parent
a9a21fc
commit 7eccdef
Showing
14 changed files
with
160 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
modular_nova/modules/ices_events/code/events/ev_bioscrambler.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* A modification to the standard bioscrambler anomaly event. The anomaly cannot pass through walls, | ||
* and the spawn is restricted to common areas that engineering has rapid access. | ||
*/ | ||
|
||
/obj/effect/anomaly/bioscrambler | ||
pass_flags = PASSTABLE | PASSGLASS | PASSMACHINE | PASSDOORS | ||
range = 4 | ||
pulse_delay = 20 SECONDS | ||
|
||
/datum/round_event/anomaly/anomaly_bioscrambler/setup() | ||
if(spawn_location) | ||
impact_area = get_area(spawn_location) | ||
else | ||
impact_area = placer.find_bioscrambler_area() | ||
|
||
/datum/round_event/anomaly/anomaly_bioscrambler/announce(fake) | ||
if(isnull(impact_area)) | ||
impact_area = placer.find_bioscrambler_area() | ||
priority_announce("Biologic limb swapping agent detected on [ANOMALY_ANNOUNCE_MEDIUM_TEXT] [impact_area.name]. Engineers are advised to set up containment fields to prevent movement. Wear biosuits or other protective gear to counter the effects. Calculated half-life of %9£$T$%F3 years.", "Anomaly Alert", ANNOUNCER_ANOMALIES) | ||
|
||
/** | ||
* Returns an area which is safe to place a bioscrambler anomaly. | ||
*/ | ||
/datum/anomaly_placer/proc/find_bioscrambler_area() | ||
var/static/list/bioscrambler_inclusions = typecacheof(list( | ||
/area/station/commons, | ||
/area/station/hallway/primary, | ||
/area/station/hallway/secondary, | ||
)) | ||
|
||
//Subtypes from the above that shouldn't be included. | ||
var/static/list/bioscrambler_exclusions = typecacheof(list( | ||
/area/station/commons/dorms, | ||
/area/station/hallway/secondary/command, | ||
/area/station/hallway/secondary/construction, | ||
/area/station/hallway/secondary/dock, | ||
/area/station/hallway/secondary/exit/escape_pod, | ||
/area/station/hallway/secondary/recreation, | ||
/area/station/hallway/secondary/service, | ||
/area/station/hallway/secondary/spacebridge, | ||
/area/station/commons/storage, | ||
/area/station/commons/toilet, | ||
/area/station/commons/vacant_room, | ||
)) | ||
|
||
var/static/list/bioscrambler_areas = bioscrambler_inclusions - bioscrambler_exclusions | ||
|
||
log_game("ICES: Anomaly: Bioscrambler: [length(bioscrambler_inclusions)] areas cached for selection") | ||
var/list/possible_areas = typecache_filter_list(GLOB.areas, bioscrambler_areas) | ||
if(!length(possible_areas)) | ||
CRASH("No valid areas for anomaly found.") | ||
|
||
var/area/landing_area = pick(possible_areas) | ||
log_game("ICES: Anomaly: Bioscrambler: [landing_area.name] selected for spawn") | ||
var/list/turf_test = get_area_turfs(landing_area) | ||
if(!turf_test.len) | ||
CRASH("Anomaly : No valid turfs found for [landing_area] - [landing_area.type]") | ||
|
||
return landing_area |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters