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
/🆑
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
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.
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>
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.
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
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
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
Speeds up gas movement significantly
Documents the intent and finer details of the atmos system (Thanks dunc)
Fixes excited groups constantly rebuilding, this broke 4 years ago
Fixes superconductors just straight up not working
Allows turfs to sleep while inside an excited group
Adds a new subprocess to SSAir to support rebuilding in this state
Most heat based behavior no longer relies on being inside a fire
Adds a new element to support doing this cleanly
Adds a new subprocess to SSAir to support doing this while a turf is asleep
Refactors air_update_turf to allow for finer control
Makes apcs take damage in heat to prevent infinite plasma fire diffs
Cleans up immutable gas mixtures to make them work properly when the mix has gas in it
Planetary turfs no longer create a new copy of themselves each time they process. We instead use a global
immutable mix
Cleans up a typed for loop in reactions
Canisters will take damage from outside heat now
Speeds up excited group dismantle
Increases the superconductor threshold by 200k
Cleans up some roundstart ATs on some ruins
Uses /turf/open/var/excited to track if a turf is actively processing, preventing a |=
Prevents openspace from trying to melt
Tweaks a canister examine line
Makes planetary turfs reset to base when broken down as part of an excited group
Makes it impossible for planetary turfs to rebuild, just like space tiles
Fixes closed turfs not activating their replacement when destroyed by moving closed -> open turf activation to
the adjacent air subsystem. They were activating and then going back to sleep before adjacent air got a chance
to tick.
Fire alarms will trigger when the area gets too cold for humans
* HARK! THERE ARE SOME MAIDENS THAT NEED SAVING!
* claymores, chairs
* mapmerge, price increase, no losing the flag, no teleporting in, other small stuff
* oldworld language, medieval mutation, reviews
* see desc for full changelog
huge improvements to how medieval speech feels, CTF now fully lit, json beautified, bugs squashed and more NOTELEPORT exploits also quashed. (I NEED TO UNDO THIS FOR ATOMIZATION)
* removes my fixes? also bugfixes and CTF separation
* dumb json mistake, starting work on reality simulators
* BOWS ARE BROOOOOOOOOOOOOOOOOKEN
* br
* getting closer to working
* well, mostly everything now.
* finally ready
* removes languages stuff as it is buggy and does not work, fixes more bugs, fixes more bugs, fixes more bugs
* conflict fix
* linting
* more lint
* bow buff, speech fix, TON of ctf fixes
* oh fuck year
* NO MORE INSTA DELETING CREW
* whoops
* review handled
* pooosh
* conflict fix
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.
This turns wheelys into a skateboard subtype so they are no longer a copy paste of old skateboard code. They have lower stability compared to skateboards.
I've also made a whole bunch of small adjustments in the process to make skateboard code cleaner and more modular, such as turning the improvised skateboard to its own subtype so that construction steps don't need to be overwritten for all subtypes
Adds two subtypes of wheelys:
-Rollerskates: more stable than wheelys but slow you down when the wheels are retracted
-Skishoes: For skiing! Only work on snow, obviously
I wanted to add some fun alternatives to skateboards with their own drawbacks, and the ski shoes were an opportunity to do something fun for icemoon maps
* 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 better grass sprites, ported from eris
converts fairygrass into those sprites too
makes "plating" grass and jungle grass smooth with cool stuff on the edges
adds a sandy dirt tile, removes the old "sand" icon which was just puke colored noise
* Fixes holodeck making invisible tables.
* Removes comment.
* Remove extra space.
* Just gets rid of overlays from forbidden vars list.
* Small map fixes for the lounge sim.
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.
* Renames a few variables. Also reorders fallback order again.
Renames item_state to inhand_icon_state
Renames mob_overlay_icon to worn_icon
Renames mob_overlay_state to worn_icon_state
worn_icon_state/mob_overlay_state now never gets used for inhands.
* Fixes some comments
* Fixes map issue
* Restart lints
* Properly resolves conflicts
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.
* Refactors screen object update_icon to call parent
And makes update_icon an /atom proc
* Cleans up some missed null checks
The student teaches the master