* Fixes exploit that allowed players to disable the safety of holodeck consoles without the proper conditions being followed (#62563)
About The Pull Request
As the title says. Players were able to disable the safety of the holodeck without the console being emagged, and without being a robot.
Why It's Good For The Game
I think it would be interesting to add some sort of replacement to this, like players with high gamer skill could disable the safety.
Changelog
cl
fix: Fixes an exploit that allowed players to disable holodeck safety without following the proper conditions
/cl
* Fixes exploit that allowed players to disable the safety of holodeck consoles without the proper conditions being followed
Co-authored-by: CocaColaTastesGood <47264839+CocaColaTastesGood@users.noreply.github.com>
* Refactor /turf/var/intact (#62331)
Turfs have a variable, intact, which conflates three meanings:
Determining whether there's something that can be pried out, such as directly with a crowbar or indirectly with a tile stack and a crowbar off-hand.
Determining whether underfloor pieces are visible.
Determining whether underfloor pieces can be interacted with - by players with tools, through interaction with effects like chemical acid, or foam.
When plating is hit with a stack of tiles, /turf/open/floor/attackby checks whether the turf is intact, and if so, ends the attack chain regardless of whether or not the attempt to hotswap a turf (with a crowbar) is successful or not. However, turfs which want the underfloor to be visible - such as catwalks and glass - set the intact variable to FALSE, and so can be repeatedly placed over one another, as if they were the first tile to be placed over the plating.
This refactors /turf/var/intact into two distinct variables:
/turf/var/overfloor_placed, for whether or not there is something over plating.
/turf/var/underfloor_visible, for whether or not the various underfloor pieces should be invisible, visible, or both visible and interactable.
All references to /turf/var/intact have been replaced with an equivalent overfloor_placed or underfloor_visible reference, depending on which check is appropriate. underfloor_accessibility can take one of UNDERFLOOR_HIDDEN, UNDERFLOOR_VISIBLE, or UNDERFLOOR_INTERACTABLE. This prevents cases such as acid foam or tools phasing through glass floors to affect the underfloor pieces underneath, and covers all kinds of unusual, not-wiring-visiblity usage such as Holodeck completeness, Revenant interaction, or station integrity checking.
* Refactor /turf/var/intact
* Thank
Co-authored-by: esainane <esainane+github@gmail.com>
Co-authored-by: Funce <funce.973@gmail.com>
* Adds SHOULD_NOT_SLEEP to Destroy. Why didn't we do this before. (#61943)
* Adds SHOULD_NOT_SLEEP to Destroy. Why didn't we do this before.
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* 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>
* large refactor of machine/power code to cut down on processing time and wasted lists
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Rohesie <rohesie@ gmail.com>
* fixes hard del with objects created from holodeck spawners (#60140)
turns out mobs spawned from holodeck spawners dont get registered for qdeletion, now they do. hard dels btfo
hard dels are poo poo and holodeck issues are definitely 100x worse
* fixes hard del with objects created from holodeck spawners
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* fixes bug with holodecks referencing self deleting atoms in spawned (#59355)
decals were hard deleting whenever you loaded a holodeck program with them because it wasnt taking them out of the spawned list, now it does that. also goes around holodeck code and changes for loops to as anything and puts in better var names.
also since its been a while since i looked at holodeck code, the thing could really use a better rewrite one of these days.
* fixes bug with holodecks referencing self deleting atoms in spawned
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* 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
* USE SIGNAL_HANDLER REEEEEE
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Adds proper logging to Holodeck safeties and programs (#58149)
* Adds proper logging to Holodeck safeties and programs
* a more elegant solution
* Adds proper logging to Holodeck safeties and programs
Co-authored-by: TheVekter <TheVekter@users.noreply.github.com>
* Fixes bug with atoms (including new players!!!!) not spawned from the holodeck being deleted by it if they happened to be initialized at the same time (#57510)
About The Pull Request
Fixes#57446
yeah not my best moment, holodeck currently sets SSatoms to add every call to InitAtom() to a list and then give it back to the holodeck console (it actually goes through map_template/holodeck to do it but whatever). However it turns out atom/New() calls InitAtom too, so if an atom is created while SSatoms is still creating the list to give to the holodeck then that atom is added to the list regardless of whether or not its actually from the holodeck template.
Now theres an extra argument to InitAtom that tells it whether its spawned directly from a map template (ie, its part of the input list of uninitialized atoms that InitializeAtoms was given) or otherwise the output list that the holodeck uses is populated by calling GetAllContents on all atom/movables spawned directly from the template.
also renamed some vars in initTemplateBounds because it was hard to reason what it was doing and made it use as anything
also note that loading a map template with returns_created_atoms = TRUE will no longer track atoms that arent in the map file but are spawned directly onto a turf, currently nothing does this with the holodeck (which is the only map template that has this feature)
by the way this bug is my fault
Why It's Good For The Game
incredibly incredibly unlucky new players dont deserve to be deleted just because they didnt spawn in the holodeck
Changelog
🆑
fix: the holodeck is no longer so powerful that it can destroy anything and everything that dares to start existing while it's busy loading programs
/🆑
* Fixes bug with atoms (including new players!!!!) not spawned from the holodeck being deleted by it if they happened to be initialized at the same time
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* All Holobugs Must Die the Same Day Theyre Born or You Are Money Back Part Two (#56878)
runtime in holodeck/finish_spawn() that dealt with doing shit with the atoms in the spawned list, which in some cases cease to exist. now finish_spawn has a check to see if the entry in the spawned list actually exists.
also fixes another small issue with the holodeck process() continually trying to load the offline program and getting rejected which causes the holodeck to give the "ERROR. Recalibrating projection apparatus." message, which it no longer does if the program is forced.
* All Holobugs Must Die the Same Day Theyre Born or You Are Money Back Part Two
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Turbo fix for holodecks not clearing previous programs under live server lag (#56566)
Fixes#56561
the holodeck control console now returns if the previous program still has not finished loading in, so it should now be impossible to have two concurrent load_program() processes running at the same time and thus programs should not overlap under lag. tested locally with around 80% time dilation and 0 holodeck cooldown while spamming the fuck out of loading simulations
* Turbo fix for holodecks not clearing previous programs under live server lag
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* see title (#56536)
* Removes Holodeck Access Flags Feature That Shouldnt Have Been in My Previous Refactor
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Refactors Holodeck to Use Map Templates, Again! Black Magic OOM Crashing No Longer Included (#55645)
Refactors the holodeck to use map templates instead of copy_contents_to, which every maintainer seems to have complaints about.
Fixes#41485 because the matches become part of the spawned list created by ssatoms
Fixes#54789 because the holodeck area no longer has the NO_TELEPORT flag
Fixes#55676 because the map templates cant be changed midround unlike the program copies in the centcom z level
Fixes#49318 because the holodeck no longer creates new areas like the original did
This pr also changes initTemplateBounds to be a /datum/map_template proc instead of a parsed_map proc. This was mainly so I wouldn't have to duplicate vars between map_template and parsed_map. It's also nice because there's no longer a parsed_map proc inside the map_template file, especially when it didn't need to be a parsed_map proc.
The holodeck sims wont take up space in the centcom z level any more (which allows for more possible programs in the future), and map templates are more heavily tested. This is also a chance to future proof the holodeck against bugs. Holodeck also seems more responsive. This should allow for a second custom holodeck in some future ruin as well, although that of course will not be in play for the near future because of the offstation content ban. Also I documented the fuck out of the holodeck
* Refactors Holodeck to Use Map Templates, Again! Black Magic OOM Crashing No Longer Included
Co-authored-by: Kylerace <kylerlumpkin1@gmail.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>
* 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>
* Refactors machine_stat and is_processing() to process on demand (#53150)
* Refactors machine_stat and is_processing() to process on demand
* Fixes master (#53193)
* fixes master, damn it me/mothblocks
* fuck again
* ANOTHER ONE
* Fixes master
Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
About The Pull Request
/area/proc/usage() attempts to give list-like access to a bunch of vars. Why not make it a list instead and avoid all the proc calls? Might be room for followup here, to do something to powered(), use_power() etc.
Some legacy machinery was ignoring the default machinery use_power pulling from the machine's power channel by default
Total power usage was unused, APCs ignored it in favor of calculating it themselves :)
I also renamed the defines because they were in the danger zone of being very common words.
Changelog
cl Naksu
code: optimized area power usage calculations.
/cl
About The Pull Request
Extools maptick stuff is in the game. Stolen from BeeStation/BeeStation-Hornet#1119, improves performance. Requires ex-tools on the server, though.
Explosions have been refactored to do the actual exploding in a subsystem.
Credit to goon.
Here's some videos!
Why It's Good For The Game
Basically instant max-caps now.
We can now give more of a tick over to the sending of map updates
Changelog
cl Goonstation Coders, Beestation, Extools devs
refactor: Explosions have been heavily optimized.
/cl
Living and machine stat vars are pretty different, one uses flags and other number-defines.
This should make some other mass-replacements and searches a bit easier.
About The Pull Request
Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage.
Also changes a couple of places where a list was picked from instead of using get_sfx internal calls
This was done via regex:
(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1
(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0
full sed commands:
/(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE
/(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE
I'm not very good with regex and these could probably be optimized, but they worked.
Why It's Good For The Game
Code usability
About The Pull Request
Adds 'notice' span class to all visible_messages which had no span class, making all those black messages blue.
Why It's Good For The Game
This should help differentiate action-messages from talking-messages in the chat. More actions will be blue, thus black talking-messages should pop out more.
* Tones down values for a lot of different hotspot_expose calls
* Update LINDA_fire.dm (#38217)
* Automatic changelog compile, [ci skip]
* Slight changes to camera network code (#38223)
* Removes a useless var and corrects two cameras to use the automatic naming system to reduce dv usage.
* Damn github didnt notice this was here....
* Fixes datediff not returning (#38215)
* Fixes pocket items being deleted when monkeyizing (#38220)
* Automatic changelog generation for PR #38220 [ci skip]
* readds atmos heating from hotspot_expose(), as requested by naksu
* Tones down hotspot_expose values for sparks moving and destroying
* tones down item heat by a lot. no more burning your face off after smoking a cigarette
The component is initialized with any combination of three flags, EMP_PROTECT_SELF protects against effects that target the object itself, EMP_PROTECT_WIRES protects against wires being messed with similar to the NO_EMP_WIRES_1 flag which this PR removes, EMP_PROTECT_CONTENTS protects against things that are inside the object like organs, internal "non-virtual" power cells and the like
This enables (but doesn't introduce) new mechanics such as adding EMP shielding at runtime to any atom, or taking it away.
* It works, but is it worth it?
* bitfield helpers take 1
* Would this work?
* remove dangling debug code
* rebase & fixes
* vv bitfield stuff, reading
* DNM oceans of shitcode DNM
* honk
* honk2
* plonk
* rebase & fix
Shouldn't break anything, stops warning spam, logs errors qdel style at the end of the game.
Initialize now expects a hint to be returned, one of:
INITIALIZE_HINT_NORMAL - Does nothing, returned by the root proc
INITIALIZE_HINT_LATELOAD - Call atom/proc/LateInitialize
INITIALIZE_HINT_QDEL - Calls qdel on the atom
LateInitialize currently defaults to the old re-calling behavior so there should be no issues with that.
Things that didn't return a hint or fucked up somehow will be logged less loudly than they were before
No more world start warnings!