Commit Graph

1153 Commits

Author SHA1 Message Date
John Willard
88d7dbfc10 removes double spaces before symbols (#62397)
This can apparently cause some bugs on occasions, so I thought I might as well try to kill them all.
2021-10-28 19:25:50 -03:00
MrMelbert
a3c2293b69 Hydroponics basins use a setter when toggling auto-grow to reduce copy+paste (#62224) 2021-10-25 18:35:18 -07:00
MrMelbert
f1f2d32dc8 Fixes a bug with plant reagent gene names (#61995)
* fixes reagent names

* defaults

* better change?
2021-10-25 21:36:39 +02:00
Seris02
8f2b02ba3f cutting logs with a hatchet no longer produces runtimes by merging qdeleted stacks (#62060)
Runtime in stack.dm, 452: Stack merge attempted on qdeleted target stack.

it edits four lines instead of one because I removed them at first, then was too lazy to copypaste it from the code back in, and so hand typed it, and my propensity for adding spaces shone through
2021-10-16 19:32:02 -04:00
itseasytosee
f51000f506 Repaths knives to not all be children of the kitchen knife. (#62035)
Basically makes the code less dumb, took a long time. I worked hard to make sure there were no unintended effects (minus the fact you can no longer get spoons from the experimentor). No player-facing effects

I thought it looked weird that all cultist and combat knives were subtypes of the kitchen knives
2021-10-15 15:28:01 -07:00
Ghilker
95c8e00af7 cleanup _HELPERS/_lists.dm and all the necessary files (#61827)
Bring _HELPERS/_lists.dm to latest standards by:
-Adding proper documentation and fixing existing one
-Giving vars proper names
-Procs now use snake case as per standard (many files that use those procs will be affected)
2021-10-12 14:48:51 +01:00
MrMelbert
270a53e117 Delete seeds whenever a plant is deletes, delete plant genes when a seed is deleted, + refactor various gene adding / deleting (#61747) 2021-10-07 19:27:07 -07:00
Ghilker
b95c0366a4 _HELPERS/unsorted.dm has been sorted (#61882)
bring code up to latest standards, move many procs to named files inside _HELPERS
no idea where to put some of these procs, help is appreciated
made more files to contain some unique code, deleted unsorted.dm, we can rest now
2021-10-05 20:22:57 +01:00
tralezab
6c01cc2c01 every case of initialize that should have mapload, does (#61623)
## About The Pull Request

stop forgetting to include mapload, if you don't include it then every single subtype past it by default doesn't include it

for example, `obj/item` didn't include mapload so every single item by default didn't fill in mapload

![](https://media.discordapp.net/attachments/823293417186000909/875122648605147146/image0.gif)

## Regex used:

procs without args, not even regex

`/Initialize()`

procs with args
`\/Initialize\((?!mapload)((.)*\w)?`

cleanup of things i didn't want to mapload:
`\/datum\/(.)*\/Initialize\(mapload`
2021-09-24 17:56:50 -04:00
GoldenAlpharex
05e7b774d0 Makes it so certain glasses and headwear can be now displayed above mutant bodyparts and hair (#61417)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-09-19 19:12:28 -07:00
MrMelbert
76291fe8b1 Fixes + unit tests botany plants mutating into themselves, and makes mutatelists proper lazylists (#61235)
- This PR fixes a few botany plants mutating into themselves due to seeds inheriting the mutation list from its parent. Durathread, Jupiter Cups, Fairy Grass, Red Onions, Bamboo, Green Grapes, and World Peas (maybe some others I forgot). 
- This PR also unit tests to ensure plants don't mutate into themselves. 
- This PR also converts mutatelist into a proper lazylist. IT was already kinda a lazy list, in that it's null by default, but for some reason it was treated as a normal list in multiple places.
2021-09-05 16:24:07 -04:00
Ghom
38b81ec732 Replaces MATERIAL_NO_EFFECTS with MATERIAL_EFFECTS. (#61166)
* Replaces MATERIAL_NO_EFFECTS with MATERIAL_EFFECTS.

* build warning and codermonky's advice.
2021-09-04 13:35:24 +08:00
Kylerace
740a471dbb large refactor of machine/power code to cut down on processing time and wasted lists (#60317)
original pr here: #59789 (Closed because he didn't think it was good enough)
came back to this because i realized that

    all machines were area sensitive, meaning they had a list with at least a reference to themselves (assuming they arent in the contents of another movable which most arent) for the purposes of handling power differences when their area changes
    pipes are machines
    there are ~14k machines and ~6k pipes
    i made this problem worse with a recent pr by making it a nested list

so i needed to track what machines needed power, and this pr had work already done that could be used for that purpose. now machines that have use_power == NO_POWER_USE do not have this extra memory overhead for no reason

currently every machine that uses power draws that amount from its area from a dynamic channel via auto_use_power() which is called every SSmachines fire(), then in apc/process() the area's dynamic power draw is reset and the power is used. with static power its not calculated then reset every loop, its just taken from the grid. so now machines handle updating their static power usage from their current area (this doesnt touch power machines that require a wire connection). in order to allow this, use_power, idle_power_usage, and active_power_usage have setters to track state correctly and update the static power usage on the machines current area and handle area sensitivity.

also goes through a lot of heavy abusers of SSmachine processing time and tries to make it faster. makes airalarm/process() into a signal handler for COMSIG_TURF_EXPOSE since air alarms only need to process for changes.
Why It's Good For The Game

SSmachines isnt the heaviest hitter in terms of total cpu and certainly not in terms of overtime, but its not a lightweight. it frequently takes > 50ms to complete a run and seems to be in the top 5 or so of subsystem costs looking at some round profilers

also gets rid of a few thousand lists since every pipe no longer has two useless lists each (and any other machines that dont use power)

Love ya kyler

Co-authored-by: Rohesie <rohesie@gmail.com>
2021-09-01 18:10:47 -07:00
Krysonism
989700c980 Adds a new rare mushroom: The odious puffball! (#60609)
* Adds puffballs
2021-08-25 23:03:49 +02:00
Watermelon914
ffe2750744 Refactors connect_loc_behalf into a component (#60678)
See title. Also refactors caltrops into a component because they use connect_loc_behalf which requires them to hold the state.

This also fixes COMPONENT_DUPE_SELECTIVE from just outright not working.

connect_loc_behalf doesn't make sense as an element because it tries to hold states. There is also no way to maintain current behaviour and not have the states that it needs.
Due to the fact that it tries to hold states, it means the code itself is a lot more buggy because it's a lot harder to successfully manage these states without runtimes or bugs. 

On metastation, there is only 2519 connect_loc_behalf components at roundstart. MrStonedOne has told me that datums take up this much space:
image

If we do the (oversimplified) math, there are only ever 5 variables that'll likely be changed on most connect_loc_behalf components at runtime:
connections,
tracked,
signal_atom,
parent,
signal_procs

This means that on metastation at roundstart, we take up this amount: (24 + 16 * 5) * 2519 = 261.97600 kilobytes
This is not really significant and the benefits of moving this to a component greatly outweighs the memory cost.

(Basically the memory cost is outweighed by the maint cost of tracking down issues with the thing. It's too buggy to be viable longterm basically)
2021-08-17 12:16:12 -07:00
LemonInTheDark
cd576ab519 Del The World: Unit testing for hard deletes (#59612)
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
2021-08-15 21:09:26 -07:00
Fikou
80ff565548 Revert "Revert "Barticles for bonfires 2021 (#59869)" (#59916)" (#60469) 2021-08-12 16:12:00 -07:00
Krysonism
b8b347722d Drugs of the 26th century. Three new hella rad drugs, one less lame drug and more! (#60432)
* lead stuff

* kronkus + loot table

* one drug sprite

* kroncaine

* drug items

* addiction stuff

* makes this compile

* plane master controllers

* small adjustments

* bro its a comment CHILL OUT

* temp

* desc and sprite update

* temp

* hmm

* invisible1

* invisible2

* fixes

* It compiles

* misc drug fixes

* signal

* synthesis

* fix

* span macros

* kroncaine filter removal + no speedup on cuffs n narsie rune

* makes the ampoule visible.

* hud-b-gone

* revert

* reverts more

* sound enviroment

* on_transfer & animated fade

* adrenal crisis + unknown

* blastoff signal

* blastoff adjustments

* filters

* small fixes

* animation parallel

* Taste, sounds and feel

* span proc

* final touches

* review and integration fix

* less blood, more fun

* moth and blood fix

* KronKaine and bLaSToFF spelling fix

* Assorted bLaSToFF fixes and range change

* suggestions from head head head coder

Co-authored-by: floyd <Floydje123@Hotmail.com>
2021-08-09 12:03:36 -04:00
MrMelbert
6c4cb8d3dd Uncomments holymelon "check liked" code, makes it work with the edible component (#60697) 2021-08-04 05:12:50 -07:00
MrMelbert
9b78fc1f95 Kills the now defunct /datum/plant_gene/core (#60646) 2021-08-02 18:04:42 -07:00
Wallemations
575903ebe8 Makes all food flower items unable to decompose (#60450)
I was told earlier today that some flowers decomposed, which I had no idea about. Turns out some flowers are technically food! I couldn't add it to the mapload PR because I wasn't home at the time, so I'll have to make this small PR instead.
Please make sure this PR has that one tag that makes it so I can't get GBP for it, thanks.

If someone wants to make the place look pretty with flowers I'd prefer not to hinder that with insects.
Furthermore, it made no sense for some flowers to decompose, but for others not to.
2021-07-28 17:37:51 -03:00
MrMelbert
7d60246939 Logs kudzu tray planting in investigate botany instead of its own investigate file (#60458)
This PR moves the investigate_log subject of Kudzu being planted in a tray to investigate_botany instead of its own log file.

All the other kudzu logging is in investigate_botany so this one was the odd one out. Consistency for logging.
2021-07-28 17:36:27 -03:00
MrMelbert
c049efef92 Fixes rose mouth sprites (#60415)
This PR fixes the mouth sprite for the rose. I accidentally broke it when I moved all the hydroponics worn sprites into their own file.
2021-07-25 16:18:02 +01:00
interestingusernam3
b55056a805 Makes hedges not a child of /obj/structure/fluff (#60383) 2021-07-23 13:57:32 -07:00
tralezab
3326f9a439 Kills grown/misc.dm (#60360) 2021-07-22 03:38:35 -07:00
MrMelbert
2e5c694c98 Cleans up a buncha messed up spans on the plant analyzer (#60201)
Cleans up some of the spans on the plant analyzer from the mass span conversion PR. Find and replace did not do wonders for the plant analyzer formatting (which is probably partially my fault).

Also adjusts some visible_message formatting and some text formatting of the plant analyzer.
2021-07-22 08:16:04 +01:00
Ryll Ryll
e6a7221158 Fixes clicking the floor degrading deathnettle durability (#59906)
This PR neatens up deathnettle and nova flower after_plant_attack procs a bit, mainly making so you must attack an object or a mob in order to lose durability. I also cleaned up some of the procs and argument types so they're consistent.
2021-07-19 17:03:15 -03:00
Krysonism
5d507cfbad The great pumpkin resprite. (featuring new blumpkin hats!) (#59853)
This PR resprites the pumpkin, blumpkin and the carved pumpkin hat.

It also adds a blumpkin variety of the carved pumpkin.

To avoid duplicate code, blumpkins and now children of pumpkins, this means some pumpkin recipes will also accept blumpkins.
2021-07-12 17:59:55 -03:00
小月猫
c085fdde21 Updates Seed Extractor Examine (#60011)
* Updates Seed Extractor Examine

* formatting

Co-authored-by: Aki Ito <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>
2021-07-07 16:53:54 -04:00
spessbro
4e891fb72e carnivory is visible (#59927) 2021-07-04 16:41:52 -07:00
Mothblocks
7eacef421a Revert "Barticles for bonfires 2021 (#59869)" (#59916)
This reverts commit 0ad74e9637.
2021-07-01 11:01:26 +12:00
tralezab
0ad74e9637 Barticles for bonfires 2021 (#59869)
* barticles

* better bode
2021-06-30 14:31:48 -07:00
cacogen
d3dd525e08 Cannabis has more believable effects (#59360)
Adds cannabis reagent and replaces space drugs with it in cannabis products
Adds space drugs to rainbow weed, which fits its theme and might satisfy the people who miss the effect
Removes lipolicide from cannabis products in favour of the reagent consuming nutrition directly
Cannabis reagent gives you messages describing symptoms of cannabis intoxication, makes you laugh, makes you hungry, has a chance to couchlock you buckled to a chair and put you to sleep lying down
Cannabis no longer references hallucinating, can't be overdosed and has no addiction
Adds Stoned status effect, which is applied by cannabis reagent
Stoned status effect slows you down, gives you bloodshot eyes, makes you clumsy, boosts your mood and gives you the drugged sound environment
Adds "stoned" icon state for Stoned status effect screen alert (sprite shamelessly stolen from the Smoke spell)
Adds BLOODSHOT_EYES trait, which is applied by Stoned status effect
Adds examine eye descriptions for bloodshot eyes and player-chosen red eyes
Adds cannabis movespeed modifier, which is applied by the Stoned status effect
Adds Stoned mood event, which is applied by Stoned status effect and gives the same mood boost as High but doesn't reference tripping
2021-06-27 21:14:48 -03:00
DragonTrance
279c93a0a7 Adds Defines for Species IDs (#59797)
Simply puts species IDs into defines ("lizard" turns into #define SPECIES_LIZARD "lizard"). This does not affect any gameplay, and is purely for making sure future code doesn't go all fucked up because someone accidentally misspells something

I only changed code that was spelt correctly, so if there actually is a typo somewhere, it isn't changed
2021-06-25 15:30:16 -03:00
LemonInTheDark
6fcbce39cd Makes turfs persist their signals, uses this to optimize connect_loc (#59608)
* Makes turfs persist signals

* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear

* Converts all uses of connect_loc over to the new patterns

* Adds some comments, actually makes turfs persist signals

* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work

* bro fuck documentation

* Changes from a var to a proc, prevents admemems and idiots

* Extra detail on why we do the copy post qdel
2021-06-22 23:12:34 -04:00
tralezab
e4794b51db Fix carbon roses mutating into carbon roses (#59640) 2021-06-15 19:42:56 +01:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
MrMelbert
f61c47f371 The nth grown food refactor: Changes MOST unique plant effects into special plant genes/traits! Plant Genes+ (#59107)
* Auto doc'd much of grown botany food and plant traits and renamed a buncha variables and parameters to match modern contribution guidelines.
* Cleaned up a good bit of plant gene code left over from the prior refactor and modernized some of it.

All plant effects that were once unique to a plant are now un-graftable, un-mutatable, un-shearable plant traits - called IMMUTABLE traits.
The ultimate goal of this PR was to make all of the hidden, arcane traits that are spread through botany's various plants and add a way to figure out they exist in game. Take omega-weed, for example, which has a maximum volume of 420 units.


What does this mean for the enterprising botanist?

In most cases, all the plants should act the same way. None of the immutable traits are graftable from any of the plants, they cannot be sheared off of the plant, and they cannot be mutated randomly from strange seeds or high instability mutations.

Though, in refactoring these traits, two things have been fixed: Novaflower's on hit and Deathnettle's on hit now proc again. If you aren't aware, Novaflowers apply firestacks and Deathnettles paralyze on hit. They've been in an unreachable code segment for a few years now and i'm not sure if they should be "fixed" or not, since I think they don't need any buffs.


A few other things have changed:
* Liquid Contents can no longer be applied to plants with Hypodermic Prickles, and visa-versa. They already didn't work together, but this means you need to go through an extra step to make LC-deathnettles.
* Killer Tomatos no longer have liquid contents. Didn't really make sense, anyways.
2021-06-13 17:03:13 -03:00
EOBGames
b05af8b31d Add Lizard Food: a Taste of the Homeworld (#59412)
The aims of this commit are threefold:

 - To introduce lizard culture (based upon Common Core) in a tangible way.
 - Give some more variety of techniques and recipes to the chef and bartender.
 - To give some flavour (metaphorically and literally).

🆑 Inept, Coiax, AdipemDragon, YakumoChen
add: The release of the new cookbook, "Tiziran Cooking: a Taste of the Homeworld" has brought Lizard food to the masses! Try out some new treats, like Moonfish, Nectar Larvae, and perhaps even Headcheese at the kitchen today!
add: To coincide with the new popularity of Lizard cuisine, Nanotrasen now stocks seeds for Korta Nuts, a common ingredient in lizard cooking, in the Megaseed vendors. Botanists, you know what to do.
add: A few Tiziran fish are also available for you aquaculture lovers out there. They all like saltwater!
add: A few new snacks are also now available at the station's snack vendors, for those of you too lazy to visit the kitchen.
/🆑

Co-authored-by: coiax <yellowbounder@gmail.com>
2021-06-12 20:01:44 +01:00
LemonInTheDark
f90e8cf7a3 Fixes a bunch of harddels that are sourced from player action (#59371)
Sourced from #59118 and a cursed project I'll pr later, This pr contains a lot of harddel fixes for stuff that pops up after a player interacts with something. I'm not gonna list them all here because there's something like 60 130, check the commit log if you're curious

Oh and I moved ref tracking screaming to a separate define, and made some optimizations to the thing in general. I think that's it, this pr is a bit of a frankenstine
2021-06-10 21:44:23 -03:00
MrMelbert
3a036bd23a Adds quick-swapping for biogenerator containers (#59525) 2021-06-10 17:00:23 -07:00
MrMelbert
1df5311415 Converts Poppies, Lilies, Geraniums, and Rainbow Bunch flowers to GAGS (#59332) 2021-05-30 14:00:23 -07:00
Kylerace
e13fe75590 use SIGNAL_HANDLER REEEEEE (#59242)
makes as many procs as i can find use the SIGNAL_HANDLER define which i assumed they all already did
2021-05-24 15:28:02 -04:00
Celotajs
190d0a0384 Replace alert usage with tgui_alert (#58419)
Pretty much every alert() call is replaced with tgui_alert, except one I replaced with tgalert as a fallback. If tgui_alert exists, why not use it?
2021-05-20 22:43:27 +12:00
tralezab
ea57e3f960 Kills BOTH /poison paths by turning poisonous into an element. (+fantasty prefix, sanity on attackingtarget signal, and more) (#58882) 2021-05-09 16:49:59 -07:00
MrMelbert
72fec84289 Gives botany plants a new formula for calculating bite size, fixes swallowing watermelons whole (#58795)
About The Pull Request

This PR gives botany plants a new formula for getting the size of their bites.

The formula is (potency / 20) * (max_volume / 100) * (modifier) + 1.

This brings your average 100 potency plant to a bite size of 6 units per bite. [(5 * 1 * 1) + 1] - For reference, a Tomato has 14 units of reagents with default genes at 100 potency, so this means a tomato is eaten in 3 bites.

This PR also goes through and audits all the plant's bite modifiers to bring them in line with the new formula. This makes the bite modifier actually a bite modifier instead of some weird constant var that lies about what it actually does.

Fixes #55527
Why It's Good For The Game

Currently, all plants are eaten in a single bite. Including watermelons and the dank weeds. This is bad.

image

This PR brings them all in line so you no longer swallow watermelons whole, so you stop accidentally getting fat.
I also audited all the plants so their relative bitesizes make sense with the new formula. Only apples and potatos are eaten in 1 bite. Plants with more reagents naturally should now have larger bitesizes, and plants with less reagents have smaller bitesizes. Balance is restored.
Changelog

🆑 Melbert
fix: You no longer eat all botany plants plants in 1 bite. Apples and Potatos retain their unique 1 bite behavior.
code: Botany plants use a new formula for calculating bite size. All botany plants have had their bite modifier adjusted to match.
/🆑
2021-05-09 12:16:42 +12:00
Kylerace
08df8798ce (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc (#58340)
Co-authored-by: Jared-Fogle <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2021-05-07 03:54:03 -07:00
LemonInTheDark
c906c44393 Fixes a fuck ton more harddels (#58779)
Redoes how geese handle eating shit, it was fucking stupid and caused harddels, and while this method is technically slower in the best case, it's a fucking goose
Fixes action related harddels, I hate how they work but at least this way they won't hold refs.
Fixes the hierophont causing its beacon to harddel
Removes the M variable from megafauna actions, it was used like a typed owner and caused harddels, so I burned it
Fixes target and targets_from harddels, replaces all setters of target with LoseTarget and GiveTarget, which should help maintain behavior. I'm not sure if this breaks anything, but if it does we should fix the assumptions that code makes instead of reverting this change
Fixes more area_senstive_contents related harddels, we need to allow the mob to move before clearing out its list.
Fixes marked object harddels (I'm coming for you admin team)
Fixes a language based human harddel
Fixes managed overlay related harddels (This was just emissive blockers, but I think this is a good safety net to have. If we clear the overlay list we should clear this one as well)
Fixes bot core harddels, I hate the fact that this exists but it has no reason to know who its owner is
Adds a walk(src, 0) to simple_animal destroy, it's the best bang for the buck in terms of stopping spurious harddels. Walk related harddels aren't that expensive in the first place, since byond does the same thing I'm doing here, but this makes finding mob harddels easier, so let's go with it
I fixed another source of part harddels, I hate fullupgrade so much
Fixes all the sound loop harddels
2021-05-05 10:57:27 -04:00
ATH1909
09a2913717 the backfire effect of killer tomatoes no longer requires the liquid contents trait (#58880)
* e

* accidentally modified the wrong one, whoops
2021-05-05 01:33:40 -04:00
LemonInTheDark
4e53d8c4bc Removes some boiler plate from working with atmos code (#58885)
Everything that called turf.assume_air and turf.remove_air was already updating turfs, and all that not tying

the two together did was add more boiler plate, and break things when people forgot about it.

This shouldn't add any overhead outside of hotspots, but I think that's trivial
2021-05-05 01:31:30 -04:00