Commit Graph

3115 Commits

Author SHA1 Message Date
SkyratBot
6e51ad38ef [MIRROR] Changes what appears for urgent ahelps to supportmins. [MDB IGNORE] (#11516)
* Changes what appears for urgent ahelps to supportmins. (#64748)

Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>

* Changes what appears for urgent ahelps to supportmins.

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
2022-02-15 23:27:40 +00:00
SkyratBot
c621f5de1c [MIRROR] Refactor: make SSrunechat to be subsystem of SStimer [MDB IGNORE] (#11458)
* Refactor: make SSrunechat to be subsystem of SStimer (#64366)

* Refactor: make SSrunechat to be subsystem of SStimer

Co-authored-by: Aziz Chynaliev <azizonkg@gmail.com>
2022-02-14 06:08:27 +00:00
SkyratBot
e6c933c656 [MIRROR] Makes SSTimer actually recover [MDB IGNORE] (#11448)
* Makes SSTimer actually recover (#64784)

Makes SSTimer actually recover properly when it needs to. This is a follow-up for #60846 (3da51f515d) with code I added in my port of that PR to bee.

There were 3 main problems, and each was uncovered after fixing the previous:

    /datum/controller/master/New() was using faulty logic to find existing subsystems. It was adding Sound Loops twice and not adding Timer at all (Sound Loops being a subtype of Timer).
    /datum/timedevent stores a ref to the timer subsystem in var/datum/controller/subsystem/timer/timer_subsystem for performance. It wasn't being updated to the new Timer subsystem, ultimately resulting in it runtiming as an invalid timer.
    The buckets need to be reset during recovery. The TTR and other bucket-related handling is out of whack because SSTimer wasn't firing for however long recovery took. Luckily reset_buckets() can already handle all of this.

* Makes SSTimer actually recover

Co-authored-by: ike709 <ike709@users.noreply.github.com>
2022-02-11 10:31:09 +00:00
SkyratBot
b79181640e [MIRROR] Adds logic to hopefully prevent/yell about init breaking [MDB IGNORE] (#11432)
* Adds logic to hopefully prevent/yell about init breaking (#64705)

Safeguards restoring initialize mode after runtimes during atom initialization

* Adds logic to hopefully prevent/yell about init breaking

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-02-11 01:42:27 +00:00
SkyratBot
7b096b7672 [MIRROR] Fix random job assignments occasionally assigning to roles that were already filled. [MDB IGNORE] (#11416)
* Fix random job assignments occasionally assigning to roles that were already filled (#64734)

Missing continue in the random job assignment code meant an if statement was ineffective, code fell through and assigned roles to jobs that were already full.

* Fix random job assignments occasionally assigning to roles that were already filled.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2022-02-10 00:15:31 +00:00
SkyratBot
b3d9239670 [MIRROR] Fixes a potential "fail to setup jobs" state due to disappearing clients [MDB IGNORE] (#11375)
* Fixes a potential "fail to setup jobs" state due to disappearing clients (#64735)

Fixes a runtime error that can occur during DivideOccupations() in the event that one of the players has their clients disappear during setup due to classic byond client volatility.

If a new player's client vanishes during job setup, it will read as null instead of runtiming, which throws a JobDebug and moves onto the next player.

* Fixes a potential "fail to setup jobs" state due to disappearing clients

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-02-08 17:45:39 +00:00
Gandalf
adc63907a2 Better explosion effects (#11097)
* EEEE

* E
2022-02-08 02:20:10 +00:00
SkyratBot
78978cac7a [MIRROR] Cleans Job lists (hardcoded and not) [MDB IGNORE] (#11318)
* Cleans Job lists (hardcoded and not)

* e

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-02-08 01:47:50 +00:00
SkyratBot
a7fcb65332 [MIRROR] Adds moveloop bucketing, uses queues for the singulo rather then sleeps [MDB IGNORE] (#11257)
* Adds moveloop bucketing, uses queues for the singulo rather then sleeps

* Update singularity.dm

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-02-08 01:21:56 +00:00
SkyratBot
0828007a1d [MIRROR] Add compile option for profiling mapload atom inits [MDB IGNORE] (#11252)
* Add compile option for profiling mapload atom inits

* Update code/_compile_options.dm

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-02-08 01:19:06 +00:00
Tom
b3f03c7c14 https://github.com/tgstation/tgstation/pull/64417 (#11309) 2022-02-06 21:21:34 +01:00
Tom
da50b21d45 Cleans up and fixes a logging issue. (#11208) 2022-02-05 20:52:04 -05:00
SkyratBot
43c74b2818 Adds a config toggle for granting admin server profile access (#11263)
Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2022-02-04 19:37:44 +00:00
SkyratBot
d242138138 [MIRROR] Moves adjacent air into the main atmos subsystem [MDB IGNORE] (#11260)
* Moves adjacent air into the main atmos subsystem (#64559)

We should just straight up not be processing turfs if the adjacent turf
isn't correctly setup

It used to be on a seperate subsystem with a second wait with the idea
of reducing the cost of explosions, but since they're instant now
there's no reason to not just have it on SSair. Gets rid of my excuse
for process_cell runtimes too

* Moves adjacent air into the main atmos subsystem

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-02-03 19:14:38 +00:00
SkyratBot
7b0c2c03e9 [MIRROR] Fixes being able to vote for maps which are outside their configured population range [MDB IGNORE] (#11255)
* Fixes being able to vote for maps which are outside their configured population range (#64619)

* fixes map voting?

* this is worth checking as well

* additional logging

* Fixes being able to vote for maps which are outside their configured population range

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-02-03 10:01:37 +00:00
SkyratBot
f1d15ea189 [MIRROR] Fix stickyban SS runtiming on initialize [MDB IGNORE] (#11225)
* Fix stickyban SS runtiming on initialize (#64586)

Stickyban SS no longer runtimes if there is broken entries in the DB and instead notifes admins

* Fix stickyban SS runtiming on initialize

Co-authored-by: Gamer025 <33846895+Gamer025@users.noreply.github.com>
2022-02-02 09:14:13 +00:00
SkyratBot
65e74bf848 [MIRROR] Subsystems now track their avg and last tick allocations [MDB IGNORE] (#11212)
* Subsystems now track their avg and last tick allocations (#64448)

help to find a maybe bug, plus also a good metric to have on hand for figuring out contention issues

* Subsystems now track their avg and last tick allocations

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2022-02-01 23:46:43 +00:00
SkyratBot
105f0cc610 [MIRROR] Add config entries for PR_ANNOUNCEMENTS_PER_ROUND and STATION_GOAL_BUDGET [MDB IGNORE] (#11145)
* Add config entries for PR_ANNOUNCEMENTS_PER_ROUND and STATION_GOAL_BUDGET (#64368)

Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>

* Add config entries for PR_ANNOUNCEMENTS_PER_ROUND and STATION_GOAL_BUDGET

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@ gmail.com>
2022-02-01 01:31:19 +00:00
SkyratBot
6b491cefe5 [MIRROR] Fixes kilo's whiteship not spawning [MDB IGNORE] (#11188)
* Fixes kilo's whiteship not spawning (#64558)

* Fixes kilo's whiteship not spawning

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-01-31 20:20:03 -05:00
SkyratBot
0eed5abc93 [MIRROR] Black Market code, Revisited. [MDB IGNORE] (#11156)
* Black Market code, Revisited. (#64271)

This PR updates and refreshes the whole of black market code for improved usability as well as to better sell the backbone of the content behind the blackmarket in-game.

For starters, the datums for the black market were designed around not being specific to the black market. Reading the code, it was intended to allow for multiple blackmarket_markets to be added after it's original inclusion, which was passed up as a result of what I'd guess is a branding issue, as every datum associated with the blackmarket was labeled... as for the black market, nothing else.

So to begin I've renamed most of the backend of the blackmarket code to just market instead, datum/market, datum/market_order, datum/market_item, datum/market_uplink(/blackmarket). The works.

Next, QOL change to how blackmarket uplinks were implemented: Now, instead of having to manually load credits into a black market uplink by hand, then choose to buy things using the uplink, they instead just draw from the user's ID card, checks for a bank account, and purchases through that, with quick inputs added when purchases are successful and warnings when a purchase cannot be made.

Lastly, code change. In an old economy PR of mine I standardized purchased cargo items to use the CARGO_CRATE_VALUE define, and for vendible items to use paycheck defines instead. In that PR I rebalanced quite a bit of prices as a result, but this got passed up when that happened. I'll leave the balancing for another time then, but this updates the code of market_item datums to use CARGO_CRATE_VALUE for their upper and lower cost ranges to maintain that standard.

* Black Market code, Revisited.

* Black Market code, Revisited.

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-01-31 11:28:55 +00:00
SkyratBot
128959c65d [MIRROR] De-hardcodes jobs [MDB IGNORE] (#11155)
* De-hardcodes jobs

* De-hardcodes jobs

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-01-31 11:16:10 +00:00
SkyratBot
03814c01a5 [MIRROR] Dont init speech controller [MDB IGNORE] (#11164)
* Dont init speech controller (#64537)

* Dont init speech controller

* copypaste

Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com>

* Dont init speech controller

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com>
2022-01-31 11:08:14 +00:00
SkyratBot
5ed2dfe5f3 [MIRROR] Fixes a few runtimes with armor, spatial grids, and notes [MDB IGNORE] (#11126)
* Fixes a few runtimes with armor, spatial grids, and notes (#64514)

* Atoms  (mostly new players caused by logout) can get deleted before spatial grid initializes.

* Fixes images when viewing your notes before SSassets initializes.

* Fixes abandoned crate runtime.

* Fixes armor runtimes on eating clothes (this really needs alternative solution)

* Fixes a few runtimes with armor, spatial grids, and notes

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-01-29 23:06:14 -05:00
SkyratBot
96841e151a [MIRROR] Fix the mc getting completely fucked in the brain due to background ticker subsystems [MDB IGNORE] (#11099)
* Fix the mc getting completely fucked in the brain due to background ticker subsystems (#64500)

* Fix the mc getting completely fucked in the brain due to background ticker subsystems

* Update code/controllers/subsystem.dm

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

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

* Fix the mc getting completely fucked in the brain due to background ticker subsystems

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
2022-01-29 14:13:27 +00:00
SkyratBot
ac3a6f04cd [MIRROR] Actually fixes strange mob delays: BEEPSKY IS TOO FAST edition [MDB IGNORE] (#11062)
* Actually fixes strange mob delays: BEEPSKY IS TOO FAST edition (#64351)

* Revert " Properly speeds up a lot of things, mostly mobs (#64270)"

This reverts commit a836574388.
THE BYOND REF WAS A LIE, THE PLAYERS ARE FOOLS, HELP, HELPPPPPPP

It turns out that despite what the byond ref says, the walk proc's delays were not in fact in ticks, but in deciseconds.
This means when I "fixed" mob movement by doubling all walk delays, what I actually did was double the speed of anything that used walk()

I have a feeling that the actual issue players were seeing was just move_to having fucked up distance logic, and the movement of slow mobs being smoothed out. I've changed that, so hopefully this puts a seal on the whole problem

I've had a request put in to make beepsky faster, but I think that's best done in a seperate pr

* Adds a flag to disable smooth moveloop movement
Applies it to hostile mob's Goto()
Backports the fixes to move_to and move_away from the previous pr

* Actually fixes strange mob delays: BEEPSKY IS TOO FAST edition

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-01-28 21:54:53 +00:00
SkyratBot
958a9d632d [MIRROR] Logs tool usage [MDB IGNORE] (#11055)
* Logs tool usage

* fix conflict

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
2022-01-28 01:57:27 -05:00
jjpark-kb
272384d0fb lobby camera (#10829)
* lobby camera

* Update code/__DEFINES/layers.dm

shouldn't cover up the menu

* make it a subsystem

* adds a setting to disable the lobby eye (per person)

* Update modular_skyrat/modules/lobby_cam/code/lobby_eye_ss.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/modules/lobby_cam/code/lobby_eye_ss.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/modules/lobby_cam/code/lobby_eye_ss.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/modules/lobby_cam/code/lobby_eye_ss.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/modules/lobby_cam/code/lobby_eye_ss.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-01-27 04:02:34 +00:00
SkyratBot
de8695ae49 [MIRROR] makes most statpanel tabs update a tenth or so as often (>= 4 seconds instead of 4 deciseconds) because theyre wastful of cpu [MDB IGNORE] (#10929)
* makes most statpanel tabs update a tenth or so as often (>= 4 seconds instead of 4 deciseconds) because theyre wastful of cpu (#63991)

makes most updating stat panel tabs update once every 4 seconds instead of 4 deciseconds, but switching tabs instantly updates statpanel data for you. also makes examining a turf make flat icons for a maximum of 10 contents instead of 30 because its ridiculous to call getFuckingFlatIcon() wrappers that many times. also makes SSfluids not have SS_TICKER and updates its wait accordingly because theres no reason for it to be a ticker subsystem

the mc tab updates every 2 seconds unless someone has the pref enabled to refresh it quickly because SOME UNILLUMINATED LEMONS absolutely must watch overtime spikes in real time

statpanels can take between 1-3% of masters total processing time at very high pop, which is silly considering theres no need for someone to know any of the data updated accurate to less than half of a second. The only reason it needed to update so fast was because it looked awful when switching tabs, which will only be updated on the next fire. now switching tabs updates data instantly so theres no need to update the rest of the data quickly.

also makes each stat tab update into its own proc so we can tell how much each tab update costs

* makes most statpanel tabs update a tenth or so as often (>= 4 seconds instead of 4 deciseconds) because theyre wastful of cpu

* E

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/11003

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-01-27 03:17:33 +00:00
SkyratBot
ec6ddbe758 [MIRROR] Remove code/__DEFINES/misc.dm [MDB IGNORE] (#10945)
* Remove code/__DEFINES/misc.dm

* agagagagagaga

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-01-27 02:40:25 +00:00
SkyratBot
e57dc7ec06 [MIRROR] prevents smuggler satchels from spawning on catwalks [MDB IGNORE] (#10974)
* prevents smuggler satchels from spawning where they shouldn't (#64346)

Stops smuggler's satchels from spawning on floor turfs which cannot conceal them, such as catwalks and glass floors.

* prevents smuggler satchels from spawning on catwalks

Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com>
2022-01-25 00:57:02 +00:00
SkyratBot
49311960ad [MIRROR] Gamer quirk [MDB IGNORE] (#10969)
* Gamer quirk

* I hate conflicts

Co-authored-by: Ron <flavivs.clavdivs.jvlianvs@gmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-01-24 20:32:27 +00:00
SkyratBot
f92bc84629 [MIRROR] Documents economy and bank account variables. [MDB IGNORE] (#10948)
* Documents economy and bank account variables. (#64217)

* Documents economy and bank account variables
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>

* Documents economy and bank account variables.

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
2022-01-24 10:41:10 +00:00
SkyratBot
400bef239a [MIRROR] Fix: Avoid runechat scheduling too far events into short queue [MDB IGNORE] (#10942)
* Fix: Avoid runechat scheduling too far events into short queue (#64322)

Ports fix from SStimer #64242
Why It's Good For The Game
Changelog

cl Semoro
fix: Avoid runechat scheduling too far events into short queue (port from SStimer)
/cl

* Fix: Avoid runechat scheduling too far events into short queue

Co-authored-by: Aziz Chynaliev <azizonkg@gmail.com>
2022-01-23 17:14:37 -05:00
SkyratBot
f12c584241 [MIRROR] Fix: Avoid timer scheduling too far events into short queue [MDB IGNORE] (#10903)
* Fix: Avoid timer scheduling too far events into short queue (#64242)

Previously it was possible for events to enter the short queue when the timer is offset by more than BUCKET_LEN
Now it is forced to schedule events into the second queue if the timer is processing slower then world time goes allowing the timer to keep up

This PR provides a better definition of TIMER_MAX to avoid scheduling timed events that are more than one window of buckets away in terms of timeToRun into buckets queue and properly passing them into the second queue.

Ports ss220-space/Paradise#578

Should be merged with/after #64138
Detailed explanation

The timer subsystem mainly uses two concepts, buckets, and second queue

Buckets is a fixed-length list of linked lists, where each "bucket" contains timers scheduled to run on the same tick
The second queue is a simple list containing sorted timers that scheduled too far in future

To process buckets, the timer uses two variables named head_offset and practical_offset

head_offset determines the offset of the first bucket in time
while practical_offset determines offset from bucket list beginning

There are two equations responsible for determining where timed event would end up scheduled
TIMER_MAX and BUCKET_POS

TIMER_MAX determines the maximum value of timeToRun for timed event to schedule into buckets and not the second queue
While BUCKET_POS determines where to put timed event relative to current head_offset

Let's look at BUCKET_POS first
BUCKET_POS(timer) = (((round((timer.timeToRun - SStimer.head_offset) / world.tick_lag)+1) % BUCKET_LEN)||BUCKET_LEN)

Let's imagine we have our tick_lag set to 0.5, due to that we will have BUCKET_LEN = (10 / 0.5) * 60 = 1200
And head_offset of 100, that would make any timed event with timeToRun = 100 + 600N to get bucket_pos of 1

Now let's look at the current implementation of TIMER_MAX

TIMER_MAX = (world.time + TICKS2DS(min(BUCKET_LEN-(SStimer.practical_offset-DS2TICKS(world.time - SStimer.head_offset))-1, BUCKET_LEN-1)))

Let's say our world.time = 100 and practical_offset = 1 for now
So TIMER_MAX = 100 + min(1200 - (1 - (100 - 100)/0.5) - 1, 1200 - 1) * 0.5 = 100 + 1198 * 0.5 = 699
As you might see, in that example we're fine and no events can be scheduled in buckets past boundary

But let's now imagine a situation: some high priority subsystem lagged and caused the timer not to fire for a bit
Now our world.time = 200 and practical_offset = 1 still
So now our TIMER_MAX would be calculated as follow
TIMER_MAX = 200 + min(Q, 1199) * 0.5
Where Q = 1200 - 1 - (1 - (200 - 100) / 0.5) = 1200 - 1 - 1 + (200 - 100) / 0.5 = 1398
Which is bigger then 1199, so we will choose 1199 instead
TIMER_MAX = 200 + 599.5 = 799.5

Let's now schedule repetitive timed event with timeToRun = world.time + 500
It will be scheduled into buckets since, 700 < TIMER_MAX
BUCKET_POS will be ((700 - 100) / 0.5 + 1) % 1200 = 1

Let's run the timer subsystem
During the execution of that timer, we will try to reschedule it for the next fire at timeToRun = world.time + 500
Which would end up adding it in the same bucket we are currently processing, locking subsystem in a loop till suspending
On next tick we will try to continue and will reschedule at timeToRun = world.time + 0.5 + 500
Which would end up in bucket 2, constantly blocking the timer from processing normally
Why It's Good For The Game

Increases chances of smooth experience
Changelog

cl Semoro
fix: Avoid timer scheduling too far events into short queue
/cl

* Fix: Avoid timer scheduling too far events into short queue

Co-authored-by: Aziz Chynaliev <azizonkg@gmail.com>
2022-01-22 22:21:29 +00:00
SkyratBot
893cb616be [MIRROR] Fix: timers not removing from second queue on init [MDB IGNORE] (#10902)
* Fix: timers not removing from second queue on init (#64138)

Fixes #56292
Why It's Good For The Game

Increases chances of smooth experience
Changelog

cl Semoro
fix: timers not removing from second queue on init
/cl

* Fix: timers not removing from second queue on init

Co-authored-by: Aziz Chynaliev <azizonkg@gmail.com>
2022-01-22 22:20:57 +00:00
SkyratBot
d8786e276c [MIRROR] Properly speeds up a lot of things, mostly mobs [MDB IGNORE] (#10889)
* Properly speeds up a lot of things, mostly mobs (#64270)

When I made my move loop changes (815bb8a) 62567, I converted a few walk() procs to
the new system
What I didn't know when I did that conversion is that walk() operates on ticks, when move loops operate on
deciseconds

So when I converted say, mob movement over, I accidentially halved the attack movespeed of all of our mobs

This resolves that, alongside a few other misteps

Of note: There are old comments implying that walk()'s delay is not actually linear, or simply as the reference says "in ticks"
I don't have a good idea of how fast things actually should be though, which makes this tricky

In light of this, I've decreased the move speed of legion slightly, in hopes that it will feel more "normal"

I've also fixed a bug with move_to and move_away, they were treating their distance parameters as move to this and one more, rather then move to this. This lead to mobs attempting to overlap with your sprite. s cringe, and also fixed

* Properly speeds up a lot of things, mostly mobs

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-01-22 19:49:17 +00:00
SkyratBot
a03f58bdca [MIRROR] Disposal/Move loop fixes [MDB IGNORE] (#10873)
* Disposal/Move loop fixes (#64236)

Fixes misc moveloop runtimes souced by mid move deletes and disposal loop traps, this was caused by a misunderstood bit of logic. current_pipe needs to be set to the actual return value of transfer() rather then our current location

* Disposal/Move loop fixes

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-01-21 20:19:43 +00:00
SkyratBot
015020189b [MIRROR] Fixes funky magic item teleportation [MDB IGNORE] (#10865)
* Fixes funky magic item teleportation (#64263)

Space drifting "listened" for moves outside of its expected range, and if it saw them it would self delete
The problem is it registered for this behavior in drifting_start(), which was intended to be called by the MOVELOOP_START signal

But because that signal was fired as a consequence of move() being called, we never registered the signal
So if you took an item out of your pack, when it hit the ground it would get the drifting component
Next tick it would be drift moved to its intended location, the move would "fail", and then it would stop
This lead to items being visually in your inventory, but not functionally
Which leads to a lot of really weird behavior

Oh and I added a var to moveloops that's just "are we running" to make solving this class of issue easier

* Fixes funky magic item teleportation

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-01-21 10:12:38 +00:00
SkyratBot
1e4ba0273c [MIRROR] Fixes some mapping errors not using the mapping error log. [MDB IGNORE] (#10805)
* Fixes some mapping errors not using the mapping error log. (#64114)

Should help prevent #64066 from reoccurring.

* Fixes some mapping errors not using the mapping error log.

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2022-01-19 17:21:17 +00:00
Useroth
eb384bd2d7 Telemetry 'n shit (#10810)
* Refactors dbcore and limits the maximum amount of concurrent async queries to a variable amount (#59676)

Refactors dbcore to work off a subsystem if executed async and limits the maximum amount of concurrent async queries to 25.

This has been tested locally on a mysql docker image and there were no crashes (as long as you didn't run it with debug extools) + data was getting recorded fine.
Why It's Good For The Game

May or may not resolve terry crashes, however, each query creates a new thread which takes up 2mb, preventing the game from using that 2mb. This can lead to ooms if they stack up, e.g. due to poor connectivity. This solves that issue.

maintainer note: this did not actually resolve the crashes, but has value anyway. Crashes were sidestepped fixed by finding out Large Address Awareness works

cl
refactor: Refactors dbcore.dm to possibly resolve the crashes that happen on Terry.
/cl

* Fixes an oversight in database code and cleans up telemetry (#64177)

As it is right now, we never actually clear the temporary list processing_queries
So if the subsystem is for some reason unable to complete a run, we will just whip right back around to it again
If it's been long enough, this could even cause horrific log spam. There was just now a manuel round with roughly 30k undeleted query errors. not good.

But what was actually not deleting you may ask?
Well

When you create a db request, a 5 minute timer starts. after those 5 minutes are up, the request is qdeleted by the db subsystem
This is to prevent the creation of unused requests, and to handle requests that are never cleaned up

Telemetry code was creating all of its db requests inside a for loop that could check tick, and then later
attempting to call them in series

Since requests by default sleep, this almost always lead to undeleted queries, which harddel'd given long enough periods

I've fixed this by moving the data gathering away from the query creation
Why is it good for the game

I was working on atmos code, happy, safe in my delusion, when suddenly I got a ping from tattle freaking out over 200 undeleted queries a second
This resolves that issue, so I can once again live in peace
Changelog

cl
admin: Telemetry code will spam you with undeleted query logs much less often now!
server: Improved how the db subsystem handles undeleted queries, should never have an incident like that again
/cl

* Fixes an error in telemetry queries (#64205)

* Hardsynced time_track.dm with upstream

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-01-19 00:21:07 +00:00
SkyratBot
0acc853c91 [MIRROR] Adds a movement looping system, replaces inbuild procs and spacedrift with it [MDB IGNORE] (#10749)
* Adds a movement looping system, replaces inbuild procs and spacedrift with it (#62567)

* Adds a subsystem to handle automated directional movement, replaces all instances of walk_towards with it. Makes meteors and immovable rods not drift in space, and makes immovable rods more destructive. Note, I've opted not to use byond's method of moving towards something, which is effectively Move(src, get_step(src, get_dir(src, target))) as it's cringe and doesn't make a smooth line. I've replaced it with a autoupdating rise over run setup, read the code for more details

* woop forgot the subsystem

* Documentation, contributing.md entry, and some cleanup

* Makes the moveloop datum more oop friendly, sets us up for a lot of conversions

* Converts the curseblob and walk_away() to the subsystem

* Changes the default for override from FALSE to TRUE

* converts walk() over, still need to add a replacement proc for it, but we didn't actually have anything that used the raw proc

* converts the rest of walk_to() over, nearing the end now

* cleans up some errors

* Fully documents everything, fills in some missing movement types, uses the power of oop to make things cleaner, and typepaths longer

* Finishes the contributing.md stuff

* Done

* Fefaults -> Defaults, can you tell I wrote this at 1AM?

* resolves bubblegum issues

* Roh's suggestions

Co-authored-by: Rohesie <rohesie@ gmail.com>

* Cleanup

* Hey lemon, did you know that Destroy() lives on datums? ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

* Converts over the discrepencies created in my absense

* HAHA FUCK YOU I PAY MY DUES

* Whoops lost some stuff in the merge

* Converts the system from seconds to deciseconds to make dealing with the api more sane

* Some stuff I missed

* Makes movement an inheritable subsystem type, splits the moveloop file into two, one for the subsystem, and one for the datums

* Makes a subsystem that handles directing movers out to other subsystems. It's a bit bad right now, but it's a
good first step. I think I'll move the move loop datum to a lazy var on mobs instead of an assoc list, don't
like lists.

Also makes the movement procs global, I'll move em to the /movement subsystem at some point or something like
that

* Converts the existing uses of the procs over to the new format

* Adds support for subsystem precedence, so a type of A can override type B.
General cleanup, still kinda in debug mode but it's getting better

* I'll admit I'm not too familiar with this, but I think it will work

* Adds starting logic so movement types "pausing" makes any sense
Redoes how waiting is handled to make it based on world.time directly. I don't remember why. I think it's better
this way.

Adds a drifting movement type, moves space drift over to it.
Needs severe work before it's ready, too much info stored and modified on the moving object, see comment
Starts work on making drifting smooth

* Moves almost all space drifting vars over to signals on the movement datum
Properly implements glide size stuff for both the subsystem and the loops. Space drift will be smoother now.
It's not perfect, but it'll work just fine for now

Adds a way to override a client'd mob's glide size mid move, uses it to make entering a spacedrift look right
Adds a way to delay a client move outside of just move_delay, meant to be used for long periods, and setup such
that it doesn't make inputs persist

Adds flags to movement loops, alongside MOVELOOP_OVERRIDE_CLIENT_CONTROL, which blocks client movements while
the loop is firing, and for it's visual delay after

This means you can't exit a space drift until you hit the actual wall. This feels a lot better

Some general logic stuff, move() will return true/false if it succeeded or failed
Adds a stop_loop() proc that's called when a move loop is no longer active

Suck my nuts

* Moves precedence to the loop instead of the subsystem

* Moves drifting into a component, this lets me explictly block input after the move loop ends, so people can't
move the moment they functionally move onto a new tile
This is a bit underdeveloped currently, but that's a problem for another day

Cleans up some uses of move procs, fixes runtimes in metoer and curseblob code
Adds signals for stopping/starting a move loop, sending one for destroy is redundant.
Moves existing event signals from the movable being acted on to the loop itself, makes more sense this way
Makes the move handler return the created loop up the chain so we can register to it
Fixes a logic error in loop contesting code that lead to loops never actually being removed from subsystems
because they didn't know they should be.
Properly changes lifetime from a time to stop, to functionally an amount of moves to complete before stopping
Adds some new signals for pre/post loop process. This is to better tie into components.

I decided I didn't like the idea of tying all functionality to the loops themselves
The loop decides functionally how to move, components or just tied in signals can decide when/when not to move
and can modify properties of the loop

Making a new loop for things like atmos drift, something I'm interested in tackling in the future, seemed silly

* Moves movement procs directly to the subsystem for better namespacing or whatever

* Moves movement packets onto /atom/movable, no longer need the debugging
I've decided to not just put their contents fully onto atom movable, since it makes debugging on live much
harder, can't sdql for them anymore.

Fixes a runtime in meteor code, properly this time
Fixes a logic error in stop_looping
Makes move manager NO_INIT, because well, it doesn't init

* Commits human sin, makes Recover() work properly for movement subsystems

* Fixes immovable rod orbits not always working, they were returning too early in moved and fucking up the var we use to track move count, and thus not sending a signal properly

* Reworks the curseblob to use signals more, and to not use override

* Missed this in the movement ss commit

* Removes override, makes having a higher or equal precedence take its place

* Updates documentation

* Cleans up some unused defines

* Nukes the unused flags option

* Whoops forgot to qdel check

* Removes an unused var I had for client move prevention before I started using a component

* Let's do this properly

* Modernizes meteor code to better match how explosions actually work currently

* Some more cleanup

* Cleans up effect code a little bit
Nukes the effect system's sleep loop, we use movement loops instead
As a part of that, instead of 1 timer per effect spawned, we react to loop failure and make it 1 timer per
effect system
This should reduce the amoumt of slowdown we see after mass lighting break

It's not everything, we're still making a timer per spark effect, but it cuts things down significantly

* Updates explosions to not sleep

* Adds support for modifying a loops delay post process, makes extinguisher code suck less then it does currently, nukes some more sleeps and timer loops

* Converts water tank resin over to move loops rather then sleeps, minor behavior change mind, the cooldown starts on fire rather then on land, but I think that makes more sense anyway

* compile and runtime fix

* Fixes some runtimes, cleans up some code, ensures feature parity when it comes to logging

* Prevents resin foam from space drifting

* Adds support for flags back into the system, I need it for reasons

* Updates move_towards to fix some bugs and resolve some inconsistent behavior, implements a flag that makes a loop's first move start instantly

* Fixes extinguishers not actually transfering any reagents

* Converts sprays to the new system. This does actually minorly change behavior, in that I've changed the order of spray actions from step -> sleep -> wash to step -> wash -> sleep, but I'm not terribly torn up about it because frankly I think it feels better

* Converts grav catapults over to the new system

* Converts trays over to moveloops

* Converts robot streaking to move loops, the other two coming soon

* Compile you won't. Also fixes a behavior issue with oil streaks

* Does directional step_to properly, cleans up the other two streaking types

* Converts step_trigger over, not that it's actually used anywhere. Changes how stoping a move works, you need to explicitly qdel, other the step is just considered to be ignored. This will make life easier later

* Adds a jps movement loop. It's a bit bloaty, id is stupid, but it'll work just fine

* Makes the system support passing in a datum that's just used as extra context for the move. The hope is this makes signalizing things less of an absolute headache

* Begins the conversion of ai movement datums to movement loops

* These two are reasonably simple, only weird thing I'm doing is A: Not allowing target hotswapping, which I hope none is doing, and B: passing the controller into the move loop as extra context so things work properly

* JPS is a bit more complex, partially because the old implementation was a bit weird. 2 major things. 1: I'm dropping what I think was a redundant behavior minimum distance check from the premove bit of logic, since I'm pretty sure it didn't do anything. 2, instead of just stoping the step in an error state like being pulled, we count it against our max move total

* Audit

* Moves most forced movement to the framework, adds some components to make things nicer

* Implements a flag that makes the loop always operate, regardless of precedence and without impacting any other loops

* Moves movement subsystems into the right folder

* Hey potato what if you had two procs that did the same thing and one called the other? Wow it's useless

* Merges slipping and force movement

* Converys conveyors over to the system. It's a bit fragile, but I think it's totally worth it to save the sleep loop

* Precedence -> Priority, cleans up some logic errors, makes priority highest to lowest instead of lowest to highest, straight cleans some code up

* Makes poly and bubbles ignore spacedrift, now that precedence actually functions properly. I'm likely missing cases of this, will deal with it later

* Depression, thy name is linter

* Fixes linter, and hopefully fixes the runtimes in ci too

* Wew

* Sets sprays and extinguishers back to legacy, since people do actually seem to have noticed

* Spelling errors my beloved

Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>

* More detail, moves return descriptions

* Converts transit tubes to the system?

* Adds the glide size modifier. Not honestly sure that this should be default, considering how crummy it makes things look for normal walking, but it's useful as hell here

* Adds a force move in dir template, actual support for fast initial steps (wtf old me) and a helper proc for setting delay

* Cleans up displosal code a bit, I thought about adding it to the system but it would functionally be just 'disposal loops'. Maybe I'll make a template subtype? not sure how I want to handle stuff like this

* Cleans up mob movement a bit

* Let's use the controller's visual delay

* Makes the resin thrower nicer, cries

* Cleans up some comments, replaces an implicit world.icon_size with an explicit one, fixes up a typecheck

* typecache instead of double istype. Can't do much about the !atom/movable, list would be too big I feel

* hhh

* bro wtf

* Documents the why of SS_TICKER

* Puts SSmovement on SS_TICKER. Lets us support tick steps

* Cleans up the charge action. Makes it use moveloops

* Fixes CI? kinda worried that this just got dropped

* Converts disposal pipes to move loops. They stutter a bit more then usual as of now, hoping that's a me thing, if it's not I'ma look at uping the priority of the base subsystem

* Moves the move subsystems off background, puts some on ssticker

* Prevents some things that shouldn't move in space from moving in space

* Documents the general form and usage of the system

* Virgin one vs chad once

Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>

* Removes unneeded check

* Moves appropriate movement subsystems into SS_BACKGROUND. Removes redundant SS_KEEP_TIMINGs

I do want the behavior of SS_TICKER, which at this point is tick based waits, and ignoring overtime when
calculating next fire.
Since honestly, these subsystems should ignore overtime in regards to next fire, the cost of moving A may be
nothing compared to the cost of moving B.

* Makes the MODULUS macro use floor. I knew our coders would never let me down, glad this exists, thanks ninja
Fixes teleporting caused by shitty round() behavior, adds a "you hit your target" case to homing loops

* Converts blood splatters to move loops, that'll do it

Co-authored-by: Rohesie <rohesie@ gmail.com>
Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>

* Adds a movement looping system, replaces inbuild procs and spacedrift with it

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Rohesie <rohesie@ gmail.com>
Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>
2022-01-18 00:54:06 +00:00
SkyratBot
5910fd9649 [MIRROR] MOD update: Modular Cores [MDB IGNORE] (#10710)
* MOD update: Modular Cores

* Fixing all dem conflicts

* Okay now it's going to compile too

* Fixing some Trigger() (they triggered me)

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-01-16 15:25:41 -05:00
SkyratBot
65b8082678 [MIRROR] Harddel Fix Pack #42 + Better Live Reftracking Support [MDB IGNORE] (#10639)
* Harddel Fix Pack #42 + Better Live Reftracking Support

* awooga

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-01-12 21:57:49 +00:00
SkyratBot
c33061765b [MIRROR] [MDB IGNORE] BIDDLE TRAITORS - Adds progression traitors. Refactors uplink code in its entirety [MDB IGNORE] (#10620)
* [MDB IGNORE] BIDDLE TRAITORS - Adds progression traitors. Refactors uplink code in its entirety

* updates and fixes

* ffff

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-01-12 03:25:38 +00:00
SkyratBot
61ca3472ea [MIRROR] PURE Code Improvements to the Shuttle Subsystem [MDB IGNORE] (#10609)
* PURE Code Improvements to the Shuttle Subsystem

* modular updates

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-01-12 02:47:57 +00:00
SkyratBot
b8c2c18dd9 [MIRROR] Adds roundstart logging for station traits [MDB IGNORE] (#10606)
* Adds roundstart logging for station traits (#63985)

* Adds roundstart logging for station traits

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
2022-01-12 02:23:14 +00:00
SkyratBot
cd3a85ea2c [MIRROR] Documents the thrownthing datum. [MDB IGNORE] (#10577)
* Documents the thrownthing datum. #63952

* Documents the thrownthing datum.

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
2022-01-10 14:40:19 -05:00
SkyratBot
01080dfe0a [MIRROR] Makes sure COMSIG_ATOM_EX_ACT is always called. [MDB IGNORE] (#10498)
* Makes sure COMSIG_ATOM_EX_ACT is always called. (#63685)

Creates a wrapper macro for ex_act() and moves the signal and contents explosion calls to there. This way we can ensure the signal is always fired. Also desnowflakes reagents responding to explosions.

Ensures that a signal is always called when the attendant proc is called.

* Makes sure COMSIG_ATOM_EX_ACT is always called.

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
2022-01-07 15:23:12 -05:00
SkyratBot
1318fbfd18 [MIRROR] adds a common SERVICE access, for service hall and service cargo console. [MDB IGNORE] (#10389)
* adds a common SERVICE access, for service hall and service cargo console.

* skyrat editions and fixes

* hop and barber have access_service as well

* bouncers huh

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
2022-01-03 18:37:49 -05:00
SkyratBot
df350f0977 [MIRROR] Add config entry to hide the station name in the hub entry [MDB IGNORE] (#10380)
* Add config entry to hide the station name in the hub entry

* Fixing the merge conflicts, I'll update this again once the PR right before is merged.

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-01-03 22:05:45 +00:00