Commit Graph

8 Commits

Author SHA1 Message Date
Jacquerel
1a918a2e14 Golem Rework (#74197)
This PR implements this design document:
https://hackmd.io/@Y6uzGFDGSXKRaWDNicSiEg/BkRr176st
Put briefly, this will remove every existing golem subtype and
consolidate golems into a single species with cool new sprites.
NOT implemented from that PR is the ability to eat Telecrystals, I
couldn't come up with an appropriate visual that can stack with the
existing ones, but that should be a reasonably trivial add for a future
artist & developer.

New Golems have a food-based mechanic where their hunger decays pretty
quickly and can only be replenished by eating minerals. They start
moving slower as they get hungrier, until eventually they become
completely immobilised and need to be rescued.
Eating different kinds of minerals will visually change your sprite and
give you a special effect in a similar way to old golems, but temporary.
While transformed, you can't eat any other kind of mineral which would
transform you (but can still consume glass).
To see the full list of effects, look at the hackmd above.

In service of these sprites working I have refactored the
`species/offset_features` feature by killing it and delegating that
responsibility to limbs instead. Rather than applying an offset to items
due to your species, it is due to your weird head or arms. This makes
overall more sense to me, but it inflates the code changes in this PR
somewhat.
It doesn't make a lot of sense to atomise unfortunately because that
code also seemed to be entirely unused until I tried to use it in this
PR, so you wouldn't be able to tell if my changes broke anything. I
might make a downstream sad by doing this.

All of the actual numbers in this PR are made up and only loosely
tested, it will need some testmerges to gather feedback about whether it
sucks or not.

Other relevant changes:
I reworked how bioscrambling works based off bodypart bodytypes, to
automatically exclude golem limbs in either direction. There's really no
way to have those work on humans or vice versa. Organs still fly though.
2023-05-07 22:45:20 +00:00
LemonInTheDark
40fc11eb07 Optimizes some gas_mixture procs, Optimizes pipeline processing significantly by 33% (#74233)
## About The Pull Request
It is faster to operate on a gas list, especially if cached, then it is
to operate on a datum.
Doing this cause I'm seeing cost in merge() post #74230

Hits on a few other important places too. self_breakdown and such. Worth
it IMO

Could in theory go further by caching the global list. I'm tempted I
admit but it needs profiling first and it's late

EDIT: I have not slept, and have gone tooo far

[Micros /gas_mixture/copy and copy_from, adds a new proc to handle
copying with a ratio,
copy_from_ratio](91da0003da)

[91da000](91da0003da)

The ADD_GAS sidestep saves us 0.1 seconds of init (used to at least.
Ensuring we don't break archive is gonna have a cost. I don't want to
profile this so I'll estimate maybe 0.05 seconds). The faster version of
copy_from is just well, better, and helps to avoid stupid

[Optimizes pipeline
processing](bf5a2d2d60)

[bf5a2d2](bf5a2d2d60)

I haven't slept in 36 hours. Have some atmos optimizations

Pipelines now keep track of components that require custom
reconciliation as a seperate list.
This avoids the overhead of filtering all connected atmos machinery.

Rather then relying on |= to avoid duplicate gas_mixtures, we instead
use a cycle var stored on the mix itself, which is compared with a
static unique id from reconcile_air()
This fully prevents double processing of gas, and should (hopefully)
prevent stupid dupe issues in future

Rather then summing volume on the gas mixture itself, we sum it in a
local var.
This avoids datum var accesses, and saves a slight bit of time

Instead of running THERMAL_ENERGY() (and thus heat_capacity(), which
iterates all gases in the mix AGAIN) when processing gas, we instead
just hook into the existing heat capacity calculation done inside the
giver gases loop
This saves a significant amount of time, somewhere around 30% of the
proc, I think?

This doesn't tackle the big headache here, which is the copy_from loop
at the base of the proc.

I think the solution is to convert pipelines to a sort of polling model.
Atmos components don't "own" their mix, they instead have to request a
copy of it from the pipeline datum.
This would work based off a mutually agreed upon volume amount for that
component in that process cycle.

We'd use an archived system to figure out what gases to give to
components, while removing from the real MOLES list.

We could then push gas consumption requests to the pipeline, which would
handle them, alongside volume changes, on the next process.

Not sure how I'd handle connected pipelines... Merging post reconcile
maybe?
This is a problem for tomorrow though, I need to go to bed.

Saves about 30% of pipeline costs.
Profiles taken on kilo, until each reconcile_air hits 5000 calls

[old.txt](https://github.com/tgstation/tgstation/files/11075118/Profile.results.total.time.txt)

[new.txt](https://github.com/tgstation/tgstation/files/11075133/profiler.txt)
2023-03-27 12:24:49 -06:00
LemonInTheDark
00d0edc75b Nerfs the roundstart planetary gasmixes, cleans up the code a bit (#56909)
Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 19:22:47 -08:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
Qustinnus
95731342b9 [READY] Adds station traits: Small modifiers that can randomly be chosen each round (#56309)
This PR adds station traits which are essentially small changes to a normal round that can be used to create small variations in how a round might play out, sometimes there might be only one, very simple trait, but you might have a round where they have a somewhat bigger impact, to make rounds feel slightly more different from each other.

The following traits have been added:
Positive:

    Lucky winner - Free pizza and beer every 6-12 minutes
    Galactic Grant - Larger starting funds for cargo
    Premium internals boxes - emergency box has flare + radio as bonus
    Bountiful bounties - Bounties pay 20% more
    Strong supply lines - Imports 20% cheaper
    Filled maint - More loot in maint
    Fast shuttle - Cargo shuttle is faster
    Free scarves - Free scarfs if a slot is free

Neutral:

    Bananium shipment - Clown starts with 5 sheets of bananium (Neutral because this helps noone but the clown)
    Unnatural atmosphere - Lava planet can get more restricted gasses
    Unique AI - Random lawset at roundstart for AI
    Ian adventure - Ian teleports to a random spot on the station
    Glitched PDAs - PDA's have a different beep
    Announcer intern - Changes the announcement messages to sound like they're from an intern at Centcom

Negative:

    Carp infestation - Carp event is more common and can start earlier
    Weak supply lines - Imports 20% more expensive
    Blackout - Station lights are partially broken around the station
    Empty maint - Less loot in maint
    Overflow bureacracy mistake - Random overflow job (From a vetted list)
    Late Arrivals - Everyone starts in arrivals
    Random spawns - Random spawn location (by drop pod)
    Slow shuttle - Cargo shuttle is slower

Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
Co-authored-by: coiax <yellowbounder@gmail.com>
2021-02-05 15:49:49 -08:00
Ghilker
63cb01db9c reduces the amount of some of lavaland and icemoon gases (#54214)
reduces bz and miasma amounts from lavaland atmos
reduces miasma amount from icemoon
2020-10-19 11:54:29 -03:00
Whoneedspacee
8af93a638b Icebox Station (#51090)
* there was an attempt

* adds ice moon map

adds config options for choosing mining maps

areas now have options that affect random generation on them

weather now has an option to not target indoor areas

adds base for icemoon ruins

turns many 1's into booleans

adds ice chasms

adds ztraits for weather stuff

* fixes up ice ruins to be ice moon compatible

adds lower z level to the ice moon mine

ice chasms now have a smoothed icon

megafauna only spawn in the underground portion of ice moon now

* openspace fixes

* adds new areas and underground specific ruins

* Adds the abandoned village ruin for Ice Moon

* adds abandoned village ruin and fixes some area and tile stuff to work with ice moon

* random mining maps are no longer picked in the config

you can no longer change the mining map before setup is complete

* adds above and below ground ruin as a test

* adds debug functionality for ice moon ruins

fixes a bug where multiz was impossible unless there were shared areas because of whitelisted areas

adds multiple whitelist areas for ruin placement in a list

all underground areas are now outdoors

underground plasma lava rivers are now only spawned in unexplored areas so ruins don't get destroyed by them

* adds unique spawners to icemoon to replace tendrils

adds 2 new mobs to icemoon the polar bear and wolf

adds a clothing flag for shoes that dont slip on ice

modifies mining site to be ready except for the boss

adds the ability for tunnel width to be a specification, ice moon can have 1 tile wide tunnels and rarely 2 wide tunnels

adds a no caves mineral for ice moon ruins

* wolves no longer run into lava or chasms

bears now enrage sooner

bear spawners can now actually be created

adds base for ice moon atmospherics

adds base for a new boss and achievements / score

really bad coder icon for ice boots added

* ice moon now has it's own planetary atmos! (thank god)

* new frost miner stuff

megafauna recovery time can now be tailored to have different cooldowns to ranged or melee attacks
by default sets both of them, with two arguments the first is ranged cooldown and the second is melee cooldown

* converts a bunch of lavaland maps to be compatible with ice moon

adds tendrils from lavaland to the bottom of ice moon with the other megafauna

* updates mob drops for ice moon mobs

updates config entry default value for ice moon

updates ice moon map to have new gulag

* updates station parallax for icemoon

removes extra lavaland ported ruins

updates to demonic frost miner

adds ladder to icemoon map near station

* updates ice moon map to have the ladder inside the mining base

plant flora dont spawn on the lower z level of ice moon now

you get sand from mining rocks now

buncha demonic frost miner changes holy cow

* adds the buried library

* improves map, fixes comment

* make this crap work with the station cause i have to lol it is pretty cool though and now i understand the mapping crap better

* updates ice ruin blacklist

* ice moon stop being too cold thanks

icebox changes, now actually has its own z level that can spawn ruins and such instead of just being openspace

tunnel width is now not stupid

* fixes a demonic frost miner bug where orbs werent exploding after death

atmosphere temp is now correct

fixes library ruin for icemoon

polar bear range is now fixed, only aggros in a short range and follows further than 3 tiles

reverts necropolis chest change

* Adds a new ruin: bathouse, barebones edition

* adds many new ruins

fixes a bug with tunnel creation that caused it to enter no tunnel allowed areas

finishes the frost miner and adds loot to him

you can now force a wabbajack option

* main z level now always has gravity for ice box

* hopefully the hot springs arent the buggiest thing in the world anymore

protects areas near the station from having openspace

* icebox takes less players

fixes the ladder positioning on every icemoon map

* snowstorms now only occur on the station level

fixes some issues with the icebox z level having openspace over the lower level mining base

* Update code/datums/map_config.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/datums/ruins/lavaland.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/game/objects/structures/lavaland/necropolis_tendril.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/game/turfs/closed/minerals.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/game/turfs/open/chasm.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/game/turfs/open/floor/plating/asteroid.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/modules/ruins/icemoonruin_code/hotsprings.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* fixes areas on the lust ruin

polar bears now drop a goliath plate equivalent

wolfs now drop a watcher sinew equivalent

adds snow legions

adds a crusher trophy for the demonic frost miner that prevents movement

fixes a bug with asteroid mobs where the aggro icon would never show

adds ice to the snow cave tunnel generation

* starts work on the wendigo megafauna

* replaces snowball machine gun with more miner useful content

adds gentle var for knockback to prevent stunning on hit

polar bears move slower now

new icon for phase 2 demonic miner now

* fixes lust ruin areas

fixes whitespace

fixes nesting issues

adds underground specific mobs

* name / location fixes

demonic frost miner doesnt stun on knockback now

ice demons move faster

* fixes icebox having the wrong baseturf

* adds achievement defines to the wendigo

snowstorm for the lower z level again

adds a new helper for ranged target turfs

theres now a specific subtype for rivers

fixes a bug where ice and spawners spawned with rocks and other flora on top of them

adds indestructible ice rock turf

fixes a bug with ice demons teleport distance being incorrect

adds the start of wendigos attacks

* Apply suggestions from code review

Co-Authored-By: Rohesie <rohesie@gmail.com>

* Update code/modules/mapping/ruins.dm

Co-Authored-By: Rohesie <rohesie@gmail.com>

* Fixes a dumb bug with ruins from a webedit review

The syndicate shuttle can now land on mineral turfs

* the final commit, all that im going to change after this is documentation for procs lol

makes both ice moon z levels below the station underground, and makes it so they generate rivers of their baseturf

* adds nice animation to wendigo scream

* small fixes

* finishes autodoccing everything i could find

* ok im done for real now

* adds anywhere ruins

does review stuff

* review stuff

* ok it removes the stuff now

* fix removal

* fixes from the git

* adds surroundings to the asteroid and lavaland sites

adds butchering gloves to wrath ruins

the lower icebox levels are no longer station levels

fixes capitals on blood drunk and frost miner boss medals

adds engineering outpost ruin by trollbreeder

adds boxstation job changes to icebox

polar bear transformation no longer has immunity to lavaland mobs

fixes ice whelp spelling mistake

* fixes engi outpost atmospherics

fixes missing plating on solar panels

changes slowdown for icemoon turfs

* fixes ruins areas so tunnels can spawn into some of them

adds lights to icebox below area

openspace turfs mine the thing below them now

* fixes wall boundings on asteroid and lavaland domes

* ur lame armhulen

* adds public mining area to icebox

adds computer vendors to icebox

* minor fixes

* fixes map type error

* removes slowdown entirely

increases ore chances

fixes openspace on main map

fixes a ton of active turfs at roundstart

modifies demonic frost miner loot to be cooler and more useful since the boss was hardly killed during tests

tunnels are wider underground now

openspace now deletes itself if it spawns above a ruin

* improve da ruins

* tries to fix multiple atmos issues with ruins

removes bz from the planetary atmos since it could cause unstoppable chain reactions which would cause massive lag

demonic frost miner drill now automatically scans everywhere around you

fixes tunnel generation issue

makes it so randomly generated turfs inherit their no_ruins flags

Co-authored-by: Jonathan Church <jchurch093@gmail.com>
Co-authored-by: s <wesoda24@gmail.com>
Co-authored-by: spookydonut <github@spooksoftware.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
2020-05-22 02:17:15 -07:00
Emmett Gaines
48f19baba1 Randomizes lavaland atmos (#44427)
This makes lavaland atmos random per round. You won't get eternally burning hell worlds or vacuums but it's nice for a bit of variety.

Admins can edit the gas mixture for all of lavaland at once if they want to ruin some miners' day.

image

cl
add: Lavaland atmos is no longer a preset gas mixture and varies per round
tweak: Bonfire minimum oxygen content has been reduced
/cl
2019-06-29 21:07:26 +12:00