Commit Graph

277 Commits

Author SHA1 Message Date
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
ArcaneMusic
5338ad1696 Re-assesses 99% of vending prices through Arconomics to match player resources and round-length. (#54715)
* The Re-pricening

* Rewritten and adjusted for paycheck defines.

* I made the map changes finally.

* And the refills too.

* "OH YEAH REPLACING IT ALL WITH DEFINES AND SCALING IT THE EXCEL DOCUMENT WILL BE EASY, ARCANE!!!"

* And the premium ones too.

* Accidently spoiled a future pr due to dme bleedover
2020-11-13 16:17:22 -05:00
nicbn
a653bc6350 Refactors occupant to use setter (#54373)
This is to make it easier to attach a signal to the setting of the occupant.
2020-10-18 12:46:14 -03:00
Timberpoes
4d947b1906 Uberfeex 2020-09-30 03:52:04 +01:00
Rohesie
3cc7733f34 Moblity refactor: hands blocked and restrained edition. (#53981)
Splits the restrained() proc into component traits: TRAIT_HANDS_BLOCKED for the general inability to use hands and TRAIT_RESTRAINED for the more specific condition that permits arrests.
    Code moved away from the update_mobility() proc so it doesn't have to wait for an update, instead changing based on events. The idea is to eventually kill that proc.
    Wrapper proc added for setting the handcuffed value so we can react to the event of it changing.
    Kills the RestrainedClickOn() proc. That is now just an UnarmedAttack(), in where the ability to use hands can be checked. Monkeys keep their bite attack and humans their self-examine.
2020-09-29 11:23:43 +01: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
Timberpoes
c2b8b5c0ce Machines now store their components in their contents. (#52970)
Machine parts are now located in the machine instead of nullspace.
2020-09-24 13:51:40 +02:00
TiviPlus
ff1631b7b9 Fully removes devil and affiliated shitcode (#53612)
Its all over the place, messy, and overall a bad enough gamemode to be removed from rotation.
A rework would have to tear out everything as is so there is no reason to allow the shitcode to live beyond tripping up everything.
2020-09-23 00:46:21 +01:00
Tad Hardesty
cf7ac5b79d Fix some miscellaneous grammar mistakes (#53414) 2020-09-05 02:45:25 -07:00
TiviPlus
ca366c3ea1 Bools and returns super-pr (#53221)
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns
Edit: Most left out ones are in mecha which should be done in mecha refactor already
Oh my look how clean it is

Co-authored-by: TiviPlus <TiviPlus>
Co-authored-by: Couls <coul422@gmail.com>
2020-08-28 14:26:37 -07:00
Jordie
6630051cc8 fixes visitor console sql concat (#53170)
Co-authored-by: Jordie0608 <=>
2020-08-25 06:50:51 -07:00
Rohesie
988319b3e3 mobility refactor (#52929) 2020-08-24 13:56:07 -07:00
TemporalOroboros
6e950daccc Defines damage flags. (#53158) 2020-08-24 08:20:33 -03:00
uomo
045626f690 Fixes bookshelves with shelf removed still showing shelf. (#53106) 2020-08-23 05:08:45 -03:00
Rohesie
25f670f8de Opacity refactor (#52881)
Moves all opacity var manipulation to a proc which sends a signal.
    light_blocker element for movable opaque atoms made, which tracks its movement and updates the affected turfs for proper lighting updates.
    has_opaque_atom boolean replaced by the opacity_sources lazylist to keep track of the sources, and a directional_opacity which serves a similar function but also allows for future expansion with on-border opaque objects (not yet implemented).
    Some opacity-related sight procs optimized as a result of this.
    Some variables moved to the object's definition.
    A define or two added into the mix for clarity.
    Some code cleaning, like turning booleans into their defines.
    One file renamed for clarity.

Changelog

cl
balance: Mechs no longer block sight. It's a non-trivial cost for the lighting system with little to no gain.
/cl
2020-08-19 13:24:20 +12: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
Kyle Spier-Swenson
8df93ba39e [Ready] CDN browser assets! (#52681)
Rewrites the asset_cache system to handle sending assets to a CDN via a webroot.

see https://github.com/MrStonedOne/tgstation/blob/asset-cdn/code/modules/asset_cache/readme.md

Fixed a lot of bugs with assets, removed some dead code.

Changes:
    Moved asset cache code to transport datums, the currently loaded one is located at SSassets.transport, asset cache calls made before the config is loaded use the simple browse_rsc transport.
    Added subsystem call for when the config loads or reloads.
    Added a webroot CDN asset transport. assets are saved to a file in a format based on the file's hash (currently md5).
    Assets that don't use get_asset_url or get_url_mappings (such as browser assets referred to by static html files like changelog.html or static css files) can be saved to browse_rsc even when in cdn asset mode by setting legacy to TRUE on the datum returned by register_assets
    Added a system for saving assets on a cdn in a hash based namespace (folder), assets within the same namespace will always be able to refer to each other by relative names. (used to allow cdn'ing font awesome without having to make something that regenerates it's css files.).
    The simple/namespaced asset cache datum helper will handle generating a namespace composed of the combined md5 of everything in the same datum, as well as registering them properly.
    Moved external resource from a snowflake loaded file to a config entry, added it to resources.txt
    To ensure the system breaks in local testing in any situation that wouldn't work in cdn mode, the simple transport will mutate the filenames of non-legacy and non-namespaced assets and return this with get_asset_url.
    Simple transport's passive send of all roundstart assets to all clients is now a config that defaults to off. this is to break race conditions during local testings from devs accidentally relying on this instead of using send() properly.

cl
refactor: Interface assets (js/css/images) can now be managed using an external webserver instead of byond's one at a time file transfer queue.
admin: Adds admin verb toggle-cdn that allows admins to disable the external webserver asset transport and revert to the old system. Useful if the webserver backing this goes down (thanks cloudflare).
config: New config file, resources.txt, (must be loaded by an $include statement from the main config)
server: The external_rsc_urls.txt config has been moved to the main config system.
/cl
Porting notes:

Interface webpages must refer to their assets (css/js/image/etc) by a generated url, or the asset must register itself as a legacy asset. The system is designed to break in localtest (on simple/legacy mode) in most situations that would break in cdn mode.

Requires latest tgui.

The webserver must set the proper CORS headers for font files or font awesome (and other fonts) won't load.

/tg/'s webserver config: https://gist.github.com/MrStonedOne/523388b2f161af832292d98a8aad0eae
2020-08-12 13:51:43 +12:00
Fikou
613cfae75c adds lightbulb removing skillchip (#52603)
* shawty got low low low low low low

* Update code/modules/library/skill_learning/skillchip.dm

Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>

* aaagh

* fuck

* review

Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
2020-08-06 11:16:02 -03:00
Timberpoes
8fc671f942 Implements job skillchip framework as per hackmd.io design document (#52630)
* Shift wire revealing logic to dedicated proc

* Bit of code modification. Framework for roundstart job skillchips.

* Implement roboticist skillchip trait functionality.

* Feex moth feet messup

* Add skill chips to robodrobe inventory

* Code refactor. Add missing skill_stations to Pubby and Delta.

* Implement special flags, changelings inherit skillchip skills

* Additional code refactor. Traitor chameleon skillchip framework.

* Implement traitor skillchip, fix up more code, move job chips to outfit datums

* Modify autosurgeon, create skillchip variant, add to uplink

* Implement chip cooldowns. Add new skillchip for station engineers. Cleanup some code. Add job chips to lockers.

* Feex

* Feex

* Code review implementation

* More feexes, improved chameleon chip code and more.

* Code review and minor refactor

* Additional review fixes, rebuild tgui

* Minor logic fixes

* Final Rohesie review

* Robust code changes, improved slot/complexity system.

* Rebuild tgui

* Code review

* Brain regeneration failsafe

* Lazylist cut fix
2020-08-05 21:21:29 +02:00
Rohesie
6ff08e1c69 Color standardization, vars moved, and signals (#52574)
Defined all the existing light_color values.
    Moved their definitions to colors.dm
    Made white the default color. It was so already, but that was very obscured.
    Moved the atom light-related variables to the atom definition.
    Wrapped changes to variables such as light_color into procs that report the event through signals.
    Moved the light_on variable to the atom level, also adding a signal for its changing, to represent toggling lights.
    Cleaned up a little bit of code in where new variables were defined before redefinitions.

This is all atomization to reduce changes in #52413
None of this affect gameplay at all, it's all code cleaning and refactoring.

There's more colors to standardize, a search for color = will find lots of targets, and I see little need to have both the LIGHT_COLOR and COLOR patterns, but I don't want to make this PR bigger than it already is.
2020-08-04 13:59:48 +12:00
Gamer025
c93c479ff9 Adds useless skillchip adapter (#52577)
* Adds useless skillchip adaptor

* Redo code so that skill_station code doesn't need to be modifed

* Remove helper and return directly instead of setting return code

* Update code/modules/library/skill_learning/skillchip.dm

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

* Change to bitflag system

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-07-30 14:49:21 -03:00
AnturK
e5cf3c05b8 Simple skill/skillchip framework (#52314)
* Simple skills framework.

* Map changes.

* Adds skillchips to vendor

* Adds skill stations to the map.

* Circuitboards

* Fix typo

* Some minimal instability

* Fixes,tweaks etc

* Suggest better names or we'll end up with these.

* sharpness thing

* tgui build

* Makes wine from booze synthetizer show to wine tasters.

* Makes wine from dispenser have taste for wine tasters.

* Apply suggestions from code review

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

* Swaps to carbon var.

* wordy helper proc

* While i'm at it, other relaymoves

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-07-29 05:13:36 -03:00
TemporalOroboros
5b99d66569 Replaces some zero-delay timers with INVOKE_ASYNC (#52434)
* INVOKE_ASYNC

Replaces a zero-delay timer with INVOKE_ASYNC

* More timers

Switches out some more zero-delay timers for `INVOKE_ASYNC`

* lib_codex_gigas

One last switch
2020-07-26 22:09:58 -04:00
ArcaneMusic
a6b367f8c8 Adds an metric ton of belt sprites and suit sprites for worn objects. (#52390)
* Plant Belt sprites are fixed, Engy Sprites too

* I did belt sprites until my eyes started hurting
2020-07-25 02:58:52 -03:00
ShizCalev
4b6500fb67 Makes all anchored changes use setAnchored(), COMSIG_MOVABLE_SETANCHORED now only sent if an AM's anchored var has changed for more reliable usage. (#52254)
* Converts everything to use setAnchored() + other fixes

* Fixed singulo debug

* singulo again

* forgot to move the vv_edit proc

* caught that this time :)

* changes

* Update code/game/atoms_movable.dm

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

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-07-21 02:20:26 -03:00
Gamer025
738d247a3a Library length checks (#52298)
Add max length check to book title and author
2020-07-19 17:19:21 +02:00
Aleksej Komarov
0cf00a2645 tgui 4.0 (#52085)
* tgui 4.0 hyper squash

* Upgrade dependencies
2020-07-16 20:13:04 +02: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
Jordie
ad7c6c0245 Removes global bookcache (#51891)
* removes global bookcache

* added timeout for topic calls and renames cooldown var

* change to using cooldown defines

Co-authored-by: Jordie0608 <=>
2020-07-08 09:36:16 -04:00
nemvar
b87f65d95e Converts ALL typepaths to lowercase (#51642)
* Case of lower

* More changes

* Ruins the nice 420 diff, brainfart when doing the second batch of conversions

* More changes

* Next batch. I think

* Converts even more paths

* Restarts bots

* Capital Free Zone

* Come on travis, do something

* Renames areas

* Bots, please stop dying

* Updates CONTRIBUTING.md and updates a few paths I missed.

* APC recgarftzfvas
/obj/item/computer_hardware/recharger/apc to /obj/item/computer_hardware/recharger/apc_recharger
2020-06-17 20:47:57 -03:00
ShizCalev
3c0d0f80fb Fixes powered off computer screen errors (#51628) 2020-06-15 19:26:15 +02:00
Tad Hardesty
829e95896e Replace BSQL with rust-g, paramaterize all queries (#51255)
cl
refactor: BSQL has been replaced with rust-g, improving SQL reliability and safety.
/cl

Queries were parameterized as much as possible. Careful code read by someone else also versed in SQL would be a good idea. Things seemed fine spot-testing roundstart, library, bans, and polls, but more stress-testing may be useful.

Also updates rust-g to v0.4.5:

    Improved Linux .so detection
    Perlin noise functions

Also updates Travis script to bionic.
2020-06-08 16:00:07 +12:00
Jordie
469e1921f4 Delays loading of random books (#51144)
* delays loading of random books

* fix map var

* review

* return

Co-authored-by: Jordie0608 <=>
2020-05-30 02:20:38 -03: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
actioninja
b5dfd8880d id to component name 2020-04-19 19:36:35 +03:00
Jordie
2fe48855c8 Basic pagination for library visitor console (#50427)
Fixes #45284

Some simple pagination for the library visitor console to stop it from hanging the server by trying to retrieve too much data.

The UI hasn't been made any better, I just wanted to stop us needing #49065 to be testmerged indefinitely. I went into this thinking I'd improve the UI and code but that was before I had read any of it and lost my motivation.

Bonus points for this code having allowed unsanitized arbitrary queries for at least 10 years.
2020-04-07 08:11:16 +12:00
spookydonut
106b4ba672 book console fix (#49696)
* book console fix

* proper console for randomruins
2020-03-05 21:38:40 +08:00
spookydonut
319ca52545 removing unnecesary double parent proc calls (#49694)
* removing unnecesary double parent proc calls

* i made an oopsie
2020-03-05 18:51:37 +08:00
ShizCalev
df81c5be4a Fixes blindfolds not properly counting as being blind 2020-02-24 01:10:34 -05:00
ShizCalev
7209ac3c93 Removes unnessacary math defines 2020-02-17 23:09:09 -05:00
skoglol
a28b24f149 Completely removes cloning (#48668)
* Removed from code

* Removes cloners from maps

* Some more references, now compiles.

* Reduces availability of replica pods

* DNA scanner and tech disk rebranding

* pubby door name, cargo pack description
2020-02-04 16:04:06 -05: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
MrPerson
f7eb2c905b Unicode awareness Part 2 -- copytext() (#48512)
* Unicode support Part 2 -- copytext()

This is the transition of all copytext() calls to be unicode aware and also some nearby calls in the same functions. Most things are just replacing copytext() with copytext_char() as a terrible character limiter but a few others were slightly more involved.

I replaced a ton of
````
var/something = sanitize(input())
something = copytext(something, 1, MAX_MESSAGE_LEN)
````

with a single stripped_input() call. stripped_input() already calls html_encode(), trim(), and some other sanitization so there shouldn't be any major issues there.

This is still VERY rough btw; DNA is a mess, the status displays are complete ass, there's a copytext() in code\datums\shuttles.dm that I'm not sure what to do with, and I didn't touch anything in the tools folder. I haven't tested this much at all yet, I only got it to compile earlier this morning. There's also likely to be weird bugs until I get around to fixing length(), findtext(), and the rest of the string procs.

* Makes the code functional

* Assume color hex strings are always # followed by ascii.
Properly encodes and decodes the stuff in mob_helpers.dm which fixes some issues there.

* Removes ninjaspeak since it's unused
2020-01-18 13:07:22 +13:00
AnturK
067869de48 Fixes bookcase runtime. (#47496) 2019-11-03 01:54:13 -07:00
skoglol
938e66f62c Adds sorting to most input() lists (#47117)
* Adds sorting to most input() lists.

* Sorted some global lists, added more input sorting

* Should now use correct sort everywhere.

* compiles

* Last fixes.
2019-10-22 04:28:42 -07:00
kingofkosmos
52325eda25 Merge branch 'master' of https://github.com/tgstation/tgstation into misc_span_fixes1
# Conflicts:
#	code/game/machinery/Sleeper.dm
#	code/game/machinery/doors/airlock.dm
#	code/game/objects/structures/beds_chairs/chair.dm
#	code/game/objects/structures/lavaland/geyser.dm
#	code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
#	code/modules/antagonists/clockcult/clock_mobs/_eminence.dm
#	code/modules/paperwork/contract.dm
2019-10-17 06:02:06 +03:00
KomradeSpectre
9ff071af60 Clockcult Removal 2019 (#47057)
* Nanotrasen fires the Wave Motion Gun at the Clock Cult

* Fixes a random changelog appearing from the reebe void.

* Fixes a wrong type reference regarding the bronze sheets in the Lavaland Ruin for it.

* Fixes redundant cells after CC removal in ruin by populating them with varied ore chunks, or destruction clutter.

* why is it /obj/item/stack/sheet/metal but not /obj/item/stack/sheet/iron

* Fixes the lavaland ratvar ruin to have fluff variant structures of deleted shit it referenced instead what I thought was reasonable.
2019-10-15 10:13:41 +02:00
kingofkosmos
280d416d4f Adds missing spans, missing periods and missing span endings. Also changes spans to suit the situation better. 2019-10-12 19:34:11 +03:00
William Wallace
fff4e9aee5 remove duplicate var definition in /obj/structure/chisel_message 2019-10-08 23:39:44 +01:00