- Makes QDELETED use isnull(x) instead of !x, giving about 0.2 to 0.25s
of speed.
- Make disposal constructs only update icon state rather than go through
expensive overlay code. Unfortunately did not have much effect, but is
something they should've been doing nonetheless.
- Makes RegisterSignal only take signals directly as opposed to
allocating a fresh list of signals. Very few consumers actually used
this and it costs about 0.4s. Also I think this is just a bad API anyway
and that separate procs are important
`\bRegisterSignal\((.*)list\(` replaced with `RegisterSignals($1list(`
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>
About The Pull Request
Visible changes (all the fixes):
Labor point checkers now says the prisoner ID's stats rather than being a to_chat, it also displays their info much better.
Labor stacker no longer duplicates your points at no cost by attacking the machine with materials, instead it processes it just like it would when sucking materials up.
Labor stackers additionally now update their input/outputs when they are rotated through shuttles, as it doesn't work on the current version of Lavaland (there's no issue report up on this yet though, oddly).
Adds a check if you actually have a goal before checking if you can send the shuttle up, preventing prisoners who were sent without a point goal (permanently) from being able to go up whenever they wanted by simply clicking on the button before it greyed out.
The rest (code improvement):
Added more early returns
Removed single letter vars
Renamed terribly named vars and added comments to some of them.
Removed machinedir in favor of checking their view() when syncing machines, as I didn't find checking an entire side of the map next to an object to be very intuitive.
Lets Lavaland use labor camp machines again
Closes#67764
Just cool general fixes +1
Changelog
cl
fix: Labor camp Prisoners without a sentence can no longer send themselves back up whenever they wanted by clicking the button fast enough.
fix: Prisoners can no longer get infinite labor camp points by clicking the stacking machine with ores.
fix: All ore machines now properly change their direction when they dock a shuttle in a separate direction, fixing Lavaland's labor camp stacking machine.
qol: Labor camp's point checker now states all the information you need, rather than being a paragraph of text that just appears in chat.
/cl
I'm refactoring proximity monitors and fields, removing lots of bloat from both that's hardly even used. Proximity monitors no longer generate effect objects to track the surrounding area, should be less cpu expensive and easier to maintain (or phase out), read and use.
This PR also adds a couple components which may be needed for future stuff (for starters, the mirror reflection PR #62638 could use the connect_range comp)
Improving old old, ugly old code and adding some useful backend components. Tested and working.
## 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

## 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`
Enter(), Entered(), Exit() and Exited() all passed the old loc forward, but everything except a single a case cared about the direction of the movement more than about the specific source.
Since moving multi-tile objects will have multiple sources of movement but a single direction, this change makes it easier to track their movement.
Cleaned up a lot of code around and made proc inputs compatible.
I'll add opacity support for multi-tile objects in a different PR after this is merged, as this has grown large enough and I don't want to compromise the reviewability.
Tested this locally and as expected it didn't impair movement nor produced any runtimes.
* 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)
* Process procs now properly use deltatime when implementing rates, timers and probabilities
* Review fixes
* Geiger counters cleanup
Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now
* Moved SS*_DT defines to subsystems.dm
* Rebase fix
* Redefined the SS*_DT defines to use the subsystem wait vars
* Implemented suggested changes by @AnturK
* Commented /datum/proc/process about the deltatime stuff
* Send delta_time as a process parameter instead of the defines
Also DTfied acid_processing
* Dtfied new acid component
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
* initial
small thing
* improvements
1. Removes loops for picking up items. its now an item by item basis unless there is an ore box involved
2. Removed pickup_rate and ore_buffer var for the ORM, they aren't needed anymore
3. Fixed conveyors not moving items that get created on top of them (New / Initialize), by sending signals when atoms are created.
* renames the registered signal proc name so travis doesn't throw a fit
* signal improvement
* forgot to update other proc names
* ninjanomnom review changes
replace NEVER_PROCESS with START_PROCESSING_MANUALLY
default_unfasten_wrench override for ORM
50 -> 5 SECONDS
I totally didn't mispell anything
* makes a new signal: COMSIG_ATOM_CREATED
* more review changes
* duh
* even more review improvements
* switch >= to >
* reverts conveyors back to using process() for moving stuff
* various touch ups, adds documentation
* rebase to fix map conflicts with forgottenship.dmm
Co-authored-by: SteelSlayer <SteelSlayer@users.noreply.github.com>
Yeah yeah I know no opening too many WIP PRs but this one's [ready] and I want to make sure any furthur techweb development doesn't keep using the old reference system which will make refactoring it harder, and this makes it easier for coders to do stuff in theory (at least for me), standardizes getting a node/design, and makes stuff actually GC properly.
* 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
* Ports /vg/'s component system
* Fix component signalling itself for addition
* Fix the list arrangement for removal
* Whoops
* Return the existing component if the created one was deleted
* These can't be ints
* ,
* returning TRUE from a callback will mark the event as handled
* Small refactor
* Add powered components
* R e f a c t o r
* More wip
* Fixes et al
* Pure pain
* When bae tells you she was tabs but she was actually spaces
* RReee
* Needs arglist
* Fax
* Fax
* More better
* You fail me yet again git commit
* Some kajiggering, but there we go
* No more 3rd param = variadic
* fix
* Sanity
* Whoops
* Minor thing
* Whoops
* fax
* Better describe the function, + add ..()s
* Fix
* Port to Initialize
* fuk in git
* Processing machine cleanups, can smelt bluespace and titanium
* Another forceMove
* Lack of typing
* Rewrite using materials container, a target proc for container's release sheet procs
* Alloys
* The dme
* Nulls references on Destroy
* Makes the smelter infinitely large, like before
Added two new materials, Titanium and plastitanium. Titanium is naturally occuring, and plastitanium is an alloy made of plasma and titanium.
These materials can be used to build shuttle walls and floors, though this serves no current purpose.
Before you yell "SNOWFLAKE" about the materials, I have definite planned purposes for them, not to mention what else they could be potentially used for (mechs, R&D, etc.)
You can use titanium to make white shuttle walls that smooth (like the ones of the escape shuttle), and plastitanium to make the grey syndie shuttle walls. You can also make floor tiles out of each material for the different shuttle floors. This PR itself doesn't change any of the paths on the map to use smoothed shuttlewalls and I'll save that for a seperate PR.
Also this PR makes ORM code better and allows people to easily add new alloys
Sprites by WJ
Works pretty well. If it can't GC something, it'll just del() it and be done.
Speed is amazing, holy shit.
New procs you should be aware of:
qdel(atom/movable) - sets up an object for garbage collection. Call this rather than del(atom/movable).
atom/movable/Destroy() - called right before the object is GC'd, so it still has a loc. Also called if the object is del()'d.
new controller - garbage.dm has all the details on this. Basically it nulls all references on GC'd objects and force del() them if necessary.
Generally speaking, objects should use Destroy() for behavior prior to deletion rather than Del(). You should also always call the parent so the object gets the right gc_destroyed var set.
ISSUES:
Tries to GC mobs atm. This actually works for new players, not so much for humans/monkies/simple_animals/anything. I'm guessing it needs to clear out their mind and HUD and maybe other things.
Gibbing is really bugged. It works, but the overlays just sit there for awhile and ugh. I'm very tempted just to del() mob/living and mob/camera and call it a day.
qdel() equipment doesn't unequip the item.
Pipes don't generally GC correctly. Debugging suggests they get referenced in many pipenets and that isn't cleared properly. However some do work fine. Need assistance here.
Bots don't GC, probably in the radio controller.
Lots of other shit doesn't GC but it's hard to find them because of the pipe spam.
I think I'm calling Destroy() twice by accident.