Commit Graph

261 Commits

Author SHA1 Message Date
Seth Scherer
f0494e70fd Makes the heretic worm use the blood walk element (#65658)
* Makes the heretic worm use the blood walk element
It was using a custom proc for this, but we have an element just for
this.

* Update code/modules/mob/living/simple_animal/heretic_monsters.dm

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>

* dont need this'

* adds an extra arg the to the element to keep direction

* moves da eement

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2022-03-25 23:08:58 -04:00
Seth Scherer
a2be06be9e Adds a cooldown to the deliver_first crates deny sound (#65443)
This is really annoying, byond sound sucks, etc
2022-03-17 17:51:56 +08:00
cacogen
209193d3ec Bump click component for bump mining (#65338)
Adds the component to bump mining turfs and removes the code under Bumped() that handled it.
Cuts down on copypasted code if somebody wants to add bump clicking to something else in future.
2022-03-10 21:31:34 -08:00
Gandalf
684eab3d31 Converts SFX keys into DEFINES (#65146)
About The Pull Request

Simply converts all instances of soundkeys that use get_sfx from strings into defines.

E.g. "sparks" is now SFX_SPARKS
Why It's Good For The Game

It makes life a lot easier when you're looking for a sound effect. You just type SFX_ and you get suggestions in VSC. Plus, it looks better.

image
Changelog

Not player facing.
2022-03-11 10:09:18 +13:00
John Willard
234d4c1217 makes most alerts, defines (#65086) 2022-02-25 00:37:01 -08:00
cacogen
e07913d751 Lets blobs mine (#64965)
Allows blobs to destroy mineral turfs when necessary, such as when spawning on Ice Box.

Without this they face a distinct disadvantage against crew that can destroy mineral turfs with plasma cutters like a hot knife through butter to get a better angle on their core.

The fact they can't already seems like an oversight left over from when they would never normally encounter them due to spawning on space stations.

The bubble alerts provide a lot of feedback that was previously missing and saves taking your eyes off the game to look at warning messages in the chat.

The screen tips save you having to read the help screed to at least know what two of the shortcuts are.

Making off-station blobs lighter makes it immediately obvious which blobs count towards victory.
2022-02-22 09:40:32 +00:00
Mothblocks
c79c7d51a7 Contextual screentips -- Screentips now show you what items/objects can do (#64502)
Adds the foundational system for contextual screentips, which will show you what you can do with objects/items, including through context, such as what you are holding.

Provides several helper elements for most use cases, and applies it to a handful of common objects in order to show the full breadth of the system.

Changes screentips preference from on/off to on/off/only with context. Players who originally had it on off will have it migrated to only with context, though can re-disable it.
2022-02-15 17:29:43 -06:00
Fikou
0d34bc7798 Mining MODsuit Rework (#64688)
makes dropkey deactivate device modules
fixes speed potion being fucky
fixes doubled up balloon alerts
makes some cell code better i think
makes the gps module open the gps tgui for you, instead of putting a gps in your hand
the loader suit can now hold mailbags

Reworks the mining modsuit.
The suit is no longer cold-proof (this can be mitigated by using module space for thermal regulators)
The suit fits less modules than standard suits, but cant burn in lava.
In suit storage it can carry ore bags, resonators and kinetic crushers.
It features a storage, gps, ore bag, drill, clamp and by default comes with a plasma core, being recharged with plasma ore rather than by power cell.
Features two new modules:

Ash Accretion, it gathers dust from basalt (or snow) you walk on to create a layer of ash around the suit, acting as armor and a speed up that quickly drains when you walk on other terrain.
Sphere Transform, turns you into a fast moving ball that can travel past lava, you cannot use your hands when in this form, but you can launch aoe mining bombs to attack or mine
2022-02-06 15:46:21 -08:00
Mothblocks
068f5df349 Add new surgery tgui (#64579)
* Move element to component, start UI, move assets into their own directory

* Complete UI

* Stop when another surgery is started

* Set your real zone since I forgot you actually need to start the surgery too

* Bring this back since I was just removing it as part of a cleanup for asset cache, but I can't prove it's not used anymore

* Remove unnecessary constructor I was using for something else

* Fix signal override
2022-02-06 22:04:06 +02:00
John Willard
5dcfae4252 Turns blood walking into an element (#64162)
Refactoring things to elements/components is better in general, and I thought this was a perfect thing to turn into one.
2022-01-26 19:20:18 -08:00
John Willard
a3227e7417 Makes a projectile shield element for colossus, and makes living bullet_act call parent (#64164)
Moves colossus projectile deflection to an element
2022-01-23 19:03:07 -05:00
Tim
14deaa41ed Remove code/__DEFINES/misc.dm (#63879)
This removes code/__DEFINES/misc.dm and moves all the defines to either:

another existing define file
new define file
local .dm file if the define was only used in one file
I also deleted defines that were not being used and added documentation to all of the ones that were moved out of misc.dm

Why was this needed? People were basically using the misc.dm file as a dumpster to toss all their defines into that was creating one giant mess. The defines have been organized into their proper groups and files now.
2022-01-23 14:30:27 -08:00
Seth Scherer
1153404903 Separates cult object and cult effect sprites into their own folders (#64017)
* obj

* effects
2022-01-13 15:51:03 -05:00
Tim
b7922744b7 Fix Transparent Floors Multi Z clipping (#63878)
Fixes #63770 (Objects on Lower Z level appearing on top Z level when under glass tiles)

This fixes some MultiZ issues that were discovered after I made #62875 (566b9ee1d8). I never setup a new plane for the transparent turfs and because of this any objects, icons, or sprites that were offset from the boundary of the turf would make any bottom Z level stuff appear on the current Z level.

We want stuff to look normal.
2022-01-07 17:32:28 -08:00
MrMelbert
e033d5a9a6 makes rust visible (#63789) 2022-01-07 03:42:20 -08:00
Seth Scherer
025b1ddfaf Elementizes cult halos + cult eyes + fixes some issues with them (#63683)
* should be good

* autodoc

* signal rearranging

* final comment

* review
2022-01-03 14:35:06 -06: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
Tim
566b9ee1d8 Fix Turf Transparency for MultiZ (#62875)
Fixes #62794 (Catwalk Tiles placed on the lower level of tram appear to be on the upper level)
Fixes #57654 (Open Space shading not always applied)
Fixes #53666 (When standing on a glass floor above a light on the Z level below you the light effect is rendered above the character. This makes light have ugly glows on the floors above. This also happens with grills and lattice.)

Transparent turfs, catwalks, and lighting overlays were badly broken with MultiZ issues. This fixes any transparent turf to appear and be on the same z-level if it has the turf_transparent element. Catwalks will appear and be on the same z-level as well. They were initially glitching to top z-levels causing people to walk over an illusion that caused them to fall to their deaths.

After I fixed these issues I noticed that lighting overlays were also glitching to top z-levels, which looked rather strange as there were lights in the middle of rooms and hallways with no supporting walls. Lights now appear under the transparent turfs properly.

The mapping icons for catwalks displayed the wrong icon_state so I fixed that too.

I made a big refactor for transparency and catwalks code that had to be done to get all of this to work properly.

You no longer have to be afraid of falling off of glass floors, catwalks, or transparent tiles. Also lighting overlays don't glitch through upper z-levels anymore for transparent tiles.
2021-12-29 21:42:49 -08: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
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
Seth Scherer
1d34145980 Void cloak (and other items intended to be invisible) can longer be seen and unequipped in the strip menu (#63484) 2021-12-22 13:00:05 -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
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
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
Jeremiah
1052bc19ed TGUI input box conversions 1 (#63313) 2021-12-11 14:21:35 -08: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
Ghom
21ac10d3d4 multiz movement refactor redux (#62132) 2021-12-06 23:13:48 -08:00
Ghom
fea3637316 Finish off the old strip menu, add tk checks (#63219)
* Finishes off the old strip menu (also fixes the new one not properly checking against tk)

* I'm having second thoughts. Better safe than sorry.
2021-12-06 04:02:34 +02:00
Mothblocks
6ea8b19eb9 Add disabling footstep sounds and parallax to the lag switch panel (#62999)
At the last Toolbox Tournament, @MrStonedOne pointed out some big performance consumers. Some are disablable through easy means, but others were not. This adds two easy ones to the mix.
2021-11-22 23:19:33 -08:00
tralezab
bb7638f114 Routine Cargo Departmental Deliveries (#61992)
About The Pull Request

Document: https://hackmd.io/@bazelart/HkY-SO9VF

Each department's request console is upgraded. Instead of making requests, they are only able to see crates related to their department that helps the department. They can order one for free (so not out of anyone's wallet) and it will arrive at cargo. Cargo gets the price of the ordered crate for bringing it to the department that ordered it (via an area check, of which the crate will remain locked until satisfied, emitter cracking aside).

Ordering a crate puts the console on a cooldown depending on the price of the crate ordered. The time ranges from 10 minutes at the lowest value, to capped at 20 minutes at 4x the default crate's price. the price in time follows a ease in out circular function, where the time increases slowly as the time goes up, but a lot in the middle. towards the higher end it slows down again.

Cargo will start with far less money, but this is countered by the new source of income.

Finish Mapping it
Finish tgui panel for department orders
Testmerge it for balance and feedback who cares

    Maybe give multiple destination areas, just in case one area gets obliterated who cares!

Why It's Good For The Game

Cargo starts with a budget to spend on themselves, which lets them order their department rewards before doing anything. There is no inherent reward to delivering to other departments other than social expectations of filling the job, which means cargo will simply ignore deliveries and requests if there are more self-important things going on, since those deliveries both cost cargo and do not help cargo in any way
Changelog

cl
add: replaced the request consoles in each department with department order consoles, which order for free on a cooldown. cargo gets these orders and delivers the crates, which are locked until delivery. upon delivery, cargo gets paid the value of the crate, and can then sell the crate back on the shuttle.
balance: cargo doesn't start with a budget, other departments get what their budget was split up amongst them
/cl
2021-11-12 14:19:33 +13:00
Len Kagamine
382cf6492c Drop before delete used "foodtrash"items (#62536) 2021-11-08 16:02:10 -08: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
John Willard
96a3d410a2 Traits given by Elements now have element trait as their source. (#62134)
Hopefully the code is more organized and consistent this way.
2021-10-28 18:39:21 -03:00
magatsuchi
5b7a2a31c5 magatsuchi is trying to remove your stray bracket! (#62157)
removes a stray bracket in the stripping message, effectively enhancing user experience by 2000%
2021-10-17 10:39:01 -04:00
Ghom
58e65cb5e3 Pets no longer enjoy being shoved around. (#62111) 2021-10-15 17:27:06 -07:00
Mothblocks
3be6f04b5c Add missing SIGNAL_HANDLERs (#62115)
Add missing SIGNAL_HANDLERs
2021-10-15 07:01:02 +01:00
Ryll Ryll
bd4f052c64 Fixes errant "the" in visible messages for item stripping (#62049) 2021-10-13 21:21:24 -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
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
Mothblocks
f13dd0695d Spiders/carp will now pull/move water/welding fuel tanks/canisters slower and won't be able to attack stationary atmospherics equipment (#61616)
Adds 2 new elements, one for slowing down pulling of dangerous objects (dispenser tanks and canisters), and one for preventing hostile attacking of elements in a typecache.

Also updates the obj_flags bitfield 'cause I thought I was gonna use that, but I didn't.

Adds these elements to spiders and space carp (from space dragon)
2021-09-24 04:07:03 +01: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
MrZoraman
8fa08f7945 Fix the grammar for the message shown when appraising great art. (#61608) 2021-09-21 17:05:10 -07:00
tralezab
79f6030eba Post Sparring Sect Merge MISTAKE (#61527)
I forgot to push one last review, without it there will be like 2 runtimes but no real problem gamewise
2021-09-18 22:10:20 +01:00
Timberpoes
d14b6cc849 Radically improves explosion logging. (#61419)
Adds some extra vars and logic to explosion code to make powerful logging entries that should help admins narrow down when explosives get misused.

Records this new info in the feedback database and bumps the explosion version +1 as a result of this.
2021-09-18 18:13:16 +01:00
tralezab
b69d87a76e Sparring Sect! (#61316)
Adds the sparring god. Your deity wants you to go out and spar people for self improvement.

Sparring
You can create contracts from paper as the chaplain. The contracts come with a set of conditions for the battle.

You can set which weapons are allowed.

You can set what you earn from winning.

You can set where you fight.

BOTH participants in the sparring match must agree to the terms for the fight to begin. Changing the terms will remove any other signatures on the contract, requiring them to review and willingly sign again.

Setting the stakes to be holy will give you favor for winning the fight. You can only do this once per person, so you can't farm points. You can use points on declaring new areas as arenas, or if you save up enough, buff your heart to keep fighting in dangerous conditions.
2021-09-17 21:04:47 +01:00
tralezab
b6dafef8e8 converts cows to basic mobs and ADDS MOONICORNS (#61446) 2021-09-16 17:47:06 -07:00
Fikou
a9a73541c5 turns stickmen into basic mobs (#61272) 2021-09-15 14:28:14 -07:00