Commit Graph

265 Commits

Author SHA1 Message Date
SkyratBot
3bd294f26f [MIRROR] Defines damage flags. (Hopefully without 50+ commits) (#491)
* Defines damage flags. (#53158)

* Defines damage flags. (Hopefully without 50+ commits)

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
2020-08-24 22:52:31 +02:00
SkyratBot
a35d68861f [MIRROR] Fixes bookshelves with shelf removed still showing shelf. (#478)
* Fixes bookshelves with shelf removed still showing shelf. (#53106)

* Fixes bookshelves with shelf removed still showing shelf.

Co-authored-by: uomo <51800976+uomo91@users.noreply.github.com>
2020-08-23 21:05:38 +02:00
SkyratBot
72c69368b6 [MIRROR] Opacity refactor (#405)
* 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

* Opacity refactor

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-08-19 04:48:14 +02:00
SkyratBot
49f7becb88 [MIRROR] Personalized combat messages part 2 (#334)
* Personalized combat messages part 2 (#52890)

Adds more "personalized" combat messages for all participants in a fight: the attacker, the victim and the spectators

* Personalized combat messages part 2

* Update misc.dm

Co-authored-by: kingofkosmos <riki.sundberg@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2020-08-14 23:29:15 +02:00
SkyratBot
e8bfe6eb68 [MIRROR] [Ready] CDN browser assets! (#312)
* [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

* [Ready] CDN browser assets!

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2020-08-12 11:32:37 +01:00
SkyratBot
b25aea057b [MIRROR] adds lightbulb removing skillchip (#215)
* 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>

* adds lightbulb removing skillchip

Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
2020-08-07 01:37:33 +01:00
SkyratBot
f9790d97a9 [MIRROR] Implements job skillchip framework as per hackmd.io design document (#212)
* 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

* Implements job skillchip framework as per hackmd.io design document

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2020-08-06 01:03:04 +01:00
SkyratBot
5fd8cb072e [MIRROR] Color standardization, vars moved, and signals (#194)
* 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.

* Color standardization, vars moved, and signals

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-08-04 12:20:31 +02:00
SkyratBot
681c1e26bd [MIRROR] Adds useless skillchip adapter (#145)
* 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>

* Adds useless skillchip adapter

Co-authored-by: Gamer025 <33846895+Gamer025@users.noreply.github.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
2020-07-31 00:36:13 +02:00
AnturK
1f5e905c0d 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 04:14:10 -04:00
TemporalOroboros
1ca448ae1f 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:10:38 -04:00
ArcaneMusic
aade6fcdd3 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 01:59:31 -04: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
Qustinnus
81c3d92129 Adds pick-up, drop and throw sounds for items. (#46677)
* finishes up

* adds sound volumes

* woops

* forgot to ctrl + s

* cloth

* smh

* done
2019-10-04 18:53:09 -04:00
kingofkosmos
8358169b8e New 'hear' span class (#46369)
* Reverts italics-span back to no color.

* Cleans up many extra spaces and indents.

* Adds 'hear' span class.

* Replaces all 'italics' used in heard messages with 'hear'.
2019-09-14 23:56:34 -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
AnturK
a1d72bbadc fixes random bookcase icons (#45910) 2019-08-15 21:56:00 -07:00
RandolfTheMeh
48fbc073e5 [TMC] Defib Rework, Organ Damage Effects (#45104)
* Brain damage works on organ damage procs, some defib reworks

* Heart and Lung damaging effects and failure, liver damage and failure moved to its organ again

* Cleans up reused global

* Organ damage procs on living and living/carbon

* Changes brain damage procs again

* SR heals all organs on revive, no decay for cybernetic implants, stomach damage and fail effects.

* Damage and failure effects for the appendix, ears, and some touchups on the stomach

* Committing changes so I don't lose them

* Organs now cease decaying in the proper containers

* Organ Fridges

* Reverts map changes

* Adds coronary bypass, lobectomy, trying to deal with organ_stat runtime

* Actually fixes merge conflict

* Smartfridge tweaks

* Think I figured out map merger

* Evidently not

* Still runtiming with glass shards even after I remove the map changes?

* Fixes runtime error with brain_item

* Runtime fix on living/carbon/life

* Cleaning up old PR code

* Brain damage fix, moves defines to actually be in _DEFINES, under DNA since that's where organ slots were

* Wrong math operation used

* Brains in MMIs no longer decay

* Removes redundant variable, and defibs no longer work on heart attacks caused by failing hearts

* Removes misleading comment

* init freezes organs in case organ crates are added, morgue corpses are frozen, removes adjustLiverLoss

* Removes random spaces, scanners check brain damage severity now

* Swaps numbers for defines, fixes brain surgery, rebalances coronary bypass bleed since that was insane last I tested it

* List change

* Runs off of an index instead of using cut

* Brains can be put into organ fridges

* Fixes minor type, hotfix for cloning problem

* Removes pointless check

* Demon hearts no longer decay

* Nightmare hearts no longer decay

* Removes istype() check on process, sets can_decompose instead

* Condenses organ damage report

* Removes organ failure messages

* Less organ damage spam, implements organ threshold messages instead

* Brain damage messages go to owner, not source

* Self-examine shows damaged organs

* Minor code cleanup, adds autodoc comments to the new procs

* Inverts standard organ vars to prevent random organs decaying, adds a few more autodoc comments.

* Merged the booleans into a set of flags

* Healthy living improves organ healing rates

* dunno why this didn't update

* my actions have consequences

* Sets ORGAN_SYNTHETIC for overlooked robotics organs

* Doubles heart decay time

* 3 minute heart decay

* Lobectomy/Coronary_Bypass heal more

* removes hivemind spells from the changes
2019-07-29 02:18:22 -07:00
vuonojenmustaturska
8ddc9677c7 examine-code refactor (#44636)
* 1/4 done? maybe?

* more

* stuff

* incremental stuff

* stuff

* stuff & things

* mostly done but not yet

* stuffing

* stuffing 2: electric boogaloo

* Git Commit and the Kingdom of the Crystal Skull

* make it actually compile

* found more stuff

* fixes

* fix AI laws appearing out of order

* fix windows

* should be the remaining stuff

* this time for real

* i guess it should compile too

* fix sechuds
2019-06-19 22:07:57 +02:00
Emmett Gaines
c3f95024b2 Gets rid of the GetComponent macros (#44220)
* Removes the GetComponent macros

* Regex replacement for GET_COMPONENT

Search: `GET_COMPONENT\( *(.+?) *, *(.+?) *\)`
Replace: `var$2/$1 = GetComponent($2)`

* Regex replacement for GET_COMPONENT_FROM

Search: `GET_COMPONENT_FROM\( *(.+?) *, *(.+?) *, *(.+?) *\)`
Replace: `var$2/$1 = $3.GetComponent($2)`
2019-06-04 17:39:58 +02:00
oranges
5be02315ea Merge pull request #44191 from AffectedArc07/removes-ss-religion
Removes SSreligion
2019-06-02 09:40:45 +12:00
vuonojenmustaturska
6a106bc877 Remove reagent ids and use typepaths where applicable (#44166)
cl Naksu
code: reagent IDs have been removed in favor using reagent typepaths where applicable
fix: mechas, borg hyposprays etc no longer display internal reagent ids to the player
/cl
2019-05-31 21:57:26 +12:00
AffectedArc07
e856ca9de2 Merge 2019-05-29 14:03:03 +01:00
AffectedArc07
9955d0efbc Gives SSreligion the boot 2019-05-29 13:33:04 +01:00