Files
Kano aec06bc427 Adds an interactive away site: Outpost Nemora PART I (#20993)
## About PR

Adds an interactive away site. Full of evil, traps, point-defense horde
cleaning and story. This is part 1 of the changes. Currently incomplete
on some mechanics mostly pertaining north-east section of the ruin but I
believe this has enough content as is and a good step for the next
changes to come!


## Detailed Changelog
<details><summary>Contains spoilers, click to expand!</summary>
<p>

- `A revivable mob type`. If this mob wasn't burned or deleted by any
means within a 3 minutes period, it will revive.
- `Abominations`, a subtype of revivable mob. This type can spawn with a
chance to split into smaller creatures in death, if someone approaches
close enough. These mobs are also able to mimic appearance of humans,
being completely pacifist until it reaches to its unsuspecting prey or
gets attacked before it could.
- `Mob tracking console`, tracks any mobs/objects that exists in the
same Z level as the console itself, and included in a global list.
Displays its data in a TGUI screen.
- `Rigged (trapped) vents`, if it detects a player passing by within 1
tile radius from an unwelded rigged vent, it'll spawn up to 2 mobs. The
chances of triggering varies on following coniditons: running (100%),
walking (medium chance), throwing items near it (very small chance).
- `Storytelling holopads`, core logic is ported from Paradise Station,
made by Qwertytoforty. I did minimal modifications to make it work with
our codebase and do some additional things.
- `Footprint mapping helper`, allows mapping footprints of any type.
- `A light fixture subtype`, has a 50-50 chance to spawn as broken or
functional after Initialize.
- `An extraction mini game`, special to this ruin. It entails finding 5
canisters scattered randomly in the ruin and killing every creature
that's lurking around. If these conditions are met players are required
to hold off an extraction device and protect it from the waves of
creatures, while swapping said canisters. Modified from phoron deposit
ruin.

</p>
</details> 

---

### What's the overall story this ruin tries to convey, and where it's
allowed to spawn at?

This isn't final and a subject open for change where deemed fit. This
ruin is a remnant dating back to pre-Interstellar War. Solarian Alliance
Science Facility (SSF) Nemora, is a failed experiment/expedition
co-conducted by Department of Colonization. I believe it'd make sense to
find this ruin in the old Solarian frontiers far from the Core Worlds,
even so if the sector in question was colonized, nothing would've
stopped a department of a desperate nation in search for their gold in
blind hope. But not too close to an inhabited space.

***This needs to be evaluated by a lore nerd!***
**Possible Sectors:** 
- Valley Hale
- Badlands
- Weeping Stars
- Light's Edge
- Lemurian Sea (still up in the air for this one, but I like to think
Solarian suveyors took a swing at it at the time)
- All Crescent Expanse Sectors (east, west, far).

<details><summary>Details on story. I'd advise to skip this bit to not
spoil the experience if you're not reviewing this PR. Spoilers alert,
click to expand!</summary>
<p>

Shortly before the Second Great Depression, when the upcoming crisis had
begun to be felt within the nation's departments, some surveyors from
the Department of Colonization encountered an anomolous signal,
incalculable energy levels in deep space. When they decided to
investigate its source, small expedition teams went missing after a
while.

This drew the attention of the department, as seeing multiple expedition
teams went radio silent. A third-party incursion was suspected here,
pirates or worse. This led to the deployment of sufficiently armed Navy
corvettes to the last known coordinates of the expedition.

To no avail, all that was found was the vacant shuttles of the
surveyors, drifting in orbit around an anomolous asteroid. This gave
room for further discussion in the smaller parts of relevant
departments, after hearing what the inital expedition members had left
behind. The department conceded to pursue this further, funding a
thorough investigation to unearth what was hidden and to see if this was
a threat to demolish or an unexpected resource to exploit.

In time, an outpost was constructed and a researcher, eminent in their
field was commissioned to oversee operations on behalf of the
department. A majority of the attempts didn't go far enough beyond to
bear any fruit. As the progress was too slow and unsatisfactory in the
eyes of funders, this led to a review of the project and therefore
forced Nemora's hand to commence an experimental approach, which proved
a success, _so to say_.

Following this incident, the outpost crumbled under the weight of the
crises that had befallen it. All subsequent requests and communications
fell on the deaf ears of the nation in the midst of a large scale
economic crisis, forced Nemora to join the caravan of "low priority"
demands along with many other pressing nation affairs. In the end, the
facility remained forgotten, burried beneath the many rubble inflicted
by the inevitable storm of change Spur has known, Interstellar War. But
this may yet change, now the same Spur has turned their gaze back to
those uncharted heights, in a desperate attempt to exhaust what is
little known.

</p>
</details> 

---

### What does "interactive" part entail exactly?

This ruin contains some coded elements (traps, objectives, consequences
of some choices made), attempting to imitate a gameplay loop what a
player would expect from an admin controlled event. While this may not
go further than some coded/scripted events, I think this ruin has some
fun content for security/engineering/medical departments.

Currently this PR contains some core functionality for actual "choices
matter™" stuff for part 2 (if this gets approved).

Also most of the functions used in this ruin was made so it could be
used in any maps.

## Images

this:
https://discord.com/channels/157516682288562176/1162868440814600232/1393057047443931197

and this:
https://discord.com/channels/157516682288562176/1162868440814600232/1395312791925166160

<img width="4736" height="6144" alt="image"
src="https://github.com/user-attachments/assets/9526d40d-4da3-44b6-9220-80cf48ff2c72"
/>

## Asset Licenses
The following assets that **have not** been created by myself are
included in this PR:

| Path | Original Author | License |
| --- | --- | --- |
| /environmental_storytelling_holopad | Qwertytoforty (Paradise Station)
| CC BY-SA 3.0 |
| icons/obj/structure/bluespace_portal.dmi | Paradise Station | CC BY-SA
3.0 |
| icons/obj/structure/urban/bunk_beds.dmi | TGMC | CC BY-SA 3.0 |
| hospitalcurtain in icons/obj/structure/urban/tailoring.dmi | TGMC | CC
BY-SA 3.0 |
| roadbarrierwood in icons/obj/barricades.dmi | TGMC | CC BY-SA 3.0 |
| icons/obj/flora/rocks_brown.dmi and icons/obj/flora/rocks_grey.dmi |
TGMC | CC BY-SA 3.0 |
| the_thing and the_thing_chitin in icons/mob/npc/human.dmi | TG | CC
BY-SA 3.0 |
| sound/music/quarantined_outpost.ogg | Betrayer by Karl Casey --
https://karlcasey.bandcamp.com/track/betrayer | CC BY 3.0
| sound/effects/earthquake_rumble.ogg | Digging.wav by prozaciswack --
https://freesound.org/s/82722 | CC0 1.0 |
| sound/effects/robot_talk_1.ogg & sound/effects/robot_talk_2.ogg |
Robot Talk SFX by TheEndOfACycle -- https://freesound.org/s/674306/ |
CC0 1.0 |
| sound/effects/light_heavy_on.ogg | Light - Heavy lights turned on by
TILIADESIGN -- https://freesound.org/s/486536/ | CC0 1.0 |
2025-10-19 10:21:12 +00:00

209 lines
7.2 KiB
Plaintext

/obj/effect/fauna_spawner
name = "Mob spawner"
desc = "A mob spawner you're not supposed to see"
icon = 'icons/effects/map_effects.dmi'
icon_state = "ghostspawpoint"
anchored = 1
unacidable = 1
simulated = 0
invisibility = 101
var/first_spawn_done = FALSE // Keeping this false will make it so that it always spawns the first mob on the list first
var/spawning_enabled = FALSE
var/list/active_mobs = list()
var/max_active_mobs = 5
var/list/mob_choices = list() // List of mobs it'll spawn
/// Cooldown for spawning mobs. A value between min and max will be defined as seconds.
var/min_spawn_cooldown = 5
var/max_spawn_cooldown = 10
var/obj/effect/landmark/mob_waypoint/waypoint = null // The spawner automatically detects a waypoint on the same z-level, no need to set this manually
/obj/effect/fauna_spawner/Initialize()
. = ..()
var/obj/effect/landmark/mob_waypoint/W = locate(/obj/effect/landmark/mob_waypoint) in world
RegisterSignal(GLOB, COMSIG_GLOB_MOB_DEATH, PROC_REF(mob_died))
if (W && W.z == src.z)
waypoint = W
if(!islist(GLOB.fauna_spawners))
GLOB.fauna_spawners = list()
GLOB.fauna_spawners |= src
/obj/effect/fauna_spawner/Destroy()
UnregisterSignal(GLOB, COMSIG_GLOB_MOB_DEATH, PROC_REF(mob_died))
if(islist(GLOB.fauna_spawners))
GLOB.fauna_spawners -= src
return ..()
/obj/effect/fauna_spawner/proc/start_spawning()
if (spawning_enabled)
return
spawning_enabled = TRUE
spawn()
while (spawning_enabled && src)
for (var/i = length(active_mobs); i >= 1; i--)
var/mob/living/M = active_mobs[i]
if (!M || QDELETED(M) || M.stat == DEAD)
active_mobs.Cut(i, i+1)
if (length(active_mobs) < max_active_mobs)
spawn_mob()
sleep(rand(min_spawn_cooldown, max_spawn_cooldown) SECONDS)
/obj/effect/fauna_spawner/proc/spawn_mob()
if (!mob_choices || !length(mob_choices))
return
var/mob_type
var/move_speed = 5
var/choice
if (!first_spawn_done)
choice = mob_choices[1]
first_spawn_done = TRUE
else
choice = pick(mob_choices)
if (islist(choice))
mob_type = choice["type"]
move_speed = choice["speed"]
else
mob_type = choice
var/mob/living/new_mob = new mob_type(src.loc)
if (!new_mob)
return
active_mobs += new_mob
RegisterSignal(new_mob, COMSIG_GLOB_MOB_DEATH, PROC_REF(mob_died))
if (src.waypoint && istype(new_mob, /mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = new_mob
H.target_waypoint = src.waypoint
spawn()
if (isturf(src.waypoint.loc))
GLOB.move_manager.move_towards(H, src.waypoint.loc, move_speed, TRUE)
/obj/effect/fauna_spawner/proc/mob_died(var/mob/living/mob_ref, gibbed)
for (var/i = length(active_mobs); i >= 1; i--)
var/mob/living/M = active_mobs[i]
if (!M || QDELETED(M) || M.stat == DEAD)
active_mobs.Cut(i, i+1)
if (mob_ref in active_mobs)
active_mobs -= mob_ref
/obj/effect/fauna_spawner/proc/stop_spawning()
spawning_enabled = FALSE
/proc/activate_fauna_spawners(var/z)
if(!islist(GLOB.fauna_spawners) || !length(GLOB.fauna_spawners))
return
for(var/obj/effect/fauna_spawner/S in GLOB.fauna_spawners)
if(S?.loc?.z == z)
S.start_spawning()
//Make your subtypes here
/obj/effect/fauna_spawner/phoron_deposit
name = "Phoron Deposit Spawner"
mob_choices = list(
list(type = /mob/living/simple_animal/hostile/carp/shark/reaver/eel/phoron_deposit, speed = 5), //Speed refers only to the speed that the mobs will move to the waypoint at. Lower values = faster
list(type = /mob/living/simple_animal/hostile/carp/shark/phoron_deposit, speed = 4),
list(type = /mob/living/simple_animal/hostile/carp/shark/reaver/phoron_deposit, speed = 5),
list(type = /mob/living/simple_animal/hostile/gnat/phoron_deposit, speed = 1),
list(type = /mob/living/simple_animal/hostile/carp, speed = 2)
)
/**
* Opposed to `fauna_spawner`, this spawner allows further customization and checks over spawned mobs, such as:
* * Having multiple spawn points, randomly chosen to spawn mobs.
* * Keeping track of total mob counts inside a single object.
*
* How does it work?
* * This type serves as a single spawner, it detects the spawn points in the same Z level and randomly chooses
*/
/obj/effect/fauna_spawner/organized
name = "Organized mob spawner"
desc = "You are not supposed to see this!"
icon_state = "master_spawner"
anchored = TRUE
unacidable = TRUE
simulated = FALSE
invisibility = 101
min_spawn_cooldown = 20
max_spawn_cooldown = 25
max_active_mobs = 15
/// Integer, fixed number of mobs that'll be spawned before spawner enters cooldown.
var/spawn_points_to_pick
/// The number range of mobs that can spawn before spawner enters cooldown. Ignored if 'spawn_points_to_pick' isn't null.
var/min_spawn = 2
var/max_spawn = 3
/// If true, object will avoid spawning multiple mobs on the same point.
var/one_spawn_per_point = FALSE
/obj/effect/fauna_spawner/organized/spawn_mob()
if (!mob_choices || !length(mob_choices))
return
var/obj/effect/landmark/organized_spawn_point/SP
var/list/available_points = GLOB.organized_spawn_points.Copy() // we make a copy so 'pick_n_take()' doesn't get rid of instances in global list
var/list/chosen_group = list()
if(LAZYLEN(available_points))
var/loop_amount
var/obj/effect/spawn_point
loop_amount = !spawn_points_to_pick ? rand(min_spawn, max_spawn) : spawn_points_to_pick // if no value is set we will randomly pick a number for each spawn time
for(var/i in 1 to loop_amount)
spawn_point = one_spawn_per_point ? pick_n_take(available_points) : pick(available_points)
if(spawn_point.z == src.z)
chosen_group += spawn_point
for(SP in chosen_group) //---- spawning mobs on chosen points
if(length(active_mobs) >= max_active_mobs) // double check if we exceeded the threshold
return
var/turf/T = get_turf(SP)
var/mob_type
var/move_speed = 5
var/choice
choice = pick(mob_choices)
if (islist(choice))
mob_type = choice["type"]
move_speed = choice["speed"]
else
mob_type = choice
var/mob/living/new_mob = new mob_type(T)
active_mobs += new_mob
RegisterSignal(new_mob, COMSIG_GLOB_MOB_DEATH, PROC_REF(mob_died))
if(src.waypoint && istype(new_mob, /mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = new_mob
H.target_waypoint = src.waypoint
INVOKE_ASYNC(src, PROC_REF(lead_the_mob), H, waypoint, move_speed)
/obj/effect/fauna_spawner/organized/proc/lead_the_mob(H, waypoint, move_speed)
if(isturf(src.waypoint.loc))
GLOB.move_manager.move_towards(H, src.waypoint.loc, move_speed, TRUE)
// ---- Put your subtypes here
/obj/effect/fauna_spawner/organized/quarantined_outpost
name = "Quarantined Outpost Spawner"
mob_choices = list(
list(type = /mob/living/simple_animal/hostile/revivable/husked_creature/quarantined_outpost/horde, speed = 5),
list(type = /mob/living/simple_animal/hostile/revivable/abomination/quarantined_outpost/horde, speed = 5)
)
one_spawn_per_point = TRUE
/obj/effect/landmark/organized_spawn_point
name = "spawn point"
icon = 'icons/effects/map_effects.dmi'
icon_state = "spawner_spawnpoint"
/obj/effect/landmark/organized_spawn_point/Initialize()
. = ..()
GLOB.organized_spawn_points += src
/obj/effect/landmark/organized_spawn_point/Destroy()
GLOB.organized_spawn_points -= src
return ..()
/obj/effect/landmark/mob_waypoint
name = "mob waypoint"