Commit Graph

70 Commits

Author SHA1 Message Date
SkyratBot
59fc5ae82f [MIRROR] Fixes exploit that allowed players to disable the safety of holodeck consoles without the proper conditions being followed [MDB IGNORE] (#9235)
* Fixes exploit that allowed players to disable the safety of holodeck consoles without the proper conditions being followed (#62563)

About The Pull Request

As the title says. Players were able to disable the safety of the holodeck without the console being emagged, and without being a robot.
Why It's Good For The Game

I think it would be interesting to add some sort of replacement to this, like players with high gamer skill could disable the safety.
Changelog

cl
fix: Fixes an exploit that allowed players to disable holodeck safety without following the proper conditions
/cl

* Fixes exploit that allowed players to disable the safety of holodeck consoles without the proper conditions being followed

Co-authored-by: CocaColaTastesGood <47264839+CocaColaTastesGood@users.noreply.github.com>
2021-11-04 06:47:26 -04:00
SkyratBot
0e1f4ad9e0 [MIRROR] [s] Fixes exploits [MDB IGNORE] (#9218)
* [s] Fixes exploits (#62549)

Removes an unsanitized to chat to world.

* [s] Fixes exploits

Co-authored-by: CocaColaTastesGood <47264839+CocaColaTastesGood@users.noreply.github.com>
2021-11-03 16:58:41 -04:00
SkyratBot
b6ffb1e31b [MIRROR] Refactor /turf/var/intact [MDB IGNORE] (#9114)
* Refactor /turf/var/intact (#62331)

Turfs have a variable, intact, which conflates three meanings:

    Determining whether there's something that can be pried out, such as directly with a crowbar or indirectly with a tile stack and a crowbar off-hand.
    Determining whether underfloor pieces are visible.
    Determining whether underfloor pieces can be interacted with - by players with tools, through interaction with effects like chemical acid, or foam.

When plating is hit with a stack of tiles, /turf/open/floor/attackby checks whether the turf is intact, and if so, ends the attack chain regardless of whether or not the attempt to hotswap a turf (with a crowbar) is successful or not. However, turfs which want the underfloor to be visible - such as catwalks and glass - set the intact variable to FALSE, and so can be repeatedly placed over one another, as if they were the first tile to be placed over the plating.

This refactors /turf/var/intact into two distinct variables:

    /turf/var/overfloor_placed, for whether or not there is something over plating.
    /turf/var/underfloor_visible, for whether or not the various underfloor pieces should be invisible, visible, or both visible and interactable.

All references to /turf/var/intact have been replaced with an equivalent overfloor_placed or underfloor_visible reference, depending on which check is appropriate. underfloor_accessibility can take one of UNDERFLOOR_HIDDEN, UNDERFLOOR_VISIBLE, or UNDERFLOOR_INTERACTABLE. This prevents cases such as acid foam or tools phasing through glass floors to affect the underfloor pieces underneath, and covers all kinds of unusual, not-wiring-visiblity usage such as Holodeck completeness, Revenant interaction, or station integrity checking.

* Refactor /turf/var/intact

* Thank

Co-authored-by: esainane <esainane+github@gmail.com>
Co-authored-by: Funce <funce.973@gmail.com>
2021-10-30 00:19:21 +13:00
SkyratBot
95ab2d2efb [MIRROR] Adds SHOULD_NOT_SLEEP to Destroy. Why didn't we do this before. [MDB IGNORE] (#8714)
* Adds SHOULD_NOT_SLEEP to Destroy. Why didn't we do this before. (#61943)

* Adds SHOULD_NOT_SLEEP to Destroy. Why didn't we do this before.

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-10-09 09:11:52 -04:00
SkyratBot
a2aaacdead [MIRROR] large refactor of machine/power code to cut down on processing time and wasted lists (#7920)
* 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>

* large refactor of machine/power code to cut down on processing time and wasted lists

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Rohesie <rohesie@ gmail.com>
2021-09-02 03:11:59 +01:00
SkyratBot
db07bac29a [MIRROR] fixes hard del with objects created from holodeck spawners (#6865)
* fixes hard del with objects created from holodeck spawners (#60140)

turns out mobs spawned from holodeck spawners dont get registered for qdeletion, now they do. hard dels btfo

hard dels are poo poo and holodeck issues are definitely 100x worse

* fixes hard del with objects created from holodeck spawners

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-07-12 21:47:40 +01:00
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
SkyratBot
6554717f89 [MIRROR] fixes bug with holodecks referencing self deleting atoms in spawned (#6019)
* fixes bug with holodecks referencing self deleting atoms in spawned (#59355)

decals were hard deleting whenever you loaded a holodeck program with them because it wasnt taking them out of the spawned list, now it does that. also goes around holodeck code and changes for loops to as anything and puts in better var names.

also since its been a while since i looked at holodeck code, the thing could really use a better rewrite one of these days.

* fixes bug with holodecks referencing self deleting atoms in spawned

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-05-29 08:12:43 +01:00
SkyratBot
456f347dfa [MIRROR] USE SIGNAL_HANDLER REEEEEE (#5921)
* use SIGNAL_HANDLER REEEEEE (#59242)

makes as many procs as i can find use the SIGNAL_HANDLER define which i assumed they all already did

* USE SIGNAL_HANDLER REEEEEE

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-05-25 03:42:11 +01:00
SkyratBot
7e11ca2f21 [MIRROR] Adds proper logging to Holodeck safeties and programs (#4679)
* Adds proper logging to Holodeck safeties and programs (#58149)

* Adds proper logging to Holodeck safeties and programs

* a more elegant solution

* Adds proper logging to Holodeck safeties and programs

Co-authored-by: TheVekter <TheVekter@users.noreply.github.com>
2021-04-06 05:16:33 +01:00
SkyratBot
cbc41f5d13 [MIRROR] Fixes bug with atoms (including new players!!!!) not spawned from the holodeck being deleted by it if they happened to be initialized at the same time (#4260)
* Fixes bug with atoms (including new players!!!!) not spawned from the holodeck being deleted by it if they happened to be initialized at the same time (#57510)

About The Pull Request

Fixes #57446
yeah not my best moment, holodeck currently sets SSatoms to add every call to InitAtom() to a list and then give it back to the holodeck console (it actually goes through map_template/holodeck to do it but whatever). However it turns out atom/New() calls InitAtom too, so if an atom is created while SSatoms is still creating the list to give to the holodeck then that atom is added to the list regardless of whether or not its actually from the holodeck template.

Now theres an extra argument to InitAtom that tells it whether its spawned directly from a map template (ie, its part of the input list of uninitialized atoms that InitializeAtoms was given) or otherwise the output list that the holodeck uses is populated by calling GetAllContents on all atom/movables spawned directly from the template.

also renamed some vars in initTemplateBounds because it was hard to reason what it was doing and made it use as anything

also note that loading a map template with returns_created_atoms = TRUE will no longer track atoms that arent in the map file but are spawned directly onto a turf, currently nothing does this with the holodeck (which is the only map template that has this feature)

by the way this bug is my fault
Why It's Good For The Game

incredibly incredibly unlucky new players dont deserve to be deleted just because they didnt spawn in the holodeck
Changelog

🆑
fix: the holodeck is no longer so powerful that it can destroy anything and everything that dares to start existing while it's busy loading programs
/🆑

* Fixes bug with atoms (including new players!!!!) not spawned from the holodeck being deleted by it if they happened to be initialized at the same time

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-03-20 00:09:51 +00:00
SkyratBot
189d16c643 [MIRROR] All Holobugs Must Die the Same Day Theyre Born or You Are Money Back Part Two (#3380)
* All Holobugs Must Die the Same Day Theyre Born or You Are Money Back Part Two (#56878)

runtime in holodeck/finish_spawn() that dealt with doing shit with the atoms in the spawned list, which in some cases cease to exist. now finish_spawn has a check to see if the entry in the spawned list actually exists.

also fixes another small issue with the holodeck process() continually trying to load the offline program and getting rejected which causes the holodeck to give the "ERROR. Recalibrating projection apparatus." message, which it no longer does if the program is forced.

* All Holobugs Must Die the Same Day Theyre Born or You Are Money Back Part Two

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-02-14 10:24:31 +00:00
SkyratBot
08ec8bbadc [MIRROR] Turbo fix for holodecks not clearing previous programs under live server lag (#3003)
* Turbo fix for holodecks not clearing previous programs under live server lag (#56566)

Fixes #56561
the holodeck control console now returns if the previous program still has not finished loading in, so it should now be impossible to have two concurrent load_program() processes running at the same time and thus programs should not overlap under lag. tested locally with around 80% time dilation and 0 holodeck cooldown while spamming the fuck out of loading simulations

* Turbo fix for holodecks not clearing previous programs under live server lag

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-02-01 13:24:53 +00:00
SkyratBot
f27cd6029a [MIRROR] Removes Holodeck Access Flags Feature That Shouldnt Have Been in My Previous Refactor (#2989)
* see title (#56536)

* Removes Holodeck Access Flags Feature That Shouldnt Have Been in My Previous Refactor

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-01-31 22:09:15 +00:00
SkyratBot
4dbe8a2659 [MIRROR] Refactors Holodeck to Use Map Templates, Again! Black Magic OOM Crashing No Longer Included (#2957)
* Refactors Holodeck to Use Map Templates, Again! Black Magic OOM Crashing No Longer Included (#55645)

Refactors the holodeck to use map templates instead of copy_contents_to, which every maintainer seems to have complaints about.

Fixes #41485 because the matches become part of the spawned list created by ssatoms
Fixes #54789 because the holodeck area no longer has the NO_TELEPORT flag
Fixes #55676 because the map templates cant be changed midround unlike the program copies in the centcom z level
Fixes #49318 because the holodeck no longer creates new areas like the original did

This pr also changes initTemplateBounds to be a /datum/map_template proc instead of a parsed_map proc. This was mainly so I wouldn't have to duplicate vars between map_template and parsed_map. It's also nice because there's no longer a parsed_map proc inside the map_template file, especially when it didn't need to be a parsed_map proc.

The holodeck sims wont take up space in the centcom z level any more (which allows for more possible programs in the future), and map templates are more heavily tested. This is also a chance to future proof the holodeck against bugs. Holodeck also seems more responsive. This should allow for a second custom holodeck in some future ruin as well, although that of course will not be in play for the near future because of the offstation content ban. Also I documented the fuck out of the holodeck

* Refactors Holodeck to Use Map Templates, Again! Black Magic OOM Crashing No Longer Included

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-01-30 16:40:12 +00:00
SkyratBot
f3dfe15c10 [READY] Hark! The Medieval Reality Simulation Dome Emergency Shuttle! (+speech mutation, NOTELEPORT fixes and teambuilder improvements) (#2505)
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
2021-01-05 17:17:26 +01:00
SkyratBot
98568e191a [MIRROR] Enforce preserving parent proc return values across ui_act call stacks (#999)
* Enforce preserving parent proc return values across ui_act call stacks (#53964)

All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.

* Enforce preserving parent proc return values across ui_act call stacks

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2020-09-26 17:17:59 +02:00
SkyratBot
1e705faa19 [MIRROR] Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#709)
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)

* Process procs now properly use deltatime when implementing rates, timers and probabilities

* Review fixes

* Geiger counters cleanup

Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now

* Moved SS*_DT defines to subsystems.dm

* Rebase fix

* Redefined the SS*_DT defines to use the subsystem wait vars

* Implemented suggested changes by @AnturK

* Commented /datum/proc/process about the deltatime stuff

* Send delta_time as a process parameter instead of the defines

Also DTfied acid_processing

* Dtfied new acid component

* Process procs now properly utilize deltatime when implementing rates, timers and probabilities

Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
2020-09-09 08:19:23 +02:00
SkyratBot
63a0ca874c [MIRROR] Refactors machine_stat and is_processing() to process on demand (#515)
* Refactors machine_stat and is_processing() to process on demand (#53150)

* Refactors machine_stat and is_processing() to process on demand

* Fixes master (#53193)

* fixes master, damn it me/mothblocks

* fuck again

* ANOTHER ONE

* Fixes master

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2020-08-26 01:21:26 +02:00
Ryll-Ryll
1f31064c3e Merge remote-tracking branch 'tgstation/master' into who-named-this-damned-proc 2020-07-16 21:43:14 -04:00
Aleksej Komarov
0cf00a2645 tgui 4.0 (#52085)
* tgui 4.0 hyper squash

* Upgrade dependencies
2020-07-16 20:13:04 +02:00
Ryll-Ryll
fc0b247738 rename 2020-07-11 23:23:23 -04:00
vuonojenmustaturska
5e1f57de77 Speeds up area power usage handling, and apc process(). Cleans up related code (#51002)
About The Pull Request

/area/proc/usage() attempts to give list-like access to a bunch of vars. Why not make it a list instead and avoid all the proc calls? Might be room for followup here, to do something to powered(), use_power() etc.

Some legacy machinery was ignoring the default machinery use_power pulling from the machine's power channel by default

Total power usage was unused, APCs ignored it in favor of calculating it themselves :)

I also renamed the defines because they were in the danger zone of being very common words.
Changelog

cl Naksu
code: optimized area power usage calculations.
/cl
2020-05-11 11:33:56 +12:00
Iamgoofball
a3aa69701a [READY] Basically, Instant Explosions 2: The Search For More Money: Eternal: A Tail Of Two Kitties: 33 1/3 (#50594)
About The Pull Request

Extools maptick stuff is in the game. Stolen from BeeStation/BeeStation-Hornet#1119, improves performance. Requires ex-tools on the server, though.

Explosions have been refactored to do the actual exploding in a subsystem.

Credit to goon.

Here's some videos!

Why It's Good For The Game
Basically instant max-caps now.
We can now give more of a tick over to the sending of map updates

Changelog

cl Goonstation Coders, Beestation, Extools devs
refactor: Explosions have been heavily optimized.
/cl
2020-04-30 10:27:53 +12:00
actioninja
b5dfd8880d id to component name 2020-04-19 19:36:35 +03:00
Rohesie
7bef84f009 Mass-replacement of stat to machine_stat (#48758)
Living and machine stat vars are pretty different, one uses flags and other number-defines.
This should make some other mass-replacements and searches a bit easier.
2020-01-24 12:37:17 +13:00
skoglol
a113833452 Fixes holodeck (#47564) 2019-11-05 01:22:40 -08:00
spessbandit
a243a26945 [s]Restoring the safeties on the holodeck actually works. (#47272)
* Restoring the safeties on the holodeck actually works.

* adds feedback message for safety restoration
2019-10-22 04:38:52 -07:00
Rob Bailey
2029163d33 playsound vary boolean define conversion (#46254)
About The Pull Request

Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage.
Also changes a couple of places where a list was picked from instead of using get_sfx internal calls

This was done via regex:
(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1
(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0
full sed commands:
/(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE
/(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE

I'm not very good with regex and these could probably be optimized, but they worked.
Why It's Good For The Game

Code usability
2019-08-30 18:45:20 +12:00
kingofkosmos
df1fecc58c Adds notice-span to visible_messages with no spans (#46044)
About The Pull Request

Adds 'notice' span class to all visible_messages which had no span class, making all those black messages blue.
Why It's Good For The Game

This should help differentiate action-messages from talking-messages in the chat. More actions will be blue, thus black talking-messages should pop out more.
2019-08-26 20:50:00 +12:00
skoglol
8e6276d450 Adds UI dimension vars to machinery (#45959)
* Adds dimension var to machinery.

* cleaner

* newlines

* Cleanup
2019-08-22 00:33:10 -07:00
AnturK
1a18086a3b Fixes this properly. 2019-06-18 22:46:16 +02:00
AnturK
c2bc6164c7 Fixes holodeck href exploit. 2019-06-18 22:21:00 +02:00
ShizCalev
f2cea780aa Move map errors to their own log file (#43376)
In interest of getting things fixed without having to constantly crawl
through game.log to find map issues, moved them to their own log file.
2019-03-30 13:54:55 -07:00
Denton
877d3cea69 Fixes heat sources not igniting things 2018-12-02 19:06:20 +01:00
81Denton
8ee97bfdbe Tweaks holodeck warning msg (#41555) 2018-11-18 12:50:44 -05:00
Tad Hardesty
aff11eaaa8 Give multiple copies of shuttles their own area instances (#39890) 2018-08-27 06:04:48 -04:00
deathride58
c5a0e14acb Tones down values for a lot of different hotspot_expose calls (#38232)
* Tones down values for a lot of different hotspot_expose calls

* Update LINDA_fire.dm (#38217)

* Automatic changelog compile, [ci skip]

* Slight changes to camera network code (#38223)

* Removes a useless var and corrects two cameras to use the automatic naming system to reduce dv usage.

* Damn github didnt notice this was here....

* Fixes datediff not returning (#38215)

* Fixes pocket items being deleted when monkeyizing (#38220)

* Automatic changelog generation for PR #38220 [ci skip]

* readds atmos heating from hotspot_expose(), as requested by naksu

* Tones down hotspot_expose values for sparks moving and destroying

* tones down item heat by a lot. no more burning your face off after smoking a cigarette
2018-06-08 15:53:10 +03:00
vuonojenmustaturska
1eccbcca18 Adds an EMP protection component, allowing ANYTHING to be protected from EMP (#37671)
The component is initialized with any combination of three flags, EMP_PROTECT_SELF protects against effects that target the object itself, EMP_PROTECT_WIRES protects against wires being messed with similar to the NO_EMP_WIRES_1 flag which this PR removes, EMP_PROTECT_CONTENTS protects against things that are inside the object like organs, internal "non-virtual" power cells and the like

This enables (but doesn't introduce) new mechanics such as adding EMP shielding at runtime to any atom, or taking it away.
2018-05-22 11:38:02 +12:00
vuonojenmustaturska
6406896df1 Replaces a bunch of obj vars (and emagged on machinery/items) with obj_flags (#34078)
* It works, but is it worth it?

* bitfield helpers take 1

* Would this work?

* remove dangling debug code

* rebase & fixes

* vv bitfield stuff, reading

* DNM oceans of shitcode DNM

* honk

* honk2

* plonk

* rebase & fix
2018-01-22 20:19:46 +01:00
Tad Hardesty
292f6f5f0b Add off switch to holodeck (#32327)
"Holodeck - Offline" is now a selectable program and correctly reverts
the holodeck and uses no power.
2017-11-02 22:28:27 -06:00
Ian Turk
7460f2c5b8 Replaced flags with flags_1 2017-08-16 13:01:15 -06:00
ShizCalev
45d3d52af7 Made some object lists less terrible to read (#29304)
* spaces

* more spaces

* last ones
2017-07-18 10:44:29 -04:00
ShizCalev
db10f35703 Cleaned up some emag_acts (#29238)
* cleaned up some emag_acts

* Randomized spark sounds

* Made sparky looking things sound sparky too

* early return
2017-07-15 11:27:50 -04:00
kevinz000
7a26305498 Replaces ex_act and emp_act numbers with defines (#29215)
* defines

* defines

* explode_none
2017-07-13 08:56:26 -03:00
Lzimann
b645910673 Fixes holodeck not having the correct area 2017-07-05 09:07:03 -03:00
Lzimann
fdce8da565 Changes the holodeck to use tgui, plus some code refactor/improvements 2017-06-30 21:27:55 -03:00
GunHog
980089dad6 Holodeck Silicon Check
It was possible to emag the holodeck as a non-silicion without an emag.
2017-06-29 13:05:13 -05:00
Cyberboss
5ace376e4a Initialize Refactor (#25981)
Shouldn't break anything, stops warning spam, logs errors qdel style at the end of the game.

Initialize now expects a hint to be returned, one of:
INITIALIZE_HINT_NORMAL - Does nothing, returned by the root proc
INITIALIZE_HINT_LATELOAD - Call atom/proc/LateInitialize
INITIALIZE_HINT_QDEL - Calls qdel on the atom

LateInitialize currently defaults to the old re-calling behavior so there should be no issues with that.
Things that didn't return a hint or fucked up somehow will be logged less loudly than they were before

No more world start warnings!
2017-04-27 09:02:29 +12:00
AnturK
794d3e9346 Fixes holodeck areas 2017-04-08 21:53:47 +02:00