Commit Graph

2934 Commits

Author SHA1 Message Date
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
1f000babea Fix word bounds on filters, where they would only be applied at the beginning (#61714) 2021-09-27 20:38:49 -07:00
Ghom
3c5d6221d7 You can now use backslashes as an escape character for text modification. (#61621) 2021-09-27 17:08:03 -07:00
Fikou
74be6236d5 Secret Gateways: Config loaded Away Missions + Anti-observing Z level traits (#61719) 2021-09-27 17:04:27 -07:00
Jordan Brown
ccb75a554f Changes a bunch of New()s to Initialize()s (#61626) 2021-09-26 00:15:49 -07:00
Mothblocks
dbe560f4d9 Change the word filter configuration to allow providing reasons, fix emotes not working in filters, and implement separate OOC/IC/PDA filters (#61606) 2021-09-25 21:13:43 -07:00
Timberpoes
b07c7f7d36 Replaces downloading research notes with a new antag objective and station sabotage point. (#61685)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-09-25 15:59:56 -07:00
TiviPlus
124e1b485b Asset log config (#61687)
Adds config to toggle on/off logging to asset.log

Special thanks to @TiviPlus who stole it from @TiviPlus at tgstation/TerraGov-Marine-Corps#8406
2021-09-25 23:16:13 +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
Mothblocks
9902d64135 Fix quirks being automatically removed (#61631)
Quirks were being validated before the subsystem was setup, this moves to get_quirks() which initiates if needed.
2021-09-23 04:42:02 +01:00
Tim
e26a859016 Mapping DLC - Random Spawner Pack [MDB IGNORE] (#60522)
First off, I am aware of the Feature Freeze for this month. This PR was initially started in #60401 about a month ago to break the changes into smaller PRs. The end result for this PR is a poor man's attempt at roguelike procedural generation. Enjoy!

Link to the README for how the new spawner system works.

Added the following new random mapping spawners:

pen, crayon, stamp, paper, pamphlet, briefcase, folder, wardrobe closet, wardrobe closet colored, backpack, narcotics, permabrig_weapon, permabrig_gear, prison, material, carpet, ornament, generic decoration, statue, showcase, paint, tool, tool_advanced, tool_rare, material_cheap, material, material_rare, toolbox, flashlight, canister, tank, vending_restock, atmospherics_portable, tracking_beacon, musical_instrument, gambling, coin, money_small, money, money_large, drugs, dice, cigarette_pack, cigarette, cigar, wallet_lighter, lighter, wallet_storage, deck, toy, toy_figure, booze, snack, condiment, cups, minor_healing, injector, surgery_tool, surgery_tool_advanced, surgery_tool_rare, firstaid_rare, firstaid, patient_stretcher, medical supplies, crate, crate_abandoned, girder, grille, lattice, spare_parts, table_or_rack, table, table_fancy, tank_holder, crate_empty, crate_loot, closet_private, closet_hallway, closet_empty, closet_maintencne, chair, chair_maintence, chair_flipped, chair_comfy, barricade, data_disk, graffiti, mopbucket, caution_sign, bucket, soap, box, bin, janitor_supplies, soup, salad, dinner

Removed deprecated wizard trap, vault, and armory spawners.
2021-09-23 03:30:28 +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
Mothblocks
e3c909cf6e Add admin panel for station traits (#61546)
Admins can now revert (most) station traits before a round starts, as well as setup the station traits that will run next round.

Previously, admins had no control over this system, making it sometimes painful for running planned events.

It is not feasible to update the station traits of the current round, considering some apply pre-roundstart, but it is doable to edit the station traits of the next round.
2021-09-22 22:23:04 +01:00
LemonInTheDark
d610ab97c8 Adds keyloop to the autoclearing ss, cleans up ssambience a bit (#61540)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-09-21 17:57:27 -07:00
Mothblocks
0ce04c12b1 Fix quirks list in preferences menu being empty before SSquirks (#61492)
About The Pull Request

Fixes #61490
Changelog

cl
fix: Fixed the quirks list in the preferences menu sometimes being empty.
/cl
2021-09-22 12:14:53 +12:00
Mothblocks
7b0c926634 Add support for multiple MOTD in config (#61589)
## About The Pull Request
Changes "motd.txt" from being hardcoded to being a list of files which are read sequentially.

CC @MrStonedOne for config changes

## Why It's Good For The Game
On production, our MOTDs contain several individual sections:

- Active Trial Admin threads
- General game information
- MRP specific information

I want to automate number 1, I want number 2 to be shared among all servers, and I want number 3 to be shared among all MRP servers.
2021-09-21 12:03:46 -04: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
Emmett Gaines
04dfcc6559 GAGS fix + debug improvements I needed to find it (#60819)
This fix was one hell of a debug journey. Icon.Insert() was the issue here but I'm not sure if it counts as byond bug in this particular case. When you insert a single frame icon, if an existing icon state of the same name exists normally it would be overridden. However different things happen if the icon that gets overridden has multiple frames. I'm not fully sure of the different behaviors but depending on what the icons consisted of you could get animated sprites where every frame was the same or appending frames to animated sprites in strange ways.

This has been fixed by making sure no Inserts are overriding existing icon states so that the strange behavior doesn't have to be dealt with.

The GAGS debug menu has been upgraded a bit on the way to fixing this bug. A toggle to automatically refresh icons when the dmi or json configuration are updated has been added and the step by step preview will only show steps now involved in the creation of the icon state you select.
2021-09-16 23:55:12 +01:00
Timberpoes
10f2cbe2c3 Fix ping_update errors when certain operations resolve to scientific notation (#61443)
Sometimes when logging on Campbell, fancy chat fails to load and my non-fancy chat is spammed with the following.

image

In addition, ping fails to update correct on the status tab when this happens.

Hypothesis:
Sometimes world.time can report a number that displays as scientific notation when converted to text.

The following code leads to calling the update_ping verb.
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*TICK_USAGE_REAL/100]")

I suspect what's happening is world.time is being converted to text and you're getting the following command:
command=.update_ping+2.1313e

And this is causing an error in update_ping since it can't resolve 2.1313e as a valid number.

Wrapping that in text2num with 32 significant figures (arbitrary number, heat death of the universe proof by several orders of magnitude) means the update_ping verb always gets a number that isn't in scientific notation.
2021-09-14 19:14:11 -07:00
Mothblocks
5a4c87a9fc tgui Preferences Menu + total rewrite of the preferences backend (#61313)
About The Pull Request

Rewrites the entire preferences menu in tgui. Rewrites the entire backend to be built upon datumized preferences, rather than constant additions to the preferences base datum.

Splits game preferences into its own window.

Antagonists are now split into their individual rulesets. You can now be a roundstart heretic without signing up for latejoin heretic, as an example.

This iteration matches parity, and provides very little new functionality, but adding anything new will be much easier.

Fixes #60823
Fixes #28907
Fixes #44887
Fixes #59912
Fixes #58458
Fixes #59181
Major TODOs

Quirk icons, from @Fikou (with some slight adjustments from me)
Lore text, from @EOBGames (4/6, need moths and then ethereal lore from @AMonkeyThatCodes)
Heavy documentation on how one would add new preferences, species, jobs, etc

    A lot of specialized testing so that people's real data don't get corrupted

Changelog

cl Mothblocks, Floyd on lots of the design
refactor: The preferences menu has been completely rewritten in tgui.
refactor: The "Stop Sounds" verb has been moved to OOC.
/cl
2021-09-15 10:11:11 +12:00
Tim
aa33bd47fc Phobia DLC - Spooky Pack (#61311)
This PR expands phobias to include more objects and mobs.

Supernatural Phobia now includes more wizard objects, supernatural creatures and species. (zombies, vampires, nightmares, etc.)
Clown Phobia now includes bananium objects and honk related simple mobs.
All phobias that had any crossover associations with toys, stamps, statues, or megaphones were also added. (for instance the security phobia now checks for security toys and megaphones)
2021-09-10 23:45:49 +01: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
tralezab
4d7f2952e4 [READY] Adds memory system, and engraving walls with chisels (#60302)
Co-authored-by: MonkeyThatCodes <monkey>
Co-authored-by: MonkeyThatCodes <MonkeyThatCodes@deez.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: AMonkeyThatCodes <20987591+AMonkeyThatCodes@users.noreply.github.com>
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
2021-09-08 15:03:07 -07:00
Watermelon914
6152eb96b3 Adds instant integrated circuit execution for event handling circuits. (#61205) 2021-09-06 04:06:20 -07:00
GoldenAlpharex
11110c9f43 pAI minor refactor and cyborg PDA code/visual improvements (#61112) 2021-09-03 19:45:43 -07:00
Kylerace
740a471dbb large refactor of machine/power code to cut down on processing time and wasted lists (#60317)
original pr here: #59789 (Closed because he didn't think it was good enough)
came back to this because i realized that

    all machines were area sensitive, meaning they had a list with at least a reference to themselves (assuming they arent in the contents of another movable which most arent) for the purposes of handling power differences when their area changes
    pipes are machines
    there are ~14k machines and ~6k pipes
    i made this problem worse with a recent pr by making it a nested list

so i needed to track what machines needed power, and this pr had work already done that could be used for that purpose. now machines that have use_power == NO_POWER_USE do not have this extra memory overhead for no reason

currently every machine that uses power draws that amount from its area from a dynamic channel via auto_use_power() which is called every SSmachines fire(), then in apc/process() the area's dynamic power draw is reset and the power is used. with static power its not calculated then reset every loop, its just taken from the grid. so now machines handle updating their static power usage from their current area (this doesnt touch power machines that require a wire connection). in order to allow this, use_power, idle_power_usage, and active_power_usage have setters to track state correctly and update the static power usage on the machines current area and handle area sensitivity.

also goes through a lot of heavy abusers of SSmachine processing time and tries to make it faster. makes airalarm/process() into a signal handler for COMSIG_TURF_EXPOSE since air alarms only need to process for changes.
Why It's Good For The Game

SSmachines isnt the heaviest hitter in terms of total cpu and certainly not in terms of overtime, but its not a lightweight. it frequently takes > 50ms to complete a run and seems to be in the top 5 or so of subsystem costs looking at some round profilers

also gets rid of a few thousand lists since every pipe no longer has two useless lists each (and any other machines that dont use power)

Love ya kyler

Co-authored-by: Rohesie <rohesie@gmail.com>
2021-09-01 18:10:47 -07:00
AMonkeyThatCodes
46cb925af0 Basic Mobs: the cooler simple mobs that run on datum AI. (With reworked cockroach AI as proof of concept) (#60694)
Simple_animals / mobs are the biggest lie in this code-base. They're far from simple and have an extreme god-object problem. Especially when you get to /hostile, where there is so many procs, vars, and what not, that you can't make any interesting additions without snowflaking the hell out of the code.

This PR hopes to help kill this problem by introducing a new /living subtype, /living/basic. The idea of this refactor is to slowly start moving all old simple_animals to this new system, moving over behaviors like charging and more extravagant mobs like megafauna over bit by bit similar to how newfood was implemented.

One of the other big goals of this refactor is to move many of the fringe simple animal behaviors into either AI datums, or components/elements. (Some of which still needs to be done in this PR).

As a proof of concept, I created the base mob/living/basic, and moved cockroaches over to the system. Since cockroaches have both a passive, melee and ranged mob.

This PR does slightly affect balance as the behavior isn't 1-on-1 due to it no longer running on the janky /hostile behavior, but I tried to keep the effects to a minimum, and the glockroach and hauberoach are not spawnable through many means as far as I know.
2021-08-30 16:22:24 +01:00
Mothblocks
0990a8ddcf Give admins the ability to put a popup notice for players in tickets (#61010)
Admins can now give players a popup if they are not responding to tickets.
Popup is cleared when player replies or ticket is resolved/closed.
As more and more of the chat screen is made irrelevant, new players read it less and less.
This means that a lot of new players are ignoring ahelps, which is something I've encountered myself.
2021-08-29 21:11:38 -03:00
TiviPlus
e629c36feb Refactor area and turf lighting (#60954) 2021-08-25 15:07:38 -07:00
Ghom
d46389ae40 Fixes the cross comms exemption of the current server. (#60951)
Added a lowercase variable to string, string lists and keyed list configs.
Currently lowercase is only TRUE for keyed lists because they have been working like that since 2018. It might be changed to be FALSE by default but it'll take a while looking at the parsed logs for the config entries.
2021-08-25 10:18:57 -03:00
Ghom
5394e34a23 roundstart offstation antagonists (wizards, nuke ops...) no longer have quirk assigned to them. (#60987)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2021-08-24 15:45:58 -07:00
AMonkeyThatCodes
3427843dd5 Replaced the lobby menu (with actual art) (#60953) 2021-08-24 15:16:01 -07:00
BraveMole
af48bdaaef QDEL_IN harddel prevention (#60937)
QDEL_IN could hardel if the timer was greater than 5 minutes (time for the qdel queue)

we can use weakref to prevent this
2021-08-20 14:28:34 -04:00
Gamer025
3da51f515d The Failsafe can now recover from an deleted MC (#60846)
* The Failsafe can now recover from an deleted MC
Its also more reliable and can handle a situation where its main Loop runtimes and the MC is stuck

* Reset defcon level correctly
Oops left that in from debugging the levels

* Correctly recover SSasset

* Only decrease defcon if MC creation failed
Also add some sort sleep between emergency loops

* Makes the last two emergency actions manual procs
Since they are kinda unstantable its probalby best
if only admins call these manually

Its also more reliable and can handle a situation where its main Loop runtimes and the MC is stuck
You can also now debug Master/New()

While there will most likely never be any situation where the MC is just gone its still good to know that the game can recover from such a situation
For example maybe someone messed up a SDQL query or maybe someone wanted to delete the MC to create a new one hoping the Failsafe would do so for him
2021-08-19 22:30:39 -07:00
Gurkenglas
781af013d7 fix ntnet circuit components (#60917)
* fix ntnet

* fix typos and switcheroos

* whoops, tracked a test circuit json.
2021-08-18 20:46:24 -07:00
EOBGames
b08632353c [MDB IGNORE] Eliminates Toxins (#60619)
Repaths everything referring to "toxins" while actually meaning either the room in science or plasma gas. While this PR might be disrespectful to our forefathers, given this is (I believe) a holdover from as far back as the Exadv1 days, this has constantly irked me since I started working with the code. None of the player-facing stuff has referred to plasma as toxin since before 4407 hit, besides the Toxins Lab, and yet all of the type-paths are still pointing at toxins, making it a nightmare to search for in a map editor, and making the code needlessly easy to confuse with that of toxin damage. So this just fires it into the sun.

Anything relating to Toxins, the science subdepartment, now makes reference to Ordnance instead. This felt fitting enough given the focus of the subdepartment is around the creation of and testing of explosives.
Anything relating to plasma gas has, fittingly, been made to refer to plasma gas.

Edit: Ah yes, I feel I should probably apologise off the bat for the size of this PR- the code touched is mostly atmos machinery and simplemobs, a few sprites here and there, and of course the station maps + a few offstation maps.

Makes the code more legible and makes mapping less painful.

(The payment has been made)
2021-08-17 11:49:47 -07:00
LemonInTheDark
cd576ab519 Del The World: Unit testing for hard deletes (#59612)
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
2021-08-15 21:09:26 -07:00
Emmett Gaines
1188053c55 Removes a source of nonexistent parent pipenets during update (#60853)
Shouldn't have any visible effects. Atmos machines would occasionally complain about parent pipenets not existing during an update and this should resolve a category of those kinds of warning.

(This is a pain side effect of rebuilding being non instant, shoulda been dealt with a long time ago. Thank you -Lemon)
2021-08-14 23:01:29 -07:00
Rohesie
54a51acf5c Fixes joining the game with the wrong dir (#60816) 2021-08-14 11:53:38 -07:00
Timberpoes
dc5158324b Adds new config flag to mirror logging of suspicious failed logins to its own file (#60791) 2021-08-12 17:58:08 -07:00
Rohesie
6c4134d1ea Job refactor 2: less hardcoded lists (#60578)
* Job refactor 2: less hardcoded lists

* Obsessed can happen
2021-08-05 21:13:05 +02:00
Ghom
371c30b8d6 Thrownthing datum refactor: you can now throw stuff at mobs lying on the floor. (#60604) 2021-08-05 04:44:51 -07:00
Ghom
e1171b31cb quirks taken are now recorded by the blackbox. (#60581) 2021-08-02 22:17:33 -07:00
Watermelon914
96f1c2abae Adds the bare minimum admin components and allows admins to define list literals. (#60240)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: carshalash <carshalash@gmail.com>
Co-authored-by: tgstation-server <tgstation-server@tgstation13.org>
2021-08-02 01:50:06 -07:00
Ghom
c9d972534d Open space turfs now trigger the "falling" phobia (#60575) 2021-07-31 22:13:58 -03:00
Watermelon914
069c76f629 Revert "makes the tram more powerful than you can ever imagine (#60381)" (#60537)
This reverts commit 55d876d1be.
2021-07-30 12:17:34 -07:00
LemonInTheDark
b7c48e1d0e Makes shaking smoother, makes close range explosions more shakey (#60314)
* Makes camera shaking more smooth

Makes shake_camera use more then instant steps for its animates. The concept is to not respect duration quite so
strictly. So instead of instantly moving, we get the distance to travel, pick the lower of the two numbers to
preserve some jerk, and multiply it by tile size * 0.7. So effectively 0.7 ticks per tile. I've found this works
reasonably well for making shaking events look less shit, though there is room to make it a preference option in
future, since this number could go between 0 for the old behavior, and say 5 for slow but not say, visually
hasurdus speeds.

* Makes large close range explosions shake more then far out ones

The old system for calculating explosion shake was sqrt(delta/10) when the delta could really only ever go up to
like 20. So it maxed out at 1.3 or so, which doesn't really fit being hit directly by a bomb. I hate old coders.

I'm changing the fomula to sqrt(range/(dist + 1)), which works out to roughly 4.5 at 20 near_distance, which is
a maxcap. Scales reasonably fast, 4 tiles or so, so this primarially effects getting hit full on with a big
bomb
2021-07-29 02:42:54 -07:00
ma44
7b5e83e1e9 Revives PR #58579; Sligh refactor to AI datums that allows for basic support of subtrees (#60249)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: coiax <yellowbounder@gmail.com>
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Matthew J. <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>
Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: Emmanuel S. <emmanuelssr@gmail.com>
2021-07-28 17:56:31 -07:00
Mothblocks
bd6873fd4d Remove nanites (#60473)
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2021-07-28 16:00:56 -07:00
Kylerace
55d876d1be makes the tram more powerful than you can ever imagine (#60381) 2021-07-27 03:23:23 -07:00