Commit Graph

198 Commits

Author SHA1 Message Date
Paxilmaniac
7082880bf3 Stairs DLC: Buildable stairs, material datum staircases, fall up a staircase (#70504)
Adds a few new types of stairs, and makes stairs buildable within rounds.
Also removes the terminator sprite variation for stairs, because its basically unused and really not needed with plane cube multiz.
2022-10-17 16:23:37 +02:00
John Willard
91f02f2a6b canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE (#69790)
* canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE

The most idiotic thing I've seen is canUseTopic's defines, they literally just define TRUE, you can use it however you want, it doesn't matter, it just means TRUE. You can mix and match the args and it will set that arg to true, despite the name.

It's so idiotic I decided to remove it, so now I can reclaim a little bit of my sanity.
2022-10-01 09:47:52 -07:00
LemonInTheDark
65aa4464a4 Allows most big object construction on lavaland again (#69781)
When I moved asterioid stuff off /floor, I neglected some logic that
blacklists building on non floors.
Given that this USED to work on you know, asteroid tiles, I think this
is build to catch space and such

So I replaced it with a closed check, and a turfs_without_ground
typecache use, which should serve the same intent

So you can like, you know, ash lizard again

I swear I was gonna do this earlier, just sorta forgot all about it
2022-09-11 20:26:57 -04:00
RandomGamer123
0f373cb58b Stop stacks merging when in a machine and not being used as a construction part, fixes #68456 (#69295) 2022-08-24 22:48:05 -04:00
oranges
f9339af596 Prevents NAN amounts infecting the chemistry reagent container system (#69017)
* Don't allow NAN into the reagent holders, and better reporting on add reagent and remove reagent

* Replace admin message with stack_trace and return and improve math defines to check for finite numbers

* Refactor things to use these new defines, attempts to fix unit tests by filtering out <= 0 amounts first

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2022-08-08 18:17:35 -04:00
Tastyfish
9b00923ebf Improves stack recipe UI Search (#68780)
* Improves stack recipe ui search

* Changes Stack interface to be called StackCrafting
2022-08-02 21:01:49 -04:00
magatsuchi
7d0f393f5d Tsu's Brand Spanking New Storage: or, How I Learned To Pass Github Copilot As My Own Code (#67478)
Currently, storage works as a subtype of /datum/component, utilizing GetComponent() and signals to operate. While this is a pretty good idea in theory, the execution was pretty trash, and we end up with alot of GetComponent() snowflake code (something that shouldn't even need to be used frankly), and a heaping load of scattered procs that lead into one another, and procs that don't get utilized properly.

Instead, this PR adds atom_storage and proc/create_storage(. . .) to every atom, allowing for the possibility of storage on quite frankly anything. Not only does this entirely remove the need for signals, but it heavily squashes down the number of needed procs in total (removing snowflake signal procs that just lead to one another), reducing overall proc overhead and improving performance.
2022-07-08 18:13:18 -07:00
CocaColaTastesGood
f9056bcda1 Fixes stack multiplier exploit (#67514)
ye
2022-06-05 23:27:42 -04:00
MrMelbert
4fa6e49c61 Adds radial support + balloon alerts to stack crafting, cult metal now uses a radial when making buildings (#66938)
* Adds radial support to stack crafting
- uses it for runed metal

* Unit tests

* Balloon alerts and toilet lives
2022-05-16 09:34:52 -04:00
Seth Scherer
a3add37618 Refactors the forensics component into a datum (#66809)
About The Pull Request

This was doing things component really shouldn't be doing, and now all
of its behaviour is contained onto a datum, as it should've been the
whole time
Why It's Good For The CODEBASE

some things just really shouldn't be components, this was made back when DCS was first implemented and just thrown in because it was the new hot thing i guess, but datumized forensics makes far more sense, AND doesn't use GetComponent

TODO:

    More thorough testing to make sure nothing broke

Changelog

🆑
refactor: Turned the forensics component into a datum.
/🆑
2022-05-16 16:33:59 +12:00
magatsuchi
2c74bb39e9 fixes unintended merge behavior (#66495) 2022-04-25 22:00:47 -07:00
John Willard
4db7a58ec7 Adds logs to crafting (#65952) 2022-04-05 21:08:28 -04:00
小月猫
b757fce02a New in-wall engine sprites (#64839)
adds new variants for each sized engine to look like they are in walls (basically cut down sprites with their density set to false (because they dont take up the full tiles, especially the huge engines are 3x3 but only take up 1x3, they must have no density or they block way more than they should))

before: dumb looking gap
image

after: nice clean engine (and box trams are soul filled, also, trams kinda too small to really get any sort of diagnal design working)
image

showcase of each sized thruster:
image

added new structures that act like walls but arent turfs, and can only be used (and can be used!) on trams!
comes with 3 types, iron, plastitanium, and titanium. supports more types being added if you want but these are basically all that a tram needs to use:
Untitled.1.mp4

also removed a duplicated APC in a maint on tram, and removed cycle helpers from random maint airlocks that arent actually meant to cycle (they are solo)
Why It's Good For The Game

engines are kinda too bulky and organically shaped so they dont really fit some designs such as tram as a good example, in wall designs allow you to add thrusters onto any shaped ship easily without worrying about ensuring the walls around them being shaped right, as it appears to have the bulk of the engine merged inside the wall
Changelog

cl Nari Harimoto
imageadd: New thruster sprites to allow for in-wall designs
fix: removed cycle helpers from 2 random tram maint airlocks that arent meant to cycle (solo airlocks) and a duplicated APC in tram maint
expansion: the tram now has new walls! they are structures that function like walls so as to be built on the tram, create and deconstruct via the new tram girder (screwdriver on the girder to deconstruct, there is no displaced version ie wrench)
/cl
2022-03-02 09:06:51 +13:00
Jeremiah
30253cf6a8 Tgui input refresh (#64331) 2022-02-05 19:44:59 +02:00
Tim
14deaa41ed Remove code/__DEFINES/misc.dm (#63879)
This removes code/__DEFINES/misc.dm and moves all the defines to either:

another existing define file
new define file
local .dm file if the define was only used in one file
I also deleted defines that were not being used and added documentation to all of the ones that were moved out of misc.dm

Why was this needed? People were basically using the misc.dm file as a dumpster to toss all their defines into that was creating one giant mess. The defines have been organized into their proper groups and files now.
2022-01-23 14:30:27 -08:00
Jeremiah
dcab86ba2c More standard tgui input conversions (#63464) 2021-12-24 13:04:18 +02:00
Jeremiah
1052bc19ed TGUI input box conversions 1 (#63313) 2021-12-11 14:21:35 -08:00
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
Ryll Ryll
1b8fcac4f5 Nerfs bone wounds to make them less miserable (#61196)
So I've always kinda known that bone wounds are unpleasant to receive, but since paying some closer attention to how they affect peoples rounds in the last few months, I've realized that they need to be reigned in some more. So, let's break down the big changes...
General bone wound nerfs

Limping on a busted leg is now a chance with each step of that leg, instead of always happening: No matter how small the delay added to your move time after each step (like if it was just a dislocation), and even with slings, bone wounds on your leg crippled you with the constant slowdown, because they happened every time you stepped on that leg. Now, the chance to limp on any given step with that leg is higher with worse wounds, and applying a sling to that leg further lowers that chance, as well as lowering the delay from that limp. A dislocated leg, for example, only limps 30% of the time, while a compound fracture limps 70% of the time.

Skeletons and plasmamen (aka carbons with no flesh) can now use bone gel directly on cracked limbs to fix them, in 1/4th the time it takes the normal bone gel + surgical tape improvised fix to heal them, and with none of the damage. I felt bad that the ability for skeletons to stick dismembered limbs back into their slots was destroyed because the limbs would be critically wounded already, and still useless. Now, skeletons and plasmamen can be treated with just bone gel and some time. At some point after this is merged, someone should give the pirate ship some free bone gel.

The speed of the improvised bone gel + surgical fix for broken bones is even further improved by laying down and by sleeping than it was before, meaning the improvised fixes can be cut down further by laying down for a bit while it works.

Makes bone wounds less obnoxious, reducing their ability to single-handedly ruin your round when you suffer one. I want to go further in the future and add an easier improvised fix for hairline fractures soon, but those changes can come later after these are merged.
2021-09-17 21:25:46 -07:00
Gamer025
fd7e7e4c05 Add fingerprints before putting item in hand (#61330)
Fixes runtimes when crafting stack items and already having a matching stack in your hand
2021-09-10 18:32:29 +01:00
Colovorat
6e3b74da04 Fixes cable merging, changes merging code just a little bit (#60997)
Makes stack code support merging two different stacks with the same mats, but different mats_per_unit numbers by implementing averages.

It's in an attempt to support the stupid efficiency shit that protolathes do. It's not great, but it ought to work alright for now. Kinda a bandaid
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-08-24 15:38:24 -07:00
Timberpoes
9e40310100 Fix item stacks qdeling themselves in Init and some item stack self-merge scenarios. (#60835)
* Feex

* Fix stack self-merging thanks to connect_loc

* Better doc

* Cyborg item stack qdel issue
2021-08-20 07:48:27 +08:00
Timberpoes
75a3717a04 Modifies right click logic so that it is not the same priority as modifier keys. (#59656)
Strips out the existing right click code - Due to the myriad of ways right clicking has been implemented, dedicated signals and procs for right clicking without modifiers are fundamentally incompatible with our system of primary and secondary attacks.

Adds additional signals to attacking code. These signals allow atoms to cancel the attack chain early on secondary attacks, or override the standard procs and not send signals to prevent any undesired behaviour from signal handlers.

Items that used RightClick procs have been converted to attack_hand_secondary.

The slaughter demon, having its own set of snowflake code as poor OOP principles have been applied in UnarmedAttack() procs with lacking calls to parent procs and arbitrary redefinition of behaviour, checks for a right click in its own UnarmedAttack() and performs a bodyslam off that.

Storage components now hijack the secondary attackby stage via signals to handle their opening and closing shortcuts on right click. When you right click a storage component equipped item with an object in your active hand, the object has an opportunity to perform its logic in pre secondary attack code and cancel the attack chain. If it does not cancel the attack chain in pre-attack, then the storage component takes over for attackby and, if possible, opens the relevant inventory and ends the attack chain.

The forensic scanner is a proof-of-concept of this working in action. With its scan logic moved from afterattack code to pre attack code for right clicking, right clicking with the scanner will now perform a scan where previously one was impossible. Left clicking still does what it always does - Scans at the very end of the attack chain.

The logic still isn't perfect - For example, you still can't attack containers in melee even in combat mode (you'll either open them or put your weapon into them regardless of which option you choose) - But this is a better setup overall which allows for items to at least override this behaviour in pre-attack if needed.
2021-06-24 14:30:33 -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
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
Emmett Gaines
f434bf5e7b Fixes connect_loc related hard dels (#58945)
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-05-13 14:17:10 -07: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
Seth Scherer
5ba06243bc Adds a new obj_flag that prevents building on objects that shouldn't be built on. (#58719)
Adds a new obj_flag that prevents building on objects that shouldn't be built on.
Adds it to the stasis bed and the sleeper, as well as some machines that become undense when the doors opens (nanite chambers, DNA scanners, suit storage unit, and gulag teleporter).

If I forgot any feel free to lmk.

Fixes #58528 (Operating table + stasis bed memes)

Some objects/machines that aren't dense (or become undense in certain states) shouldn't be able to be built upon, so this flag allows for specifying that you can't build on it.
2021-04-27 17:20:59 -07:00
Arkatos1
40e1e41fe4 Stack splitting now uses right click (#57837)
Co-authored-by: Arkatos <arkatos1234@email.com>
2021-03-20 16:36:02 -07:00
TemporalOroboros
e2e7ccdbdc /mob/living/proc/Life(delta_time) (#55534)
- Makes `/mob/living/proc/Life` and most related procs use `delta_time`
- Procs that had snowflaked timing systems, such as breathing, addiction, and advanced diseases were left unchanged.
2021-02-19 10:24:20 -05:00
TemporalOroboros
e4079c87b8 update_appearance (#55468)
Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
2021-02-19 12:06:18 -03:00
LemonInTheDark
5c22a0cfc1 Converts many proc overrides to properly use list/modifiers, lots of other smaller things (#56847)
Converts many proc overrides to properly use list/modifiers, fixes some spots where modifiers should have been passed, calls modifiers what it is, a lazy list, and cleans up some improper arg names like L, M, C, and N. Oh and I think there was a spot where someone was trying to pass M.name in as a string, but forgot to wrap it in []. I fixed that too.
2021-02-16 09:18:46 -05: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
CRITAWAKETS
9e0ba6c384 Updates Bronze to be a lot better, fixes bugs and allows it to be used on grilles. (#56696) 2021-02-10 02:12:40 -08:00
LemonInTheDark
20d2fb6787 reverts Adds Neon Carpet (#55782), it appears to have been causing massive amounts of maptick (#56496)
It appears to have been causing massive amounts of maptick, this'll need a testmerge so we can test my hypothesis
2021-02-03 06:27:53 +00:00
TemporalOroboros
1f1b58bb26 Adds Neon Carpet (#55782)
* Adds emissive carpet, adds plane support to decal element

- Adds a basic abstract/debugging emissive carpet
- Makes decals capable of supporting plane
- Adds auto-smoothing decals

* Adds simple neon carpet variations

* Adds neon carpet reagents and recipes

* Refactors emissive blockers to allow multiple layers of emissive / emissive blocking objects

- Splits the emissive and emissive blocker plane masters into several plane masters which handle different layers of emissiveness.

* Makes neon carpet tile stacks emissive

* Rearranges and docs some emissive plane masters

- Folds the overlay lighting plane master into the emissive planes since it is also used to mask the lighting plane

* Fixes null mats_per_unit stack recombining after splitting

- I think I broke this a while ago when I reworked how stacks handle materials. Whoops.
- This basically only effects carpet at the moment. Good thing I did this when I did!

* Adds neon carpets to cargo

- Adds a cargo supply crate containing a _lot_ of neon carpets for 3000 credits

* Fixes neon carpet highlights leaking through vending machines and such

- Turns out vending machines axed their own emissive blockers whenever they updated their icon because they cleared their managed_vis_overlays...
- Generic emissive blocking has been elementized and some update_overlays procs have been straightened out.

* Fixes id_arg_index for the emissive blocker element

* Commits @Rohsie's suggestions
2021-01-25 01:55:04 -08:00
Timberpoes
1989497576 Frame stacking fix and unit test addition. (#56287)
* Reverts #56205

* Allow things without density to bypass checks

* The rest of the owl

* The rest of the owl

* Doc and tweak

* More feex

* RCD machine frame unit test

* I suck

* AAAAA

* Bad at unit tests

* Revert unit tests (for including in another PR)

* Fix windoor_assembly return logic

* Comment /mob/living/proc/PushAM logic

* Windoor assembley logic tweak

* Fix frame stacking

* Unit test

* Better wording from macros?
2021-01-22 21:18:05 +08:00
TemporalOroboros
976c1fcb8c [READY] Bespoke Datum Mats (#55296)
* Bespoke Material Backend

- Adds support for bespoke materials:
  - Reimplements [/datum/material/var/id]
  - Ports GetIdFromArguments from SSdcs
  - Adds a wrapper define for GetMaterialRef
  - Adds [MATERIAL_INIT_BESPOKE]
  - Adds [/datum/material/proc/Initialize]
- Does not actually add any bespoke materials

- [ ] TODO: Code docs
- [ ] TODO: Actually adding bespoke materials

* Some has_material procs and cleaning up some spaghetti

- Adds a pair of has_material procs for use in checking whether a given atom has a given material

* Adds meat

- Adds bespoke meat variants
  - Does not make them accessible
- Shuts up the linter

* Implements bespoke meat

- Makes the material container preserve bespoke materials
- Makes the sheetifier accept bespoke materials
- Makes the autolathe accept bespoke materials
- Makes the gibber produce bespoke meats

* Makes butchering produce bespoke meats

This is jank and really needs to be folded into a unified butchering and gibbing system

* Material documentation

- Adds, fixes, and touches up some documentation

* Material container insertion callback

- Changes the proc used to expand the material container's material list ot a proc used to check whether a material fits into a material container
- Instantiating new materials is no longer O(n) relative to the number of autolathes in existence.

* Makes processing meat conserve materials

- Makes bespoke meat carry over into meatballs

* Makes preserving custom materials an option

- Implements the ability to turn preserving custom materials _off_ for processor recipes

* Fixes all bespoke materials of the same type using the same singleton

- We use ids now, not just types.

* Makes the fat sucker produce bespoke meats

- Because consistency is good.

* Fixes autolathes merging bespoke stacks into normal stacks.

* Makes the callback to test materials for holdibility optional

- @Floyd

* GetMaterialRef -> GET_MATERIAL_REF

- We capitalize macros.

* Removes an extraneous callback

- Makes the sheetifier use functionality I didn't notice I implemented a few commits ago.

* Makes mob and species meat null compatible

* Fixes the ore silo

- The ore silo had really snowflake material handling that has been brought in line with the rest.
- The materials should show up in the correct order.

* Fixes minor lathe bugs

- Fixes stack_traces caused when lathes tried to fetch materials using reagent typepaths
- Fixed the selective reagent disposal topic. I have no idea how long this has been broken.

* Various documentation fixes

- Clarified a couple comments
- Removes an extraneous ?. operator
- Fixed mat floor tiles having bugged reagent temperatures

* More fixes

-/datum/material/meat/mob -> /datum/material/meat/mob_meat
- Adds atom typecheck to material containers.

* Fixes old typepaths
2021-01-15 23:39:58 -08:00
Ghom
bd582f2098 Fixing bugs about the worst simple_animal coded in and material tiles. (#54885)
Fixed floorbots applying floor tiles onto already tiled turfs.
Fixed floorbot issues with material tiles.
Fixed emagged floorbots spawning lattice when deconstructing floor into plating.
2021-01-11 18:03:54 -08:00
TemporalOroboros
31b940968e Fixes borg tiles (#55858)
- Fixes greyscale material floor tiles created from cyborg stacks
- Makes cyborg stacks contain materials
- Prevents a potential bug involving metalgen and stacks
2021-01-01 14:09:43 -05:00
Qustinnus
f887155b27 Kills oldfood, Puts newfood on top. (#55160)
Slays the last of old-food, making new-food the new normal.

Co-authored-by: MrMelbert <kmelbert4@gmail.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-12-04 00:11:47 -08:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
TemporalOroboros
9f694d82ea Fixes cyborgs in general replenishing stack modules from external sources (#54935)
* Cyborg stack fix

- Makes cyborgs capable of recycling floor tiles again

* Touches up module code

- Makes module code slightly more OOP-compliant
- Speeds up module creation by an imperceptable amount
- Reworks how borg modules handle stacks
2020-11-26 00:45:52 -08:00
Ghom
4c31b0e116 CanUseTopic() refactor. (#54747)
* CanUseTopic() refactor.

* Forgot about default_can_use_topic. Tested and working.

* Update bin.dm

* no-nonsense.
2020-11-25 13:12:12 +01:00
TemporalOroboros
4b4363be15 Fixes a few bugs with greyscale stacks. (#54858)
Fixes greyscale floor tiles merging regardless of their materials.
    Fixes greyscale floor tiles voiding materials when splitting the stack.
    Fixes greyscale floor tile stacks being created with no mats_per_unit and only enough custom materials for a single unit.
    Fixes greyscale tile flooring being created with the wrong amount of materials.
    Fixes greyscale tile flooring not producing floor tiles/producing floor tiles with 0 units.
2020-11-10 14:13:01 -03:00
ZeWaka
9629feed35 Converts A && A.B into A?.B (#54342)
Implements the ?. operator, replacing code like A && A.B with A?.B

BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.
2020-10-13 16:43:53 -03:00
Qustinnus
cf11ade4d7 Nerfs uranium material effects, and changes how effective materials are on sheets and statues (#54178) 2020-10-06 13:01:48 -07:00
Arkatos1
6613107bb6 tgui: Interface improvements (#53902)
* Tgui improvements

* Shuttle Console tweaks

* Status color keys

* Rebuild tgui

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-09-26 06:10:19 +03:00
AnturK
61e5c556df Custom statues and sculpting changes. (#53154)
### Gameplay changes:
- Spacemen lose their ability to sculpt all minerals into statues barehanded, you need a chisel now.
- You can now create carving blocks out of 5 sheets of most materials.
- Using a chisel on the blocks you can designate what to carve in it (including the preset statues from before).
- Chisels can be printed at autolathe, there's also one in art storage.
### Code changes:
- Squeak component now squeaks on attack_hand for structures.
- Radials now accept atom paths automatically extracting the name with initial.
- Base and rigid stack recipes renamed appropriately.
- Statues now use custom materials.
2020-09-23 02:46:01 -03:00
Arkatos1
676d0d60ef tgui: Stack menu (#53657)
* Stack TGUI

* Improvements

* Cyborg sanity
2020-09-17 17:54:00 +03:00