Commit Graph

15062 Commits

Author SHA1 Message Date
John Willard
aee2a48600 burning things moving over a bonfire sets the bonfire on fire (#63674) 2021-12-31 19:55:44 -06:00
TemporalOroboros
7c5860c1bd Miscellaneous projectile phasing fixes/tweaks + fixes a typo in the blastcannon projectile. (#63581)
* Fix blastcannon typo. Hopefully fix blastwave phasing.

* Fix projectile phasing on direct target

* Should unspaghetti sniper bullet var definitions

* Makes phasing rounds phase

* Preserve original behavior of sniper rounds
2021-12-30 23:08:22 -06:00
John Willard
77fb7531cb fixes garment bag stacking + stops accessories from deleting themselves (#63684) 2021-12-30 18:40:59 -05:00
Jeremiah
9c6fdb567d TGUI list conversions + bug fixes (#63354)
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 #63629
Fixes #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
2021-12-31 11:07:28 +13:00
Kylerace
eef625cbce fixes the orion arcade machines broadcasting sec and medical comms and radios playing radio comms when theyre supposed to be off (#63647)
* fixes the orion console broadcasting sec and medical comms

* fixes radios broadcasting without a speaker if frequency is changed last
2021-12-29 23:49:21 -06:00
Fikou
4adebd7f02 modsuit works with speed potions + ai movement fix + file sortage (#63670)
modsuit examining now tells you about wire panels
fixes being able to remove stuff with the dna lock
fixes 63650
fixes 63633
sorts module files
2021-12-29 13:44:27 -08:00
TemporalOroboros
6b7df7b174 Fixes gunpowder and teslium grenades being completely nonfunctional. (#63393)
* Makes gunpowder work in grenades and bomb cores.

* Cleans up some of the code

* Commit

* Clears grenades reagent holder on detonation.

* Variable casing/bombcore holder volume, O(n*r) large chem grenades, and including holder reagents in the chem splash reagent check.

* Fix inverted early return
2021-12-29 17:03:06 +01:00
Fikou
f58848e2ec modsuit patch one (#63638)
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2021-12-27 14:47:59 -08:00
Tim
b58d98c417 Fix grenade casings blocking bullets without being deleted (#63562)
* Fix grenade casings blocking bullets
2021-12-25 20:00:58 -06:00
MrMelbert
7fefa76038 Binary key no longer tells players to shout at coders (#63572) 2021-12-24 20:32:19 -08:00
Fikou
7b38dd4ff7 MODsuits (#59109) 2021-12-24 12:00:24 -08:00
Krysonism
ecee2f2cb6 A christmas miracle! Adds english fruitcake. (#63557)
This PR adds the ability to craft english fruitcakes using:
    1 plain cake
    1 raisin
    1 cherry
    5u rum

It is an absolute holiday classic and quite different than most of our other cakes which are more sponge style cakes.
2021-12-24 10:54:41 -08:00
Jeremiah
dcab86ba2c More standard tgui input conversions (#63464) 2021-12-24 13:04:18 +02:00
Jeremiah
415e9dd7c1 Fixes typos in span, other html elements (#63510)
Atomizes a much larger PR for another time...
There are typos in span and other html messages that causes them to not render correctly or at all.
Bug fixes
Converts those instances of span to use the macro
2021-12-23 17:06:01 +00:00
oranges
e71e35e89c Mops no longer wet the turf when you refill them from the mop bucket (#63549) 2021-12-22 12:56:35 -08:00
Seth Scherer
b506c0aae7 Fixes foam and fire plane issues (#63516) 2021-12-22 06:03:22 -08:00
Seth Scherer
3a35c05220 Items in boxes now properly spawn with the IN_STORAGE flag (#63526)
sets flags properly
Fixes #57644
2021-12-22 10:22:35 +00:00
Seth Scherer
569bea315e Fixes being able to drag lockers with no slowdown (#63527)
Fixes #56828 (Wrapping a locker to nuke the slowdown, thus living the sonic speed life you've always desired)
2021-12-22 00:41:54 -08:00
Ghom
12bf03aa08 proximity monitors cleanup (plus connect_range and connect_containers components) (#62755)
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.
2021-12-21 23:49:08 -08:00
LemonInTheDark
9a059f5d5c Fixes garbage not being moppable (#63521)
Layers are the worst
Also updates the documentation for some parts of cleaning
2021-12-21 21:54:20 -08:00
carshalash
97452dd621 Adds moth seeds to seedvend and various moth food fixes (#63352)
* Eob you dork. Thanks for the moth drinks.

* this too.

* Update megaseed.dm

* Cooked pasta sheets instead of raw.

* Pepper

* Update misc.dm

* mmmh webedit :drooling:

* Update megaseed.dm
2021-12-21 01:25:36 -06:00
John Willard
3985484618 Enemies of the state/revolution cannot be defibbed (#63466) 2021-12-19 12:26:01 -08:00
Seth Scherer
6869abefb1 You can now resist out of nested containers (also fixes the GBJ associated with it) (#63449)
Co-authored-by: SuperNovaa41 <supernovaa41@protonmail.com>
2021-12-18 15:22:58 -08:00
Seth Scherer
307d86134c Fixes table slamming through impassable objects (#63446)
Co-authored-by: SuperNovaa41 <supernovaa41@protonmail.com>
2021-12-18 01:23:12 -08:00
LemonInTheDark
5bca18b575 Prevents shoving people into the locker dimension (Fixes other shove things too) (#63372)
Made this like half a month ago. Fixes #63095
Fixes #63096, all of it

People seem to be upset by being force moved into an open locker, can't imagine why. Let's start with this
I'll be back for the rest soon (I HAVE RETURNED)
2021-12-17 12:06:06 +00:00
MrMelbert
bae0967b8e Stops aux base turrets from hard-deleting (and 1 other fix) (#63424)
Fixes #62643

Fixes aux-base turrets from hard-deleting by handling their deleting on the aux base itself.
Converts the turrets list to a proper lazylist and cleans up some surrounding code involving the turrets list.
Also fixes a copy+paste error with tiny fans being placed.
2021-12-17 11:49:22 +00:00
Kylerace
d005d76f0b Fixes Massive Radio Overtime, Implements a Spatial Grid System for Faster Searching Over Areas (#61422)
a month or two ago i realized that on master the reason why get_hearers_in_view() overtimes so much (ie one of our highest overtiming procs at highpop) is because when you transmit a radio signal over the common channel, it can take ~20 MILLISECONDS, which isnt good when 1. player verbs and commands usually execute after SendMaps processes for that tick, meaning they can execute AFTER the tick was supposed to start if master is overloaded and theres a lot of maptick 2. each of our server ticks are only 50 ms, so i started on optimizing this.

the main optimization was SSspatial_grid which allows searching through 15x15 spatial_grid_cell datums (one set for each z level) far faster than iterating over movables in view() to look for what you want. now all hearing sensitive movables in the 5x5 areas associated with each spatial_grid_cell datum are stored in the datum (so are client mobs). when you search for one of the stored "types" (hearable or client mob) in a radius around a center, it just needs to

    iterate over the cell datums in range
    add the content type you want from the datums to a list
    subtract contents that arent in range, then contents not in line of sight
    return the list

from benchmarks, this makes short range searches like what is used with radio code (it goes over every radio connected to a radio channel that can hear the signal then calls get_hearers_in_view() to search in the radios canhear_range which is at most 3) about 3-10 times faster depending on workload. the line of sight algorithm scales well with range but not very well if it has to check LOS to > 100 objects, which seems incredibly rare for this workload, the largest range any radio in the game searches through is only 3 tiles

the second optimization is to enforce complex setter vars for radios that removes them from the global radio list if they couldnt actually receive any radio transmissions from a given frequency in the first place.

the third optimization i did was massively reduce the number of hearables on the station by making hologram projectors not hear if dont have an active call/anything that would make them need hearing. so one of hte most common non player hearables that require view iteration to find is crossed out.

also implements a variation of an idea oranges had on how to speed up get_hearers_in_view() now that ive realized that view() cant be replicated by a raycasting algorithm. it distributes pregenerated abstract /mob/oranges_ear instances to all hearables in range such that theres at max one per turf and then iterates through only those mobs to take advantage of type-specific view() optimizations and just adds up the references in each one to create the list of hearing atoms, then puts the oranges_ear mobs back into nullspace. this is about 2x as fast as the get_hearers_in_view() on master

holy FUCK its fast. like really fucking fast. the only costly part of the radio transmission pipeline i dont touch is mob/living/Hear() which takes ~100 microseconds on live but searching through every radio in the world with get_hearers_in_radio_ranges() -> get_hearers_in_view() is much faster, as well as the filtering radios step

the spatial grid searching proc is about 36 microseconds/call at 10 range and 16 microseconds at 3 range in the captains office (relatively many hearables in view), the new get_hearers_in_view() was 4.16 times faster than get_hearers_in_view_old() at 10 range and 4.59 times faster at 3 range

SSspatial_grid could be used for a lot more things other than just radio and say code, i just didnt implement it. for example since the cells are datums you could get all cells in a radius then register for new objects entering them then activate when a player enters your radius. this is something that would require either very expensive view() calls or iterating over every player in the global list and calling get_dist() on them which isnt that expensive but is still worse than it needs to be

on normal get_hearers_in_view cost the new version that uses /mob/oranges_ear instances is about 2x faster than the old version, especially since the number of hearing sensitive movables has been brought down dramatically.

with get_hearers_in_view_oranges_ear() being the benchmark proc that implements this system and get_hearers_in_view() being a slightly optimized version of the version we have on master, get_hearers_in_view_as() being a more optimized version of the one we have on master, and get_hearers_in_LOS() being the raycasting version currently only used for radios because it cant replicate view()'s behavior perfectly.
2021-12-16 19:49:27 -08:00
Seth Scherer
cd607d1770 Updates /code/game/objects/item/food/* to follow the style guide (#63051)
Updates every file in /code/game/objects/item/food/ to follow the style guide.
2021-12-16 01:28:19 -08:00
Azarak
19329cd74a Fixes objects with bad planes and FoV bugs (#63412) 2021-12-15 16:59:56 -08:00
Jeremiah
d17a60fb53 TGUI input box conversions 2 (#63395)
More text inputs converted to tgui, TGUI text and number input now more sanely handles ENTER key being pressed, you can now press anywhere in the window to enter the input. TGUI text input now considers placeholder text for the default valid state. IE, if there is default text you can press enter immediately without having to rewrite it just to recheck validity. Fixes: useSharedState => useLocalState. not only was sharedstate not needed but it opened up the ui to vulnerabilities
2021-12-15 14:12:04 -08:00
vincentiusvin
d69dd1f1dd Fixed rough iron false wall alert text and rough iron wall deconstruction amount. (#63389) 2021-12-15 01:08:41 -08:00
John Willard
2834383245 Makes all default job titles, defines. (#63357)
Jesus christ we were just waiting for someone to misspell something eh?
2021-12-14 17:48:46 -08:00
tralezab
82615e7462 Super Mega Mob Spawn Refactor (#63279)
About The Super Hyper Ultra Ultimate Deluxe Perfect Amazing Shining Mob Spawn Refactor

The Super Hyper Ultra Ultimate Deluxe Perfect Amazing Shining Mob Spawn Refactor is my attempt to clean up the file structure, the code, and the type tree for mob spawns.

    Splits mob spawn types into corpses (dead spawns) and ghost roles (living spawns you can possess). The vars that didn't make sense for corpses and vice versa for ghost roles are now appropriately there
    Because of above, there are no longer the fucking "death, roundstart, and instant" vars. thank god
    Removes a lot of single or very few used vars, whose properties can be applied on special().
    All Mob Spawns are given fitting folders instead of just being stuck in a single ghost roles file. Corpses are in the corpse folder, Ghost Roles are in the ghost role folder. Only exception are drones which should stay near their respective homes
    Just generally cleaner all around you know
    spider structures file renamed to spiderwebs now that spider eggs are gone

Why Super Hyper Ultra Ultimate Deluxe Perfect Amazing Shining Mob Spawn Refactor Is Good For The Game

The Super Hyper Ultra Ultimate Deluxe Perfect Amazing Shining Mob Spawn Refactor cleans up so many terrible cases and uses
Changelog For The Super Hyper Ultra Ultimate Deluxe Perfect Amazing Shining Mob Spawn Refactor

cl armhulen
refactor: Mob spawns are refactored, no more assortment of "random, instant, and roundstart" vars on every mob spawn type
refactor: if there are some minimal differences in how mob spawners feel, that's why!
/cl
2021-12-15 11:13:21 +13:00
LemonInTheDark
4610f700eb Fixes up multiz atmos connection, cleans some things up in general (#63270)
About The Pull Request

ALLLRIGHT so
Multiz atmos was letting gas flow down into things that should be well, not flowable into
Like say doors, or windows.

This is weird.

Let's get into some context on why yeah?

First, how do things work currently?

atoms have a can_atmos_pass var defined on them. This points to a define that describes how they interact with
flow.
ATMOS_PASS_NO means well, if we're asked, block any attempts at flow. This is what walls use.
ATMOS_PASS_YES means the inverse
ATMOS_PASS_DENSITY means check our current density
ATMOS_PASS_PROC means call can_atmos_pass, we need some more details about this attempt

These are effectively optimizations.

That var, can_atmos_pass is accessed by CANATMOSPASS() the macro
It's used for 3 things.

1: Can this turf share at all?
2: Can this turf share with another turf
3: Does this atom block a share to another turf

All of this logic is bundled together to weed out the weak.

Anyway, so when we added multiz atmos, we effectively made a second version of this system, but for vertical
checks.

Issue here, we don't actually need to.
The only time we care if a check is vertical or not is if we're talking to another turf, it's not like you'll
have an object that only wants to block vertical atmos.
And even if you did, that's what ATMOS_PASS_PROC is for.

As it stands we need to either ignore any object behavior, or just duplicate can_atmos_pass but again.
Silly.

So I've merged the two, and added an arg to mark if this is a verical attempt.
This'll fix things that really should block up/down but don't, like windows and doors and such.

Past that, I've cleaned can_atmos_pass up a bit so it's easier for people to understand in future.
Oh and I removed the second CANATMOSPASS from immediate_calculate_adjacent_turfs.
It isn't a huge optimization, and it's just not functional.

It ties into zAirOut and zAirIn, both of which expect to be called with a valid direction.
So if say, you open a door that's currently blocking space from leaking in from above, you end up with the door
just not asking the space above if it wants to share, since the door can't zAirOut with itself.

Let's just wipe it out.

This makes the other code much cleaner too, heals the soul.

Anyway yadeyada old as ass bug, peace is restored to the kingdom, none noticed this somehow you'd think people
would notice window plasma, etc etc.
Why It's Good For The Game

MUH SIMULATION
Also fuck window gas
Changelog

cl
fix: Fixed gas flowing into windows from above, I am.... so tired
fix: Fixes gas sometimes not moving up from below after a structure change, see above
/cl
2021-12-14 15:57:59 +13:00
Azarak
680ca7d3b9 Field of View and Blindness improvements [bounty + upstream push] (#63312)
About The Pull Request

I have received exemption from the freeze by Oranges.
This PR was originally done for Skyrat-tg, as a bounty. Oranges took interest and Skyrat people approved taking it upstream so I did. (original PR Skyrat-SS13/Skyrat-tg#9912 )
Features:
This PR adds "field of view" mechanics, which by default don't do anything.
Once you pick up and wear a gas mask you'll notice a cone behind you.
That cone will hide all mobs, projectiles and projectile effects.
HOWEVER... hidden things in the cone (or for people who are blind or nearsighted) will play a visual effect.

The fov cone shadow density can be adjusted

Technicalities:
Originally a component, but by Watermelon's advice I have made this a datumized behaviour instead. (semi-component) This way it is faster, less memory use etc. Once again a component
People have native fov, which can be enabled by a config, by default it's off. (or by an admin verb)
People have fov traits, which add the fov impairings to you, gas masks do that now. All clothes have a support for possibly applying them.
Moves all things that should be hidden onto a new plane which is just above GAME_PLANE, that was we can efficiently filter them out of clients views.
Being dead or extending your eye view (xenobio console) will disable the FOV mask.

This PR was brought to you by Skyrat paying me aswell as rotational mathematics


Why It's Good For The Game

Oranges approves so it's good.
Changelog

cl
add: Gas Masks now limit your field of view
add: Added field of view mechanics. It's darkness can be tweaked by a pref
add: Blind, nearsighted and fov-limited people will now see sounds as visual effects.
/cl
2021-12-14 15:52:52 +13:00
Tony
f397f72377 Health scanner readability improvements + code cleanup (#63340)
Co-authored-by: bumtickley00 <pebis@lol.com>
2021-12-12 10:56:17 -08:00
Ghom
48ff9fde3a Fixing and making PDA bomb logging less confusing. (#63302) 2021-12-12 03:50:48 -08:00
Jeremiah
1052bc19ed TGUI input box conversions 1 (#63313) 2021-12-11 14:21:35 -08:00
John Willard
324a33f606 Bot code improvement part 3 - Removes bot core. (#63321)
This deletes bot_core entirely, instead the access required is on the bot itself

My previous refactor broke bot access cover requirements, and that bug is what inspired me to make this refactor.
This is a stupid thing to have on the bot, I have no idea why it is a thing, and has only ever confused me since the very start. I find this functions better, and makes the code more easy to understand.

Closes #63259
2021-12-11 14:02:08 +00:00
Jeremiah
60922e7cfc TGUI list input conversions (#63315)
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
2021-12-10 02:20:01 -08:00
Seris02
fa22f80262 fixes bots getting stuck on railings and crashing clients (#63306)
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2021-12-10 02:12:35 -08:00
EOBGames
cf899a1821 Moth Food Returns: A Taste of the Fleet (#63174) 2021-12-09 21:41:36 -08:00
BlueMemesauce
2ee3d602fc Increases volume of the sound effect for knocking on firelocks (#63053)
Changed firelocks to have the same bash and knock sound effects as windows.
Which increases the volume of the knock sound effect and also adds the bash sound effect.

Also improves some of the code for firelock and window

Firelocks already had the knock sound effect, but it is so quiet that you can barely hear it. The volume should be increased so that people can hear it.
2021-12-09 16:45:47 -08:00
Bond
d2efad15c2 Fixes buckling onto tiles with dense atoms (#63277)
Before this change, you could put a dense object (like a computer frame) over a chair and buckle to it. This fixes that
2021-12-09 16:54:13 +00:00
LemonInTheDark
9b605b9cc0 Speeds up the preference menu, significantly. Adds object pooling, other stuff too (#63225)
* Removes like 50% of the cost of using the ui, it turns out that the storage component is fucking moronic. Likely significantly reduces the overtime of typecacheof

* Reduces the cost of reloading the dummy by ~50%
Turns out just initializing and deleting organs was like half the cost of reloading a default dummy.
It occured to me (Mothblocks) that we don't actually care about any organs we can't see or that don't effect visuals. So almost all of our organ loading can just be skipped.

This saves a significant chunk of cpu time, items next!

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
2021-12-08 16:20:03 -08:00
vincentiusvin
3bb8424d78 Makes welding plasma bars/statues/floors use flooder component (#63154)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-12-08 16:14:28 -08:00
John Willard
bbdbe79049 Magic mirror: Fixes changing races & code improvement (#63201)
All mirrors now use the same Initialize(), with a var determining which flag to check.
Improves some of the code with better var names and early returns.
Moves pride ruin's mirror to the rest of the mirrors
Removes /curse() proc, replaces it with Pride's mirror just calling parent instead, since it was the only mirror that used it.
Also fixes not being able to change races with the mirror.
2021-12-07 12:15:08 -08:00
RandomGamer123
e52fc6aa9f Stops transit tube dispensers from transporting anchored objects such as immovable rods (#63108)
Stops transit tube dispensers from transporting anchored objects such as immovable rods
2021-12-07 19:27:04 +00:00
Ghom
21ac10d3d4 multiz movement refactor redux (#62132) 2021-12-06 23:13:48 -08:00
GoldenAlpharex
1696f0bfe3 Adjusts the greyscale sprites of the benches (#63261)
* Adjusts the greyscale sprites of the benches

* More of a wooden color for the benches
2021-12-07 00:57:35 +01:00