Skip to content

Commit

Permalink
Overmap 4.6: Anomalous Activity (#1991)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request


https://github.com/shiptest-ss13/Shiptest/assets/94164348/591dd5bc-c90a-40d0-a578-54b9a0abe90d

Anomalies will now spawn on planets and remain static there, posing a
passive threat to anyone who comes across them. If you're feeling
daring, you can use an analyzer and signaller, or an anomaly
neutralizer, to harvest their cores, and put them in an R&D console for
research points.

Anomaly effects have also been expanded, you'll have to find out how in
game though.

As a side effect to make bluespace anomalies work, removes the
noteleport flag on planets
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
More exploration content
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl: Bjarl, Ghilker, Comyx, Assorted /tg/ contributors
add: anomalies will now randomly spawn on planets
add: bioscrambler anomalies, they randomly change your organs and
bodyparts
add: hallucination anomalies, they cause hallucinations
add: big anomalies, they're like normal anomalies but big.
fix: disk renaming should only work with pens now
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Signed-off-by: Bjarl <[email protected]>
Co-authored-by: Mark Suckerberg <[email protected]>
  • Loading branch information
Erikafox and MarkSuckerberg authored Jun 30, 2023
1 parent 95790f0 commit 9ae4873
Show file tree
Hide file tree
Showing 44 changed files with 1,508 additions and 587 deletions.
7 changes: 7 additions & 0 deletions code/__DEFINES/anomalies.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
///Defines for the different types of explosion a flux anomaly can have
#define FLUX_NO_EXPLOSION 0
#define FLUX_EXPLOSIVE 1
#define FLUX_LOW_EXPLOSIVE 2

/// Chance of anomalies moving every process tick
#define ANOMALY_MOVECHANCE 45
11 changes: 11 additions & 0 deletions code/__DEFINES/maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,14 @@
. += 180
else if(dx < 0)
. += 360


/// Converts a probability/second chance to probability/seconds_per_tick chance
/// For example, if you want an event to happen with a 10% per second chance, but your proc only runs every 5 seconds, do `if(prob(100*SPT_PROB_RATE(0.1, 5)))`
#define SPT_PROB_RATE(prob_per_second, seconds_per_tick) (1 - (1 - (prob_per_second)) ** (seconds_per_tick))

//make spawners use this -Erika

/// Like SPT_PROB_RATE but easier to use, simply put `if(SPT_PROB(10, 5))`
#define SPT_PROB(prob_per_second_percent, seconds_per_tick) (prob(100*SPT_PROB_RATE((prob_per_second_percent)/100, (seconds_per_tick))))
// )
3 changes: 2 additions & 1 deletion code/datums/mapgen/planetary/JungleGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@
feature_spawn_chance = 0.5
feature_spawn_list = list(
/obj/item/pickaxe/rusted = 1,
/obj/structure/spawner/ice_moon = 1
/obj/structure/spawner/ice_moon = 1,
/obj/effect/spawner/lootdrop/anomaly/jungle = 1
)

/datum/biome/cave/jungle/dirt
Expand Down
9 changes: 6 additions & 3 deletions code/datums/mapgen/planetary/LavaGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@
feature_spawn_list = list(
/obj/structure/flora/rock/hell = 5,
/obj/structure/elite_tumor = 1,
/obj/structure/geyser/random = 1
/obj/structure/geyser/random = 1,
/obj/effect/spawner/lootdrop/anomaly/lava = 0.5

)
mob_spawn_chance = 4
mob_spawn_list = list(
Expand Down Expand Up @@ -157,8 +159,9 @@
)
feature_spawn_chance = 5
feature_spawn_list = list(
/obj/structure/flora/tree/dead/barren = 1,
/obj/structure/flora/tree/dead/tall/grey = 1,
/obj/structure/flora/tree/dead/barren = 50,
/obj/structure/flora/tree/dead/tall/grey = 45,
/obj/effect/spawner/lootdrop/anomaly/lava = 5
)

/datum/biome/lavaland/plains/dense/mixed
Expand Down
22 changes: 17 additions & 5 deletions code/datums/mapgen/planetary/RockGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@
/datum/biome/rock
open_turf_types = list(/turf/open/floor/plating/asteroid/rockplanet/lit = 1)

feature_spawn_chance = 0.1
feature_spawn_list = list(/obj/structure/geyser/random = 1, /obj/structure/elite_tumor = 2)
feature_spawn_chance = 0.25
feature_spawn_list = list(
/obj/structure/geyser/random = 8,
/obj/structure/elite_tumor = 4,
/obj/effect/spawner/lootdrop/anomaly/rock = 1,
/obj/effect/spawner/lootdrop/anomaly/big = 0.1 //get out of here stalker
)

flora_spawn_chance = 5
mob_spawn_chance = 3
Expand All @@ -105,7 +110,9 @@
)

/datum/biome/rock/icecap
open_turf_types = list(/turf/open/floor/plating/asteroid/snow/lit/rockplanet = 1, /turf/open/floor/plating/asteroid/snow/lit/rockplanet = 5)
open_turf_types = list(
/turf/open/floor/plating/asteroid/snow/lit/rockplanet = 1,
/turf/open/floor/plating/asteroid/snow/lit/rockplanet = 5)
flora_spawn_chance = 1
mob_spawn_chance = 2

Expand Down Expand Up @@ -138,8 +145,13 @@
/obj/structure/flora/ash/fern = 2,
/obj/structure/flora/ash/puce = 1,
)
feature_spawn_chance = 0.3
feature_spawn_list = list(/obj/structure/geyser/random = 1, /obj/structure/elite_tumor = 2, /obj/structure/spawner/ice_moon/rockplanet = 4)
feature_spawn_chance = 0.5
feature_spawn_list = list(
/obj/structure/geyser/random = 2,
/obj/structure/elite_tumor = 1,
/obj/structure/spawner/ice_moon/rockplanet = 4,
/obj/effect/spawner/lootdrop/anomaly/rock/cave = 1,
)
mob_spawn_chance = 6
mob_spawn_list = list(
/mob/living/simple_animal/hostile/netherworld/asteroid = 20,
Expand Down
25 changes: 21 additions & 4 deletions code/datums/mapgen/planetary/SandGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@
/obj/structure/flora/ash/stem_shroom = 4 ,
)
feature_spawn_chance = 0.1
feature_spawn_list = list(/obj/structure/geyser/random = 1, /obj/structure/elite_tumor = 2)
feature_spawn_list = list(
/obj/structure/geyser/random = 8,
/obj/structure/elite_tumor = 4,
/obj/effect/spawner/lootdrop/anomaly/sand = 1,
)
mob_spawn_chance = 4
mob_spawn_list = list(
/mob/living/simple_animal/hostile/asteroid/goliath/beast/random = 50,
Expand All @@ -100,7 +104,13 @@
)

/datum/biome/sand/wasteland
open_turf_types = list(/turf/open/floor/plating/asteroid/whitesands/lit = 50, /turf/open/floor/plating/asteroid/whitesands/dried/lit = 40, /turf/closed/mineral/random/whitesands = 20, /turf/closed/wall/mineral/titanium/survival/pod = 1, /turf/closed/wall/rust = 1)
open_turf_types = list(
/turf/open/floor/plating/asteroid/whitesands/lit = 50,
/turf/open/floor/plating/asteroid/whitesands/dried/lit = 40,
/turf/closed/mineral/random/whitesands = 20,
/turf/closed/wall/mineral/titanium/survival/pod = 1,
/turf/closed/wall/rust = 1
)
flora_spawn_chance = 20
flora_spawn_list = list(
/obj/structure/flora/ash/leaf_shroom = 4,
Expand Down Expand Up @@ -170,15 +180,22 @@

/datum/biome/cave/sand
closed_turf_types = list(/turf/closed/mineral/random/whitesands = 1)
open_turf_types = list(/turf/open/floor/plating/asteroid/whitesands = 5, /turf/open/floor/plating/asteroid/whitesands/dried = 1)
open_turf_types = list(
/turf/open/floor/plating/asteroid/whitesands = 5,
/turf/open/floor/plating/asteroid/whitesands/dried = 1
)
flora_spawn_chance = 4
flora_spawn_list = list(
/obj/structure/flora/rock = 4,
/obj/structure/flora/rock/pile = 4,
/obj/structure/flora/ash/fern = 2,
/obj/structure/flora/ash/puce = 1,
)
feature_spawn_list = list(/obj/structure/geyser/random = 1, /obj/structure/elite_tumor = 2)
feature_spawn_list = list(
/obj/structure/geyser/random = 4,
/obj/structure/elite_tumor = 4,
/obj/effect/spawner/lootdrop/anomaly/sand/cave = 1
)
mob_spawn_chance = 4
mob_spawn_list = list(
/mob/living/simple_animal/hostile/asteroid/goliath/beast/random = 50,
Expand Down
37 changes: 18 additions & 19 deletions code/datums/mapgen/planetary/SnowGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@
)
feature_spawn_chance = 0.1
feature_spawn_list = list(
/obj/structure/spawner/ice_moon/demonic_portal = 1,
/obj/structure/spawner/ice_moon/demonic_portal/ice_whelp = 1,
/obj/structure/spawner/ice_moon/demonic_portal/snowlegion = 1
/obj/effect/spawner/lootdrop/anomaly/ice = 12,
/obj/effect/spawner/lootdrop/anomaly/big = 1,
/obj/structure/spawner/ice_moon/demonic_portal/low_threat = 25,
/obj/structure/spawner/ice_moon/demonic_portal/medium_threat = 50,
/obj/structure/spawner/ice_moon/demonic_portal/high_threat = 13
)

/datum/biome/snow/lush
Expand Down Expand Up @@ -205,10 +207,12 @@
)
feature_spawn_chance = 0.3
feature_spawn_list = list(
/obj/structure/spawner/ice_moon/demonic_portal/low_threat = 25,
/obj/structure/spawner/ice_moon/demonic_portal/medium_threat = 50,
/obj/structure/spawner/ice_moon/demonic_portal/high_threat = 13,
/obj/structure/spawner/ice_moon/demonic_portal/extreme_threat = 12
/obj/effect/spawner/lootdrop/anomaly/ice = 1,
/obj/effect/spawner/lootdrop/anomaly/big = 0.01,
/obj/structure/spawner/ice_moon/demonic_portal/low_threat = 3,
/obj/structure/spawner/ice_moon/demonic_portal/medium_threat = 5,
/obj/structure/spawner/ice_moon/demonic_portal/high_threat = 0.5,
/obj/structure/spawner/ice_moon/demonic_portal/extreme_threat = 0.01
)


Expand Down Expand Up @@ -256,11 +260,13 @@
)
feature_spawn_chance = 0.2
feature_spawn_list = list(
/obj/structure/spawner/ice_moon/demonic_portal = 1,
/obj/structure/spawner/ice_moon/demonic_portal/ice_whelp = 1,
/obj/structure/spawner/ice_moon/demonic_portal/snowlegion = 1,
/obj/structure/spawner/ice_moon = 1,
/obj/structure/spawner/ice_moon/polarbear = 1
/obj/structure/spawner/ice_moon/demonic_portal/low_threat = 3,
/obj/structure/spawner/ice_moon/demonic_portal/medium_threat = 5,
/obj/structure/spawner/ice_moon/demonic_portal/high_threat = 0.6,
/obj/structure/spawner/ice_moon/demonic_portal/extreme_threat = 0.2,
/obj/structure/spawner/ice_moon = 3,
/obj/structure/spawner/ice_moon/polarbear = 3,
/obj/effect/spawner/lootdrop/anomaly/ice/cave = 1
)

/datum/biome/cave/snow/thawed
Expand Down Expand Up @@ -304,13 +310,6 @@
/obj/structure/flora/ash/stem_shroom = 1,
)
feature_spawn_chance = 0.2
feature_spawn_list = list(
/obj/structure/spawner/ice_moon/demonic_portal = 1,
/obj/structure/spawner/ice_moon/demonic_portal/ice_whelp = 1,
/obj/structure/spawner/ice_moon/demonic_portal/snowlegion = 1,
/obj/structure/spawner/ice_moon = 3,
/obj/structure/spawner/ice_moon/polarbear = 3,
)

/datum/biome/cave/volcanic/lava
open_turf_types = list(
Expand Down
10 changes: 5 additions & 5 deletions code/datums/mapgen/planetary/WasteGenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
feature_spawn_list = list(
/obj/effect/radiation/waste = 30,
/obj/effect/radiation/waste/intense = 10,
/obj/structure/geyser/random = 1
/obj/structure/geyser/random = 1,
/obj/effect/spawner/lootdrop/anomaly/waste = 1
)

mob_spawn_list = list(
Expand Down Expand Up @@ -313,7 +314,8 @@
feature_spawn_list = list(
/obj/effect/radiation/waste = 30,
/obj/effect/radiation/waste/intense = 10,
/obj/structure/geyser/random = 1
/obj/structure/geyser/random = 1,
/obj/effect/spawner/lootdrop/anomaly/waste/cave = 1
)
mob_spawn_list = list(
/mob/living/simple_animal/hostile/hivebot/strong/rockplanet = 70,
Expand All @@ -324,9 +326,7 @@
/mob/living/simple_animal/hostile/abandoned_minebot = 15,
/mob/living/simple_animal/bot/floorbot/rockplanet = 15,
)
feature_spawn_list = list(
/obj/effect/radiation = 30,
)

flora_spawn_chance = 30
feature_spawn_chance = 4
mob_spawn_chance = 5
Expand Down
Loading

0 comments on commit 9ae4873

Please sign in to comment.