Commit Graph

207 Commits

Author SHA1 Message Date
tralezab
ea57e3f960 Kills BOTH /poison paths by turning poisonous into an element. (+fantasty prefix, sanity on attackingtarget signal, and more) (#58882) 2021-05-09 16:49:59 -07:00
TheVekter
f80105ed21 Adds proper logging to Holodeck safeties and programs (#58149)
* Adds proper logging to Holodeck safeties and programs

* a more elegant solution
2021-04-05 23:29:28 +02:00
Kylerace
23757dadc5 makes holodeck books a holo_effect so they get added to the spawned list (#57909) 2021-03-23 23:50:46 -07:00
Kylerace
c7a399ec4a 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
/🆑
2021-03-20 11:56:35 +13:00
TemporalOroboros
e4079c87b8 update_appearance (#55468)
Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
2021-02-19 12:06:18 -03:00
LemonInTheDark
5c22a0cfc1 Converts many proc overrides to properly use list/modifiers, lots of other smaller things (#56847)
Converts many proc overrides to properly use list/modifiers, fixes some spots where modifiers should have been passed, calls modifiers what it is, a lazy list, and cleans up some improper arg names like L, M, C, and N. Oh and I think there was a spot where someone was trying to pass M.name in as a string, but forgot to wrap it in []. I fixed that too.
2021-02-16 09:18:46 -05:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
Kylerace
00cf04b5a1 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.
2021-02-13 21:41:24 -08:00
Qustinnus
707fc287b4 Replaces intents with combat mode (#56601)
About The Pull Request

This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:

    Disarm and Grab intents have been removed.
    Harm/Help is now combat mode, toggled by F or 4 by default
    The context/verb/popup menu now only works when you do shift+right-click
    Right click is now disarm, both in and out of combat mode.
    Grabbing is now on ctrl-click.
    If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)

Minor interaction changes:

Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game

Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.

As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.

As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.

In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.

The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog

cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
2021-02-04 16:37:32 +13:00
Kylerace
ca7b419dea 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
2021-02-01 09:50:16 -03:00
Kylerace
052130ac0a see title (#56536) 2021-01-31 21:39:53 +01:00
Kylerace
98f58208c8 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
2021-01-30 11:56:29 -03:00
LemonInTheDark
6d1cb94ffb LINDA Reforged (#55604)
Speeds up gas movement significantly
Documents the intent and finer details of the atmos system (Thanks dunc)
Fixes excited groups constantly rebuilding, this broke 4 years ago
Fixes superconductors just straight up not working
Allows turfs to sleep while inside an excited group
Adds a new subprocess to SSAir to support rebuilding in this state
Most heat based behavior no longer relies on being inside a fire
Adds a new element to support doing this cleanly
Adds a new subprocess to SSAir to support doing this while a turf is asleep
Refactors air_update_turf to allow for finer control
Makes apcs take damage in heat to prevent infinite plasma fire diffs
Cleans up immutable gas mixtures to make them work properly when the mix has gas in it
Planetary turfs no longer create a new copy of themselves each time they process. We instead use a global
immutable mix
Cleans up a typed for loop in reactions
Canisters will take damage from outside heat now
Speeds up excited group dismantle
Increases the superconductor threshold by 200k
Cleans up some roundstart ATs on some ruins
Uses /turf/open/var/excited to track if a turf is actively processing, preventing a |=
Prevents openspace from trying to melt
Tweaks a canister examine line
Makes planetary turfs reset to base when broken down as part of an excited group
Makes it impossible for planetary turfs to rebuild, just like space tiles
Fixes closed turfs not activating their replacement when destroyed by moving closed -> open turf activation to
the adjacent air subsystem. They were activating and then going back to sleep before adjacent air got a chance
to tick.
Fire alarms will trigger when the area gets too cold for humans
2021-01-08 08:14:08 +01:00
tralezab
1fd0485206 [READY] Hark! The Medieval Reality Simulation Dome Emergency Shuttle! (+speech mutation, NOTELEPORT fixes and teambuilder improvements) (#55424)
* HARK! THERE ARE SOME MAIDENS THAT NEED SAVING!

* claymores, chairs

* mapmerge, price increase, no losing the flag, no teleporting in, other small stuff

* oldworld language, medieval mutation, reviews

* see desc for full changelog

huge improvements to how medieval speech feels, CTF now fully lit, json beautified, bugs squashed and more NOTELEPORT exploits also quashed. (I NEED TO UNDO THIS FOR ATOMIZATION)

* removes my fixes? also bugfixes and CTF separation

* dumb json mistake, starting work on reality simulators

* BOWS ARE BROOOOOOOOOOOOOOOOOKEN

* br

* getting closer to working

* well, mostly everything now.

* finally ready

* removes languages stuff as it is buggy and does not work, fixes more bugs, fixes more bugs, fixes more bugs

* conflict fix

* linting

* more lint

* bow buff, speech fix, TON of ctf fixes

* oh fuck year

* NO MORE INSTA DELETING CREW

* whoops

* review handled

* pooosh

* conflict fix
2021-01-05 00:49:53 -08:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
nicbn
a1c59cc9bc Moves screen objects from mob to hud (#54400)
This moves screen images from icons/mob to icons/hud
Makes more sense and it is easier to find
2020-10-15 19:46:36 -03:00
Rohesie
39507171d7 Converts some unique and typelists into stringlists (#54237) 2020-10-12 21:47:04 -07:00
Kylerace
0290e3af6d Fixes holocarpet smoothing + fixes holodeck lounge carpet area (#54295) 2020-10-11 18:53:54 -03:00
L
baa30b5d42 floors 2020-09-26 12:14:30 -03:00
L
fb38066f09 bitmask 2020-09-26 12:14:27 -03:00
L
e461d7b777 icons 2020-09-26 12:14:25 -03:00
Timberpoes
1f23cc281d 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.
2020-09-26 11:52:39 -03:00
Mickyan
7e4e9d432d Adds rollerskates, wheely can do tricks (#53497)
This turns wheelys into a skateboard subtype so they are no longer a copy paste of old skateboard code. They have lower stability compared to skateboards.
I've also made a whole bunch of small adjustments in the process to make skateboard code cleaner and more modular, such as turning the improvised skateboard to its own subtype so that construction steps don't need to be overwritten for all subtypes

Adds two subtypes of wheelys:
-Rollerskates: more stable than wheelys but slow you down when the wheels are retracted
-Skishoes: For skiing! Only work on snow, obviously

I wanted to add some fun alternatives to skateboards with their own drawbacks, and the ski shoes were an opportunity to do something fun for icemoon maps
2020-09-11 04:14:00 +01:00
Donkie
53b212ddf2 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
2020-09-08 10:24:05 +02:00
Fikou
d56ebbb7c2 adds better grass sprites (#53421)
adds better grass sprites, ported from eris
converts fairygrass into those sprites too
makes "plating" grass and jungle grass smooth with cool stuff on the edges
adds a sandy dirt tile, removes the old "sand" icon which was just puke colored noise
2020-09-05 18:19:31 -03:00
Kylerace
90be19087d 9x10 Holodeck and New Holodeck Simulations (#52793)
9x10 Holodeck and New Holodeck Simulations
2020-08-27 07:58:03 +02:00
Rohesie
3a33f3ae47 Refactors machine_stat and is_processing() to process on demand (#53150) 2020-08-24 17:38:30 -07:00
uomo
28699d9716 The holodeck will no longer spawn invisible tables, and WILL spawn floor decals. (#52924)
* Fixes holodeck making invisible tables.

* Removes comment.

* Remove extra space.

* Just gets rid of overlays from forbidden vars list.

* Small map fixes for the lounge sim.
2020-08-18 07:09:20 +02:00
kingofkosmos
3263decaad Personalized combat messages part 2 (#52890)
Adds more "personalized" combat messages for all participants in a fight: the attacker, the victim and the spectators
2020-08-13 11:34:57 -03:00
Rohesie
b0726e032b Icon smooth refactor (#52864)
bitflag list construct added: an associative list of bitflags for cheap and quick element comparison between two lists using the same system.

    canSmoothWith list turned into a bitflag list.

    smoothing_groups list added to substitute the type path list.

    smoothing procs turned into atom procs, refactored and optimized a bit.

    smooth directions redefined in order to fit in 8 bits for a future smoothing system

    some variable names changed, foreseeing a second smoothing system

    SMOOTH_OBJ flag added, for things that need to scan turfs for smoothing. The old locate() optimization has the risk of returning false negatives by finding a child and returning null while there might be one of the wanted type as well, as it doesn't match the type exactly.

    SMOOTH_TRUE and SMOOTH_MORE condensed into SMOOTH_CORNERS. The old behavior can be replicated using smoothing groups without loss.

    Does very minor code cleanup.

    Processing-wise didn't find a noticeable difference. The system loses on init a bit by setting the bitflag_lists, and by scanning whole turf contents for object smoothing (increasing accuracy), and gains by making less checks per target to smooth, through the same bitflag_lists.

    Memory-wise there should be a small improvement, given that on the old system we had 63512 canSmoothWith lists (a few typelists, most unique), and on this new system canSmoothWith + smoothing_groups are both bitflag_lists from the same pool, totaling 46 in number.

Could be tested a bit to see if I missed any icons not properly smoothing.
2020-08-13 14:03:49 +12:00
Timberpoes
19c3bbde31 Cleanup up all instances of using var/ definitions in proc parameters. (#52728)
* var/list cleanup

* The rest of the owl

* plushvar bad

* Can't follow my own advice.
2020-08-07 12:23:42 -03:00
Rohesie
cb9f81e43c Renames smooth var to smoothing_flags (#52427)
* smooth_flags

* SMOOTH_FALSE

* smooth_flags
2020-07-29 10:19:23 +02:00
AnturK
4e1f0c9664 Smoothing cleanup, variables moved, atom movable three Destroy() merged into one (#51878)
* smooth

* derp

* parent call order

* defined

* merge stuff

* tab

* merge conflicts

* call parent first
2020-07-21 19:28:06 +02:00
skoglol
d0df1a875c Some buildmode additions, fixes (#52249)
* Adds outfit buildmode mode

* Adds a delete mode, makes copy compatible with humans

* comment fix

* AIstatus

* Tick the files, dummy

* none of that

* Some more copy restrictions

* Apply suggestions from code review

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

* Apply suggestions from code review

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

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-07-20 18:16:37 -03: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
L
84c44bc03c defined 2020-07-16 11:14:46 -03:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
Ryll-Ryll
fc0b247738 rename 2020-07-11 23:23:23 -04:00
nemvar
6ef421be42 Renames a few variables. Also reorders icon fallback order again. (#51060)
* Renames a few variables. Also reorders fallback order again.
Renames item_state to inhand_icon_state
Renames mob_overlay_icon to worn_icon
Renames mob_overlay_state to worn_icon_state
worn_icon_state/mob_overlay_state now never gets used for inhands.

* Fixes some comments

* Fixes map issue

* Restart lints

* Properly resolves conflicts
2020-05-25 06:47:19 +02: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
MrPerson
26093e5ac2 Further update_icon splitup (#48784)
* Further update_icon splitup

After this there'll be just under 100 old update_icon() calls that need fixing.

* Thanks Travis
2020-01-22 10:18:05 -05:00
Arkatos1
c902d64f30 Button linkage fix (#48022) 2019-11-29 09:02:24 +01: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
81Denton
f5bd6a381d Merge pull request #47052 from kingofkosmos/misc_span_fixes1
Misc span fixes
2019-10-20 18:46:54 +02:00
Emmett Gaines
8982f509b5 Refactors screen object update_icon to call parent (#47094)
* Refactors screen object update_icon to call parent

And makes update_icon an /atom proc

* Cleans up some missed null checks

The student teaches the master
2019-10-17 18:21:50 -07:00