**1. Meat hook**
#75422 gave auto lathe's the ability to consume an item AND it's
content's recursively so the autolathe can display multiple messages if
it founds item's in that object content's which it will also recycle.
This might catch player's off guard as they would not have expected that
item to contain other stuff inside it so now the auto lathe(and any item
implementing material container component) will display that item name &
it's material worth being consumed.
**New Format.**
Here i inserted 3 item's
1. Shotgun
2. Foam Box Riot(full ammo inside)
3. Stack of iron
The red line indicates where one item end's and the other one begin's.
Notice how every part of the shotgun(it's bean slugs and even it's
firing pin) are consumed and the same for the ammo box(the box + 40 of
it's bullets)
**2. Tentacle Gun**
this is an abstract item
So even though the auto lathe understood that & didn't touch it, it
still tried to consume it's contents leaving behind an non functional
tentacle gun.
Now it will early return if the item is an hologram/abstract and won't
touch any of that item's content's
**3. Other Patches**
- Indestructible item's inside an item's content's are not consumed but
forced moved out
- the total material worth of the item & it's contents are calculated
and we check if there is enough space for all of them before we attempt
to insert. This is important so we don't break an object by consuming
only some of it's contents and leaving out the rest
Changed hardcoded matter bins values to use defined
`SHEET_MATERIAL_AMOUNT` for following stuff: autolathe, protolathe, mech
fabricator and component printer.
`Material Access Bar` and `MaterialIcon` used for protolathes, circuit
printers and etc. now also use defined `SHEET_MATERIAL_AMOUNT`, via
static ui data, to prevent same issues in future.
Also changed some notes in /// parts just because why not.
## About The Pull Request
So, I've had this idea to make a contribution to the Bepis feature with
some modsuit stuff. The gimmicky stuff is ok and a good way to even out
the better content since it has game of chance design it has (you can
find those disks in space anyway so...). However, the Experimental
MODsuit node feels very underwhelming right now, compared to how big
that feature is.
This PR adds three MOD modules to the Experimental MODsuit node, plus
two more:
- Magneto Charger: While the Modsuit is activated, each step the user
takes will charge the installed power cell by a tiny bit, enough to
sustain a standard modsuit of generic slow speed with only a few, easy
modules installed. It won't work in zero G, while flying, pulled by
someone else, on a conveyor belt, riding a vehicle or crawling on the
floor, though.
- Recycler: It collects (most) garbage and casings off the ground and
recycles them into material sheets that can be dispensed on an adjacent
location or storage with with Middle Mouse Button. Doesn't clean debris,
and scuffed because most trash doesn't yield material anyway.
- - It also has two subtypes, unbound from the node: one that dispenses
riot foam darts and can be found on the black market, and another that
dispenses the more innocuous foam darts, rarely found in maints.
- Shooting Assistant: A configurable module. On Stormtrooper mode, it
will give the user a faster fire rate (the double tap trait) at the cost
of accuracy. On Sharpshooter mode, it will improve the user accuracy and
make their shots ricochet against walls at least once (if the hit atom
allows that, that is, e.g. lasers don't ricochet against iron walls), at
the cost of movement speed. Both modes also prevent the user from dual
wielding guns.
To make the Stormtrooper mode stackable with the poor aim quirk and
refrain from making a new trait for the sharpshooter mode, the gun
spread code in gun.dm has also received a little refactor and cleanup.
Also, it's been tested.
## Why It's Good For The Game
The Experimental MODsuit node is quite shabby and could use something
extra to make it more appealing to MODsuit enjoyers.
Also doubles down as a small addition to the black market and maint
loot, and code cleanup, since gun code gives off some garbled vibes.
## Changelog
🆑
add: Expanded the Experimental MODsuit Bepis node with three new
modules: Magneto Charger, Recycler and Shooting Assistant.
add: Added a Riot Foam Recycler module to the black market, as well a
more innocuous version as maint loot.
/🆑
## About The Pull Request
Signals were initially only usable with component listeners, which while
no longer the case has lead to outdated documentation, names, and a
similar location in code.
This pr pulls the two apart. Partially because mso thinks we should, but
also because they really aren't directly linked anymore, and having them
in this midstate just confuses people.
[Renames comp_lookup to listen_lookup, since that's what it
does](102b79694f)
[Moves signal procs over to their own
file](33d07d01fd)
[Renames the PREQDELETING and QDELETING comsigs to drop the parent bit
since they can hook to more then just comps
now](335ea4ad08)
[Does something similar to the attackby comsigs (PARENT ->
ATOM)](210e57051d)
[And finally passes over the examine
signals](65917658fb)
## Why It's Good For The Game
Code makes more sense, things are better teased apart, s just good imo
## Changelog
🆑
refactor: Pulled apart the last vestiges of names/docs directly linking
signals to components
/🆑
**1. Material Container Refactors**
a. `/datum/component/material_container/proc/insert_item()`
- Will now do stack spliting i.e. it will consume as many sheets from a
stack as possible and leave out the rest, It was moved from a player
interaction feature in `user_insert()` to this low level allowing many
things to take advantage of it
- Will now delete the item for you if it could salvage any materials
from it, you don't have to do it explicitly anymore if insertion was
successfull (i.e. this proc returns an non zero value) If you inserted a
stack and not all of it's sheets were inserted from the above point then
you still have to check it explicitly
- Will now invoke `after_insert` if any materials were salvaged
b. `datum/component/material_container/proc/user_insert() `
- Will now split the stack by the requested amount making precise
insertion work again & Fixes#72288
- will now consume all contents inside of the object reccursively, this
means items like ammo boxes will no longer have to adjust their custom
materials based on how much ammo they contain because `user_insert()`
will loop through all its contents and salvage the metal of every bullet
inside the box contents so this means
9686971c76/code/modules/projectiles/boxes_magazines/_box_magazine.dm (L206)
has been removed.
**The Problem with this proc**
take `/obj/item/ammo_box/foambox/riot` for example. it has 40 darts each
having 1125 worth of iron, this proc will add the total iron of all the
bullets to the box custom material so the box custom materials would
become
`5000(base iron of box. see the definition of
/obj/item/ammo_box/foambox/riot) + 45000(40 bullets each having 1125
worth of iron) = 50000 iron`
What happens when you throw this ammo box in an recycler? The recycler
will recycle this box(Now 50000 worth of iron) AND the iron of each of
it's 40 bullets thus yielding
`50000(iron from box because of update_custom_materials()) + 45000(40
bullets each having 1125 worth of iron) = 95000 iron` `
because of this single proc we got `95000 - 50000 = 45000 extra iron`
from thin air
**The Solution?**
Remove this proc and set a constant custom material value for the ammo
box(it's now 5000 computed see code) AND allow the material container to
loop through every bullet in the box and salvage iron from them. This
would yield
`5000(base iron of box. see the definition of
/obj/item/ammo_box/foambox/riot) + 45000(40 bullets each having 1125
worth of iron) = 50000 iron`
From both box & bullets combined and not just from the box alone
Fixes#43570Fixes#57548
This also allows you to do cool stuff like fill your bag with iron,
glass, whatever and dump them in the autolathe/ore silo by attacking the
machine with your bag rather than pulling out & inserting each item
individually so hey convinience
**2. Recycler patches**
- Recycler will stop consuming items when it runs out of power mid
recycling(which can happen if it recycles a large amount of items). It
used to previously run through the list of items without breaking so
even when power was lost, it still did it's job
- Recycler will now Properly recycle all the contents inside an atom.
**The Problem**
Say we have 2 Items
- Backpack
- Glass sheet inside Backpack
If we process the items in the following order while deleting each item
that is processed first "Backpack" then "Glass Sheet" then when
"Backpack" is fully recycled and "Deleted" since the "Glass Sheet" is
inside the "Backpack" it get's deleted as well, so when we actually try
to recycle the "Glass Sheet" next, nothing happens because it was
deleted when we deleted the "Backpack".
**The Solution**
Recycle the items in the reverse order first recycle the "Glass Sheet"
delete it & then the "Back Pack" so we don't deal with deleted items. So
you should see more materials come out when you put stuff inside storage
mediums & throw them in the recycler
- Recycler will consume only half the power when it's deleting items
that can't be recycled(no material was salvaged). just for convinience
Ladies, Gentlemen, Gamers. You're probably wondering why I've called you
all here (through the automatic reviewer request system). So, mineral
balance! Mineral balance is less a balance and more of a nervous white
dude juggling spinning plates on a high-wire on his first day. The fact
it hasn't failed after going on this long is a miracle in and of itself.
This PR does not change mineral balance. What this does is moves over
every individual cost, both in crafting recipes attached to an object
over to a define based system. We have 3 defines:
`sheet_material_amount=2000` . Stock standard mineral sheet. This being
our central mineral unit, this is used for all costs 2000+.
`half_sheet_material_amount=1000` . Same as above, but using iron rods
as our inbetween for costs of 1000-1999.
`small_material_amount=100` . This hits 1-999. This covers... a
startlingly large amount of the codebase. It's feast or famine out here
in terms of mineral costs as a result, items are either sheets upon
sheets, or some fraction of small mats.
Shout out to riot darts for being the worst material cost in the game. I
will not elaborate.
Regardless, this has no functional change, but it sets the groundwork
for making future changes to material costs much, MUCH easier, and moves
over to a single, standardized set of units to help enforce coding
standards on new items, and will bring up lots of uncomfortable balance
questions down the line.
For now though, this serves as some rough boundaries on how items costs
are related, and will make adjusting these values easier going forward.
Except for foam darts.
I did round up foam darts.
Adjusting mineral balance on the macro scale will be as simple as
changing the aforementioned mineral defines, where the alternative is a
rats nest of magic number defines. ~~No seriously, 11.25 iron for a foam
dart are you kidding me what is the POINT WHY NOT JUST MAKE IT 11~~
Items individual numbers have not been adjusted yet, but we can
standardize how the conversation can be held and actually GET SOMEWHERE
on material balance as opposed to throwing our hands up or ignoring it
for another 10 years.
## About The Pull Request
The material_container component now also grants whatever it is added to
a simple screentip of "Insert" on items that it can accept, if it is a
material container that can accept held items.
## Why It's Good For The Game
Now when a traitor feeds their 13 TC revolver into the autolathe they
will see a screentip for a few blissful seconds before pressing left
click anyway and sending an ahelp begging for their revolver back.
## Changelog
🆑
qol: material components (such as autolathes) have contextual screentips
if you can put an item inside of it
/🆑
## About The Pull Request
Part of a prior PR that was closed (#72562). This version does not add
the check in CI.
## Why It's Good For The Game
The work is already done, so I figured why not.
## Changelog
N/A Nothing player facing
Co-authored-by: Jeremiah Snow <jlsnow301@pm.me>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Makes the code compatible with 515.1594+
Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword
And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.
@tgstation/commit-access Since the .proc/stuff is pretty big change.
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
I recategorized EVERY /datum/design/ IN THE GAME to be more UX friendly and I HATE MYSELF FOR IT
I refactored techfab UI to WORK ANYWHERE for ANY MACHINE THAT USES /datum/design as a SET OF MODULAR COMPONENTS
I moved a lot of DESIGNS EXCLUSIVE TO THE AUTOLATHE to also work IN PROTOLATHES
I made MATERIAL ICONS animate between ICON STATES for STACKS
I PUT ICONS IN ALL OF YOUR FABRICATORS
I SOMEHOW DID ALL OF THIS WITHOUT LOSING ANY PERFORMANCE
ALSO SUPPORTS COMPONENT PRINTERS AND MODULE DUPLICATORS
Other garbage:
Fixed numerous spelling and consistency issues in designs
Removed Machine Design (<x>) and Computer Design (<x>) from all relevant designs
All designs are now in title case
Numerous designs that were formerly autolathe exclusives can now also be printed at a protolathe (but not all); this is mostly just service equipment like drinking glasses and plates and silverware
Circuits components can no longer be printed at a circuit imprinter (fixes
Integrated circuit components printed in the component printer/module printer cost twice as much than from an un upgraded circuit printer #67758)
Designs that are not sensible for a department to have are no longer accessible to that department (read: medbay printing turbine parts)
Why It's Good For The Game
Improved UX for techfabs, but also for mechfabs and autolathes, and oh look it's pretty!
also I spent like eight hours doing nothing but categorizing /datum/designs and I'll cry if some version of this doesn't get merged eventually
Changelog
cl
refactor: mechfabs, autolathes, component printers, and module duplicators now use techfab tgui components
refactor: every single design is now categorized and subcategorized
refactor: mechfabs and autolathes are now in typescript
qol: techfabs now have icons for what you're about to print
qol: techfab material icons are now animated
qol: techfab material icons now fade when no materials are available
qol: techfab searching no longer lags like hell
qol: techfab searching now searches all recipes instead of just the current category
qol: techfabs now have subcategorization (stock part users rejoice)
qol: techfabs now announce when new recipes are available
qol: numerous other techfab ui tweaks
balance: some designs that were formerly autolathe exclusive can now be printed at some departmental techfabs
* Autolathe takes as many sheets as it can fit
* what is invoke_async anyway
is this how you do it
* no i guess you do it like this
still use a dot though
About The Pull Request
Converts more inputs to TGUI. Possibly all user-facing input lists in the game.
Did any surrounding text/number inputs as well
Added null choice support so users can press cancel.
Added some misc TGUI input fixes
Fixed custom vendors while I was there
I refactored a lot of code while just poking around.
Primarily, usage of .len in files where I was already working on lists.
Some code was just awful - look at guardian.dm and its non use of early returns
If there are any disputes, I can revert it just fine, those changes are not integral to the PR.
Why It's Good For The Game
Fixes#63629Fixes#63307
Fixes custom vendors /again/
Text input is more performant.
Part of a long series of TGUI conversion to make the game more visually appealing
Changelog
cl
refactor: The majority of user facing input lists have been converted to TGUI.
refactor: Tgui text inputs now scale with entered input.
fix: Many inputs now properly accept cancelling out of the menu.
fix: Fixes an edge case where users could not press enter on number inputs.
fix: Custom vendor bluescreen.
fix: You can now press ENTER on text inputs without an entry to cancel.
/cl
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)
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>
About The Pull Request
This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:
Disarm and Grab intents have been removed.
Harm/Help is now combat mode, toggled by F or 4 by default
The context/verb/popup menu now only works when you do shift+right-click
Right click is now disarm, both in and out of combat mode.
Grabbing is now on ctrl-click.
If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)
Minor interaction changes:
Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game
Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.
As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.
As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.
In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.
The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog
cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
* 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
My original intention was just fixing an issue with the Mk-honk banana shoes but, considering I didn't want to add two new variables to a component with already lot of args and lengthy AddComponent() calls in term of text, I had to merge some TRUE/FALSE variable/args into the breakdown_flags bitfield (now named mat_container_flags) in the process.
Adds and implements alloy materials
Takes several materials that were mostly fluff and converts them into actual usable materials.
Messes with material code a bit to make alloys recycle back into their component materials.
Adds the alloy materials to their in-game stacks.
Materials added:
Plasteel
Plastitanium
Plasmaglass
Titaniumglass
Plastitanium Glass
Alien Alloy
Makes plasteel/plastitanium/plasmaglass and the rest able to have separate properties from their component materials. It doesn't make much sense that the materials used to seal off the supermatter chamber from the rest of the station would be prone to exploding when heated.
Allows for further expansion of materials, possibly including actual functional metallurgy and smelting at some point in the very distant future.
(Lemons note: Adds a regeneration component, used for alien alloy)
Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.
Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.
This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.
To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.
Requested by @optimumtact.
Changelog
cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl
Reverts #50951.
Some exploits arose that highlighted some areas in material code that need a rework, so it's best to revert this and make a fresh PR once the rework is finished.
Fixes#51540Fixes#51516Fixes#51406Fixes#51402Fixes#51393Fixes#51368Fixes#51344
* Mostly fixes material containers
* Please enter the commit message for your changes. Lines starting
* Reverts previous commit since that didn't work
This reverts commit c1da35c62912ce1173696e9bfe6e35aed4cdefea.
* finally working
* travis please
Co-authored-by: TerraGS <TerraGS@users.noreply.github.com>
removes materials list from items, uses custom_materials instead. This might introduce some bugs so we should testmerge this for a while (and Ill test stuff locally as much as I can)
this also adds material crafting to sheets. Test case being chairs. In the future we can add stuff like tables, walls, doors etc.
also applies materials to everything, with fixes, which can close#46299
add: The vault now contains an ore silo where the station's minerals are stored.
add: The station's ORM, recycling, and the labor camp send materials to the silo via bluespace.
add: Protolathes, techfabs, and circuit imprinters all pull materials from the silo via bluespace.
add: Those with vault access can view mineral logs and pause or remove any machine's access, or add machines with a multitool.
tweak: The ORM's alloy recipes are now available in engineering and science protolathes.
* kill BANG_PROTECT_2
* let's put this back in
* dirty
* kill OMNITONGUE_2
This is a write-only variable, probably leftover from some refactor years ago
* kill flags_2
* Ore Stacking
* honk
* honk
* component memes
* honk2
* fix overlay off-by-1, sheet singular names
* Give the ores more descriptive names since sheets also have
* whoops debug memes
* atom editor memes
* fixes
* snowdin fix