* 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.
* Converts all A && A.B into A?.B
Co-authored-by: ZeWaka <zewakagamer@gmail.com>
* Adds Alloy Materials (#53623)
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 Alloy Materials
Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
* Merge pull request #54049 from kriskog/auxbase
Adds separate aux base access
* Adds separate aux base access
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
* Enforce preserving parent proc return values across ui_act call stacks (#53964)
All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.
* Enforce preserving parent proc return values across ui_act call stacks
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Arcane finishes the fight and adds all the missing belt sprites and a worn sprite Admin Tool. (#53305)
* Arcane finishes the fight and adds all the missing belt sprites and a worn sprite Admin Tool.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
* Adds native chilly peppers to icebox flora. (#53544)
Now, icebox has a native plant that can be picked on the surface level, where the sunlight reaches highest, and rarely seen underground, and provides you chilly peppers. Traditionally a chili pepper mutation, the theme was close enough that I felt it'd be a good fit for the map, and helps break up the monotony of the map being ice, rock, and more ice with some harvest able flora.
* Adds native chilly peppers to icebox flora.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)
* 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
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities
Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
Makes acid levels a component.
Merges the acid effect object into the component.
Reworks acids decay rates slightly.
Rebalances xenos acid spit so that they can still melt through walls.
Misc. associated changes:
Adds defines for a lot of the acid associated constants.
Documents clean types and adds CLEAN_TYPE_ACID
Adds and implements a return bitflag for COMSIG_COMPONENT_CLEAN_ACT
Adds a looping sound for acid.
Makes /atom/proc/acid_act return a boolean.
Fixes waterclosets creating a new reagent holder datum every time they are used.
Removes waterclosets regenerating reagents on-use and restricts their reaction volume to 5 units.
Adds and implements a couple reagent signals.
Renames a few vars so Rohesie can stop telling me to rename more vars.
Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
* The great Spectral Blade permanent ghost trap unGBJing - 10/10 ghosts currently hate this blade (#53324)
Fixes a bug caused by transferring an orbiter component to a parent where one already exists. Causing the old original orbiter to update the added ghosts positions when the parent moves, but not allowing them to ever break orbit and also setting the ref to null for the component on the whole due to old signals it would seem.
Also tweaks the blades use in hand ghost notification message to remove the redundant (Orbit) link.
* The great Spectral Blade permanent ghost trap unGBJing - 10/10 ghosts currently hate this blade
Co-authored-by: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com>
* Mining sign fix. (#53251)
Turns old mining "signs" into turf decals instead
It looks nothing like a sign, so, this just made sense.
Moved the icon from the mining survival pod walls file, to the turf decal icons file.
Replaced every instance in the maps with the new type path.
* Turns old mining "signs" into turf decals instead.
Co-authored-by: uomo <51800976+uomo91@users.noreply.github.com>
* Bring back painting arbitrary objects with spray cans (#52936)
Brings back the behavior removed from #52186 with cleaner code.
Differences in the code:
No more explicit type checks in the spray paint code, other than a broad isobj.
Checking for dark colors is now based on luminosity, rather than unscientifically summing all the RGB components and checking an arbitrary number.
Removes the paintable component. This was used on one item, and its behavior is replicated in the spray can.
Instead of checking for windows specifically and changing opacity through there, atoms can now specify through init flags whether or not they allow dark colors. Windows set this flag.
Adds a COMSIG_OBJ_PAINTED signal. Windows use this signal to dynamically update opacity, just like how they did before.
This was a fun cosmetic feature that I'm not sure anyone had a problem with. The original reason for removal seemed to be because of code quality, and not because of negatives about the feature.
Makes canvasses unpaintable
* Bring back painting arbitrary objects with spray cans
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns
Edit: Most left out ones are in mecha which should be done in mecha refactor already
Oh my look how clean it is
Co-authored-by: TiviPlus <TiviPlus>
Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Couls <coul422@gmail.com>
* Kills bonus ore from the ORM. (#53073)
This was a mistake, and I regret doing it.
* Kills bonus ore from the ORM.
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
* Overlay lighting component (#52413)
Sparks no longer lag, projectile beams move super smoothly, same with mobs and whatnot. This also allows for easy expansion into directional lights, field-of-view, wee-woo rotating lights or whatever.
It does have a downside: things right-clicked or checked through the alt+click tab will show the light overlay:
This is a BYOND limitation, very well worth it IMO.
🆑
add: Smooth movable lighting system implemented. Projectiles, sparks, thrown flashlights or moving mobs with lights should be much smoother and less laggy.
balance: Light sources no longer stack in range, though they still do in intensity.
/🆑
* Overlay lighting component
Co-authored-by: Rohesie <rohesie@gmail.com>
* Completely remove the blood contract from the game, including the blood contract antag datum. (#53059)
* Completely remove the blood contract from the game, including the blood contract antag datum.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#52761)
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
* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
* Reworks the Hierophant Club as a general utility item and removes attacks. (#52880)
This PR reworks the Hierophant Club into a utility item. Mining? Gone. Attacks? Gone.
In their place? 5-tile range point-and-click instant teleport similar to the ninja. Max charge is 1. Recharge time is 15 seconds.
With the removal of this bloat, the item is now small enough to fit in the average backpack.
The hiero club establishes itself as the entry-level megafauna drop from the entry-level megafauna.
* Reworks the Hierophant Club as a general utility item and removes attacks.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Personalized combat messages part 2 (#52890)
Adds more "personalized" combat messages for all participants in a fight: the attacker, the victim and the spectators
* Personalized combat messages part 2
* Update misc.dm
Co-authored-by: kingofkosmos <riki.sundberg@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* fixes goliath tentacle crusher trophy not working (#52893)
it checked for health - max health instead of max health - health, so it would never pass the > 0 check and even if that wasnt a thing it would just heal
* fixes goliath tentacle crusher trophy not working
Co-authored-by: Fikou <piotrbryla@onet.pl>
* Icon smooth refactor (#52864)
bitflag list construct added: an associative list of bitflags for cheap and quick element comparison between two lists using the same system.
canSmoothWith list turned into a bitflag list.
smoothing_groups list added to substitute the type path list.
smoothing procs turned into atom procs, refactored and optimized a bit.
smooth directions redefined in order to fit in 8 bits for a future smoothing system
some variable names changed, foreseeing a second smoothing system
SMOOTH_OBJ flag added, for things that need to scan turfs for smoothing. The old locate() optimization has the risk of returning false negatives by finding a child and returning null while there might be one of the wanted type as well, as it doesn't match the type exactly.
SMOOTH_TRUE and SMOOTH_MORE condensed into SMOOTH_CORNERS. The old behavior can be replicated using smoothing groups without loss.
Does very minor code cleanup.
Processing-wise didn't find a noticeable difference. The system loses on init a bit by setting the bitflag_lists, and by scanning whole turf contents for object smoothing (increasing accuracy), and gains by making less checks per target to smooth, through the same bitflag_lists.
Memory-wise there should be a small improvement, given that on the old system we had 63512 canSmoothWith lists (a few typelists, most unique), and on this new system canSmoothWith + smoothing_groups are both bitflag_lists from the same pool, totaling 46 in number.
Could be tested a bit to see if I missed any icons not properly smoothing.
* Icon smooth refactor
Co-authored-by: Rohesie <rohesie@gmail.com>
* [Ready] CDN browser assets! (#52681)
Rewrites the asset_cache system to handle sending assets to a CDN via a webroot.
see https://github.com/MrStonedOne/tgstation/blob/asset-cdn/code/modules/asset_cache/readme.md
Fixed a lot of bugs with assets, removed some dead code.
Changes:
Moved asset cache code to transport datums, the currently loaded one is located at SSassets.transport, asset cache calls made before the config is loaded use the simple browse_rsc transport.
Added subsystem call for when the config loads or reloads.
Added a webroot CDN asset transport. assets are saved to a file in a format based on the file's hash (currently md5).
Assets that don't use get_asset_url or get_url_mappings (such as browser assets referred to by static html files like changelog.html or static css files) can be saved to browse_rsc even when in cdn asset mode by setting legacy to TRUE on the datum returned by register_assets
Added a system for saving assets on a cdn in a hash based namespace (folder), assets within the same namespace will always be able to refer to each other by relative names. (used to allow cdn'ing font awesome without having to make something that regenerates it's css files.).
The simple/namespaced asset cache datum helper will handle generating a namespace composed of the combined md5 of everything in the same datum, as well as registering them properly.
Moved external resource from a snowflake loaded file to a config entry, added it to resources.txt
To ensure the system breaks in local testing in any situation that wouldn't work in cdn mode, the simple transport will mutate the filenames of non-legacy and non-namespaced assets and return this with get_asset_url.
Simple transport's passive send of all roundstart assets to all clients is now a config that defaults to off. this is to break race conditions during local testings from devs accidentally relying on this instead of using send() properly.
cl
refactor: Interface assets (js/css/images) can now be managed using an external webserver instead of byond's one at a time file transfer queue.
admin: Adds admin verb toggle-cdn that allows admins to disable the external webserver asset transport and revert to the old system. Useful if the webserver backing this goes down (thanks cloudflare).
config: New config file, resources.txt, (must be loaded by an $include statement from the main config)
server: The external_rsc_urls.txt config has been moved to the main config system.
/cl
Porting notes:
Interface webpages must refer to their assets (css/js/image/etc) by a generated url, or the asset must register itself as a legacy asset. The system is designed to break in localtest (on simple/legacy mode) in most situations that would break in cdn mode.
Requires latest tgui.
The webserver must set the proper CORS headers for font files or font awesome (and other fonts) won't load.
/tg/'s webserver config: https://gist.github.com/MrStonedOne/523388b2f161af832292d98a8aad0eae
* [Ready] CDN browser assets!
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* immobilized (#52578)
Adds an immobilized trait.
Adds procs for several variable changes so we can respond to their events.
Adds some signals for said variables changing.
Need to turn the variation in number of usable legs and arms (get_num_legs() and get_num_arms()) into events we can respond to, but they are pretty annoying to do so. Probably for a different PR.
* Immobilized trait
Co-authored-by: Rohesie <rohesie@gmail.com>
* Refactors area stuff (#52751)
-bitfielded a bunch of bools on /area, I left some untouched cus they get called a lot
-Unused vars
-Fixed a var pretending to be a fake bool
-Probably more
* Refactors area stuff
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
* Cleanup up all instances of using var/ definitions in proc parameters. (#52728)
* var/list cleanup
* The rest of the owl
* plushvar bad
* Can't follow my own advice.
* Cleanup up all instances of using var/ definitions in proc parameters.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Merge pull request #52727 from MrMelbert/touchyfeely
Allows blind people to touch things to examine them
* Allows blind people to touch things to examine them
Co-authored-by: skoglol <33292112+kriskog@users.noreply.github.com>
* RCD Additions + Cyborg RCD Upgrades (#52018)
* adds directional window setting for normal grille window mode
adds furnishing upgrading to the rcd for chairs, stools, tables, and glass tables
both of these new introductions have their direction based on where you are facing when the timer for the build finishes
* adds the luxary rcd cargo pack with a loaded rcd, all 4 upgrade disks, and 3 extra compressed matter cartridges
* adds the furnishing upgrade to the techwebs
allows cyborgs to install rcd upgrades except silos
allows loading of metal and matter into the rcd by simply clicking on the thing you want to insert
lowers price of the cargo pack and removes the silo upgrade
adds banned upgrades var to the rcd
* you can now create windoors and deconstruct them as well
you can now deconstruct tables
doubles the price of the cargo pack for rcds
* removed cargo pack
* changes define to bitshift flags
moves matter addition to rcds to a proc on sheets
* matter amount is now a stack variable
* RCD Additions + Cyborg RCD Upgrades
Co-authored-by: Whoneedspacee <yougotreallyowned@gmail.com>
* Contributes more missing belt, back, and otherwise ERRORing sprites. (#52670)
* I'm crying over all these beeeeeeelts
* Removes ?
* Provides some close enough substitutes for inhands
* Contributes more missing belt, back, and otherwise ERRORing sprites.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
* Confusion will no longer continue to confuse after being cured (#52286)
* Confusion will no longer continue to confuse after being cured
* Grammar comment fix
* Move to status effect
* Remove test per request
* Make confusion a status effect, confusion curing now completely neuters the confusion
* set_confusion changes, get_confusion
* Fix confusion going down twice per tick
* Change strength = to proc
* Move procs to status_procs
* Confusion will no longer continue to confuse after being cured
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
* Color standardization, vars moved, and signals (#52574)
Defined all the existing light_color values.
Moved their definitions to colors.dm
Made white the default color. It was so already, but that was very obscured.
Moved the atom light-related variables to the atom definition.
Wrapped changes to variables such as light_color into procs that report the event through signals.
Moved the light_on variable to the atom level, also adding a signal for its changing, to represent toggling lights.
Cleaned up a little bit of code in where new variables were defined before redefinitions.
This is all atomization to reduce changes in #52413
None of this affect gameplay at all, it's all code cleaning and refactoring.
There's more colors to standardize, a search for color = will find lots of targets, and I see little need to have both the LIGHT_COLOR and COLOR patterns, but I don't want to make this PR bigger than it already is.
* Color standardization, vars moved, and signals
Co-authored-by: Rohesie <rohesie@gmail.com>
* Cleans up some unused procs and makes is_blocked_turf a turf proc. (#52482)
* Cleans up some unused procs and makes is_blocked_turf a turf proc.
* Update code/game/turfs/turf.dm
Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
* Cleans up some unused procs and makes is_blocked_turf a turf proc.
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Rohesie <rohesie@gmail.com>