Commit Graph

1841 Commits

Author SHA1 Message Date
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
Seth Scherer
defa54d22f Improves mask FOV code + fixes sechailer having fov, and swat mask having tint (#63535) 2021-12-25 22:40:48 -08:00
Fikou
7b38dd4ff7 MODsuits (#59109) 2021-12-24 12:00:24 -08:00
Jeremiah
dcab86ba2c More standard tgui input conversions (#63464) 2021-12-24 13:04:18 +02: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
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
oranges
e57326b6f4 Revert "Gasmaks tint and tint calculation update (Oranges approved edition) (#62947)" (#63397)
This reverts commit 11b6072074.
2021-12-14 12:34:06 -08: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
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
Cursed
62e0ecc42f Job specific clothes storage slots now can carry bags (#63102)
* Bags onto coats

* Bags fit onto wintercoats suit slot

* Bags fit onto suits suit storage slot

* Bags fit onto suits suit storage slot

* Adding mirror tray sprite to belt_mirror.dmi

* Bags fit onto suits suit storage slot

* Construction bag fits into hazard vest suit storage slot

* Fixes and hazard vest/explorer suit expansion

* Explorer suit ore bag

* Once again fix

* Even once more fix

* More and more fixes

* We love fixes. I hope its the last one

* Im back here once again. Fix
2021-12-07 13:43:41 +01:00
Ghilker
11b6072074 Gasmaks tint and tint calculation update (Oranges approved edition) (#62947)
About The Pull Request

Gasmaks apply a darkening overlay similar to the welding one but much lighter and open.
Without mask
nomask
With mask
covid
With mask and sunglasses
image

Note that other items that apply tint haven't been changed if worn on their own (sunglasses don't darken the vision) but will increase the darkening effect if staked (mask + sunglasses will give an even darker overlay).

Oranges' approval
dad2
Why It's Good For The Game

All upside and no downside are no fun.
Changelog

cl
balance: gasmasks give a slightly darkening overlay, effect will stack with other items that have tint.
code: tint code has been updated to properly work.
/cl
2021-12-02 11:19:09 +13:00
Ghom
f839a669bd Makes sure the abandoned crates anti-tamper mechanism is reenabled only when the crate is locked. (#63012) 2021-11-23 04:09:39 -05:00
Ghom
44863b2cfa Fixes some issues and an exploit with abandoned crates. (#62949) 2021-11-22 14:53:48 -08:00
Ghom
243cd2bfa5 Replacing more C-style for loops with the faster, traditional ones. (#62908) 2021-11-18 17:39:05 -08:00
esainane
b6f761468e [MDB IGNORE] dir sanity, primarily on WALLITEMs (#62601)
About The Pull Request

Wall items mostly use the direction from the floor to the wall in the named mapping helper. Wall items mostly use the direction from the wall to the floor for the internal dir variable.

This leads to a headache when it comes to working out what conflicts with what, and what needs placing where.

Wall frames provided a member, inverse, which specified whether or not to invert the direction of the item when looking for conflicts. It was also used to specify whether to look for conflicts outside of the wall (cameras and lights appear external to the wall) or inside the wall (most wall items). This flag was set for Intercoms, APCs, and Lights. Since APCs and Lights expect a floor-to-wall direction, and Intercoms expect a wall-to-floor direction, this means that APCs and Lights were getting the correct direction, and Intercoms were getting the wrong direction.

Some implications of this setup were:

    You could build an APC on top of another wall item, provided there was nothing external attached to the wall and the area didn't have an APC.
    You could stack Intercoms indefinitely on top of the same wall, provided you weren't in a one-tile wide corridor with something on the opposite wall.

Or both! Here's twenty Intercoms placed on the wall, and a freshly placed APC frame after placing all Intercoms and deconstructing the old APC:

endless-stack-of-intercoms

Not everything used this inverse variable to adjust to the correct direction. For example, /obj/machinery/defibrillator_mount just used a negative pixel_offset to be visually placed in the correct direction, even though the internal direction was wrong, and never set! This also let you stack an indefinite number of defib mounts on the same wall, provided it wasn't a northern wall... except you could do this to northern walls too, since defibs weren't considered a wall item for the purposes of checking collisions at all!

Ultimately, every constructable interior wall item either used this inverse variable to adjust to the correct placement, set a negative pixel_offset variable to have its offset adjusted to the correct placement, or overrode New or Initialize to run its own checks and assignment to pixel_x and pixel_y!
Inventory: Table of various paths, related paths, and the adjustments they used

Unfortunately, untangling /obj/structure/sign is going to be another major headache, and this has already exploded in scope enough already, so we can't get rid of the get_turf_pixel call just yet. This also doesn't fix problems with the special 2x1 /obj/structure/sign/barsign.

Some non-wall items have been made to use the new MAPPING_DIRECTIONAL_HELPERS as part of the directional cleanup.

tl;dr: All wall mounted items and some directional objects now use the same direction that they were labelled as. More consistent directional types everywhere.
Why It's Good For The Game

fml
Changelog

cl
refactor: Wall mounted and directional objects have undergone major internal simplification. Please report anything unusual!
fix: You can no longer stack an indefinite amount of Intercoms on the same wall.
fix: Defibrillator Mounts, Bluespace Gas Vendors, Turret Controlers, and Ticket Machines are now considered wall items.
fix: Wall mounted items on top of the wall now consistently check against other items on top of the wall, and items coming out of the wall now consistently check against other items coming out of the wall.
fix: The various directional pixel offsets within an APC, Fire Extinguisher Cabinet, Intercom, or Newscaster have been made consistent with each other.
fix: The pixel offsets of Intercoms, Fire Alarms, Fire Extinguisher Cabinets, Flashers, and Newscasters have been made consistent between roundstart and constructed instances.
fix: Constructed Turret Controls will no longer oddly overhang the wall they were placed on.
qol: Defibrillator mounts now better indicate which side of the wall they are on.
fix: Some instances where there were multiple identical lights on the same tile have been fixed to only have one.
/cl
2021-11-09 10:02:34 +13:00
Ghom
b79dd74fd0 Replaces a portion of C-style for loops with the more commonplace for loops, which are faster. (#62624)
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2021-11-07 16:42:41 -08:00
Timberpoes
479dcd295e Makes dash actions and Bluespace Prophecy trauma utilise teleport code instead of forced movement code. (#62471)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-11-06 20:03:51 -07:00
John Willard
6c0aba5da4 removes double spaces AFTER symbols (#62515)
* removes double spaces AFTER symbols

* found more
2021-11-03 21:09:35 -04:00
Mothblocks
0f3c4e51f7 Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed (#62265)
Implements the Modernizing radiation design document ( https://hackmd.io/@tgstation/rJNIyeBHt ) and replaces the current radiation sources with the new system, as well as replacing/removing a bunch of old consumers of radiation that either had no reason to exist, or could be replaced by something else.

Diverges from the doc in that items radiation don't go up like explained. I was going to, but items get irradiated so easily that it just feels pretty lame. Items still get irradiated, but it's mostly just so that radiation sources look cooler (wow, lots of stuff around going green), and for things like the geiger counter.

Instead of the complicated radiation_wave system, radiation now just checks everything between the radiation source and the potential target, losing power along the way based on the radiation insulation of whats in between. If this reaches too low a point (specified by radiation_pulse consumers), then the radiation will not pass. Otherwise, will roll a chance to irradiate. Uranium structures allow a delay before irradiating, so stay away!
2021-11-01 04:20:39 -03:00
John Willard
88d7dbfc10 removes double spaces before symbols (#62397)
This can apparently cause some bugs on occasions, so I thought I might as well try to kill them all.
2021-10-28 19:25:50 -03:00
Zytolg
0a9404e69b Beds and Benches: The Aesthetic Revolution [re-PR'd With EOB's Blessing] (#62169)
About The Pull Request

Ever since I saw @EOBGames PR this, I've wanted it. I've needed it. I've been delaying some mapwork FOR this. This is an identical PR to #61689, just updated so that it's not conflicting with anything. I've done everything @Krysonism asked for from last time too. That's right spacemen, double beds are back, and more cursed then ever. Cursed to succeed that is!
Why It's Good For The Game

We. Don't. Have. Benches.
Benches are a hallmark of any public space! You can sit on them, sleep on them, stand on them, even sleep on them! Our stations have a ton of chairs, but chairs don't really communicate public that well. Benches do. As for the beds? Well Inept wants them, and you know what? I respect that.


cl
expansion: Sofas now include the Bench Type. These are buildable with 2 metal plates from the crafting menu.
expansion: Beds can now be rotated (flipped), and include the Double Bed Type. Miners can also make Double Pod Beds to really feel like an Alaskan King.
expansion: Bedsheets to match! Try to share those big blankets with a lizard if you see that they're shivering!
code: Stuff that lets you interact with the benches and beds in-game, so that you too can enjoy being a king.
sprites: Ports the Benches and Double Bed sprites from Skyrat
sprites: Flipped Beds
2021-10-25 21:55:13 +13:00
Sealed101
964dc3d033 Fixes mining drills using pickaxe's inhands (#62251)
* new sprites good

* suggestion applied
2021-10-22 19:34:54 +02:00
Seris02
fc36aea489 runtime fix for borgs cryoing with upgrade modules + no more mmi laying around after they cryo, and various other runtime fixes (#62091)
human huds will no longer runtime and die when prefs aren't initalised
SSEconomy will no longer have to deal with pathed jobs inside accounts
Some of the negative/neutral quirks that use the mind have been relegated to last_mind instead for runtime purposes
Mafia saymode will no longer runtime when someone uses it with no current mafia game
Autolathe secondary_attack will no longer runtime/work only because of runtimes
MULTIPLE CHECKS FOR QDELETED STACKS BEFORE ADDING FINGERPRINTS
More player_list client checks
A lazyinitlist for proximity monitors, as they used lazyremove which nulls the list when it hits zero things in it
A check for cigarettes in case temperature exposure causes a reaction that removes all reagents
Catwalks no longer runtime every time someone walks on them
/obj/machinery/atmospherics/components/binary/crystallizer will no longer runtime on secondary_attack if someone can't interact
cyborg models will no longer assume the thing they're inside is a cyborg and runtime when it isn't (cryopods)
When a simplemob falls into nullspace, it will no longer runtime (goliaths falling into chasms and etc)
runtime fix in techweb.dm when using a card without a sanity check
runtime fix with folders when they have nothing in them
runtime fix with glowing eyes when the LAZYADD doesn't get called in regenerate_light_effets() and so doesn't initalise the list
2021-10-22 10:31:07 +01:00
Seris02
bd8555832d makes it so lockers/crates can have access electronics removed/inserted (#62022)
They can only have electronics inserted if they

are welded shut (if they can be welded)
don't have electronics already and aren't secure
They can only have electronics removed if they

are welded shut (if they can be welded)
are unlocked
are secure (even if they don't have electronics, then it'll create them)
2021-10-21 11:38:31 +01:00
Fikou
2b8b045d5a Mining Gear Resprite (#62168)
* mining gear resprite

* Merge branch 'master' of https://github.com/tgstation/tgstation into laaland

* update

* oopsie woopsie

* PKA CODE SUX BALZ

* woopsie
2021-10-18 18:40:50 +02:00
itseasytosee
f51000f506 Repaths knives to not all be children of the kitchen knife. (#62035)
Basically makes the code less dumb, took a long time. I worked hard to make sure there were no unintended effects (minus the fact you can no longer get spoons from the experimentor). No player-facing effects

I thought it looked weird that all cultist and combat knives were subtypes of the kitchen knives
2021-10-15 15:28:01 -07:00
Seris02
694c2999b0 makes it so the sanitize_hexcolors' default is 6 characters rather than 3 and gets rid of color_legacy (#61980) 2021-10-15 11:48:55 -07:00
thatoneplebeian
2a826e7380 Drowsiness refactor (#62104)
Creates two procs in /mob/status_procs for handling drowsiness changes (with check for negative values), and refactors all code to use these procs instead of assigning values to the mob's drowsiness themselves.
2021-10-15 10:15:24 +01:00
Ghilker
cb5fb1df2d modules/atmospherics major cleanup (#61904)
major cleanup of modules/atmospherics folder and all related files, still many missing
-cleanup of procs name
-cleanup of vars name
-documentation of some of the procs
-minor changes to some for() logic (no in game changes just early continue or as anything checks)

No in game changes, only code and docs
2021-10-14 01:13:57 -07:00
Ghilker
95c8e00af7 cleanup _HELPERS/_lists.dm and all the necessary files (#61827)
Bring _HELPERS/_lists.dm to latest standards by:
-Adding proper documentation and fixing existing one
-Giving vars proper names
-Procs now use snake case as per standard (many files that use those procs will be affected)
2021-10-12 14:48:51 +01:00
LemonInTheDark
861bf808bc Fixes a few hard deletes and runtimes I either caused, or ran into when trying to fix hard deletes (#61953)
Please don't try and send chat messages if you have nothing to say
Fixes a spurious runtime.
Fixes a runtime caused by my lack of understanding of huds. remove_hud_from is intended for hud watchers, remove_from_hud is intended for hud items. Doesn't really make sense most of the time, and just runtimes out the ass
Fixes a runtime in shapeshifting, restore should not run if the object is not restoring, or if it's deleting. it should run if it's not restoring, and it's not deleted. 4head
Fun fact, if there's two turret control boards they'll override each other. Use weakrefs. Oh also removes a var called cp, nothing good will come of that
Today in: Good lord the stacking machine is an afront to god, we discover that the labor claims console was attempting to act as a console, which of course fails when it comes time to clear it's improperly named var. Disgusting
Attempts to fix potential wound ref hangs in surgeries? maybe?
Fixes a runtime in luminescent stuff I created in my big harddel crusade. owner is a mob, not a species
Fixes a runtime related to headspikes deleting themselves twice. Pain
Fixes hard deletes sourced from the prophet trauma. Good fucking lord this is awful
Offhand item is somehow hard deleting. I have no idea how. Here's hoping signals fixes it, because if it doesn't I'm stumped. It's not a common scenario, but it does happen in spurts that suggest repeated usage
2021-10-09 09:44:21 +01:00
MrMelbert
270a53e117 Delete seeds whenever a plant is deletes, delete plant genes when a seed is deleted, + refactor various gene adding / deleting (#61747) 2021-10-07 19:27:07 -07:00
Ghilker
b95c0366a4 _HELPERS/unsorted.dm has been sorted (#61882)
bring code up to latest standards, move many procs to named files inside _HELPERS
no idea where to put some of these procs, help is appreciated
made more files to contain some unique code, deleted unsorted.dm, we can rest now
2021-10-05 20:22:57 +01:00
Ghilker
682e7132b5 cleanup of _HELPERS/game.dm (#61859)
some more cleanup, game.dm this time
2021-10-03 16:51:52 -04:00
Mooshimi
496a7685dc [MDB Ignore] Make shuttle windows deconstructable (#61694)
* shuttle windows

* refactor reinf windows

plasma and shuttle only

* messed up one change

* i am actually blind

* made and did file
2021-09-28 20:45:38 +01:00
tralezab
6c01cc2c01 every case of initialize that should have mapload, does (#61623)
## 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

![](https://media.discordapp.net/attachments/823293417186000909/875122648605147146/image0.gif)

## 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`
2021-09-24 17:56:50 -04:00
Timberpoes
16d541e975 [TM Candidate] Overhauls orbit and POI code to fix part of issue #61508 where players could observe /mob/living/new_player on the lobby. (#61509) 2021-09-22 15:54:15 -07:00
Timberpoes
cbc6f35f54 Things that love the station may no longer leave the station, even when Dr. Anomaly says they should. (#61335)
Bluespace anomalies detonating Move() things. When something is Move()d, none of the logic in forceMove() or doMove() is called, and thus stationloving things can't tell when they've left the z-level (since that's where the logic for it is).

There are a number of approaches I could have taken: Refactoring anomalies to use different movement code. Refactoring Movement code to send more signals in various scenarios. Refactoring the stationloving component.

I settled on two steps. First, refactoring the component to bring it up to modern code standards. Second, moving the logic for COMSIG_MOVABLE_Z_CHANGED to Moved() so the signal always fires regardless of if Move() or forceMove() or doMove() is used, with an optional var for whether the z-change is communicated to contents. This means the ore box was changed to actually send the signal instead of just returning with no parent call or signal sent. Stationloving ore boxes when?

stationloving procs no longer call SIGNAL_HANDLERs directly. Var names are now more descriptive. Things are renamed and documented. At least for the parts of the code I know.

Probably some other code cleanups.
2021-09-18 17:29:55 +01:00
小月猫
56e568bef9 fix aux base console (#61306)
the Auxbase console is a subtype of consoles, despite being a wallmount, therefore it inherits consoles density = TRUE, despite being on a wall

this means that you get THIS ..... its on the WALL and the tile is EMPTY, but you cant step onto it, because the consoles there technically and dense

(I feel i should clarify before its asked: when a console is deconstructed it spawns a new console frame and copies the circuit over, that new frame will be dense again. so it only lacks density once its finished and on the wall)
2021-09-14 19:20:36 -07:00
TiviPlus
62d1bc2536 Lavaland bottle holyness correctly not a species trait (#61409)
This is not a species granted trait, seems it was like this out of laziness but correct me if you know better
(Arm: It's just a remnant of angel's being a species in the past)
2021-09-14 18:33:13 -07:00
Ghom
20468c3f15 Baton refactor. item/melee/baton is now a subtype of item/melee/baton (formerly classic_baton) (#61207)
Merged the item/melee/classic_baton and item/melee/baton families in this unholy matrimony.

Bad jokes aside. I have refactored the underlying code of both items with the scope of reducing potential copypasta,inconsistencies, logging, renewing some old code (like teleprods) and extending the anti-dual batoning and TRAIT_STUNRESISTANCE code** to all batons and not just security ones. Otherwise, I have tried to maintain the gameplay functionality of these items intact. They work just like they did for the most part.

** A badly designed feature that only considers one source of knockdowns - stunbatons - out of a multitude of different devices with corresponding purposes present in the game. The only thing it does is reduce the knockdown from them by 90%. The stamina damage and confusion are fully applied. The knockdown from batons is 5 seconds, standing up takes an extra 1 second and the baton cooldown is about 2.5. Doing the math, you'll have the grand advantage of one puny second of not lying horizontal on the floor with this trait before getting batoned again by the same guy because the stamina damage and the confusion have really hampered your chances of getting some distance. I wish to make the trait suck less in the future, but for now I'm including a slight gameplay change here, more for consistency than anything because as I already told you, it'll still be disappointingly bad per se.

The abductor baton is also no more a subtype of stun batons but batons, which don't use power cells to work. Its power cell is effectively infinite and can't be removed, and It overrides functions such as toggling the baton on/off. It hinders maintainability to keep it a subtype of stun batons.

Replaced the anchored check for mobs in teleprods with one for overwhelming move resistance and removed its clumsy_check copypasta (it was stunning clowns twices).
2021-09-09 16:40:20 +01:00
Tim
9eec84f84c Fix wormhole jaunter behavior with chasms and EMP (#61055)
Wormhole jaunters will now save the user from a chasm if they fall in and it's on their belt. Wormhole jaunters also are affected by EMP correctly. Before it would only be affected by an EMP if it was in the belt storage area which made no sense.

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>

(Lots of good work here, thank you tim)
2021-09-08 17:13:07 -07:00
Kylerace
d9ee5e7297 moves obj_integrity and associated procs to the atom level (#61183) 2021-09-06 04:07:26 -07:00
Seris02
5ffbabe025 makes fake artefacts better (#61185)
adds the lefthand and righthand icons to the artefact, and gets rid of the big blue x overlay
2021-09-05 11:45:58 -04:00
Ghom
1325c3b6c2 Fixes a regression about skeleton pirates not having milk bottles. (#61217)
* Fixes a regression about skeleton pirates not having milk bottles.

* aaaa
2021-09-04 23:00:37 +02:00
Ghom
38b81ec732 Replaces MATERIAL_NO_EFFECTS with MATERIAL_EFFECTS. (#61166)
* Replaces MATERIAL_NO_EFFECTS with MATERIAL_EFFECTS.

* build warning and codermonky's advice.
2021-09-04 13:35:24 +08:00
tralezab
38000dfa10 partially fixes medical phobia by splitting dice bags off of pillbottles as a subtype (#61015) 2021-09-03 21:21:53 -07:00
Tim
f695be9ce7 Fix staff of lava not terraforming lava (#61096)
Lava staffs were not terraforming regular lava into empty tiles. This is because it was only checking to see if the lava type was the same weak lava the staff spawns. It has now been fixed to check for all lava types.
2021-08-31 23:43:17 +01:00
Ghom
699563c233 lava and weather immunities refactor (also jump boots fix) (#61003)
In remembrance of all those people who used jump boots to cross lava unaware of an issue c*ders wouldn't fix....

EDIT: This is now a lava and weather immunities refactor:
Weather immunities are now status traits since they have a multitude of sources (especially for lava) which might conflict with one another otherwise.
The lava burn_stuff proc has also been been refactored in different procs, mostly because of that snowdin subtype with inconsistent, old checks.
Weather datums should now use can_weather_act instead of weather_act to check if something can be affected by weather or not, as they should.
All movables can protect contained mobs if they have the relative weather immunity traits. This works at any contents depth.
No more snowflake weather_protection variable for closets.
Removed the weather_immunities list from living mobs (simple animals still have it but it's only for traits assignment on init because way too many child types lack the immunities of their parents).
Removed some unused defines.
Renamed some variables as per guidelines.
It has been tested.
And yea, jump boots fixed because that's the original scope of this PR.

(Initially just made throwing make you fire immune, that was blocked because it breaks perma stuff, instead it ended up be a refactor to make jumpboots usable with weather immumnity stuff
2021-08-31 14:07:19 -07:00