Commit Graph

120 Commits

Author SHA1 Message Date
Mothblocks
0f3c4e51f7 Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed (#62265)
Implements the Modernizing radiation design document ( https://hackmd.io/@tgstation/rJNIyeBHt ) and replaces the current radiation sources with the new system, as well as replacing/removing a bunch of old consumers of radiation that either had no reason to exist, or could be replaced by something else.

Diverges from the doc in that items radiation don't go up like explained. I was going to, but items get irradiated so easily that it just feels pretty lame. Items still get irradiated, but it's mostly just so that radiation sources look cooler (wow, lots of stuff around going green), and for things like the geiger counter.

Instead of the complicated radiation_wave system, radiation now just checks everything between the radiation source and the potential target, losing power along the way based on the radiation insulation of whats in between. If this reaches too low a point (specified by radiation_pulse consumers), then the radiation will not pass. Otherwise, will roll a chance to irradiate. Uranium structures allow a delay before irradiating, so stay away!
2021-11-01 04:20:39 -03: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
Couls
9590c85108 restore dynamic lighting to some areas that lost them (#61304)
restores dynamic lighting to some areas that had it but were accidentally removed in #60954 (e629c36feb)
2021-09-14 19:11:31 -07:00
TiviPlus
e629c36feb Refactor area and turf lighting (#60954) 2021-08-25 15:07:38 -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
Rohesie
4c21166e4f Job refactor: strings to references and typepaths (#59841)
* Job refactor: strings to references and typepaths
2021-07-18 20:48:47 +02:00
interestingusernam3
7ed0a9bff3 Fixes charlie station supermatter fluff paper and makes it's code not terrible (#60176)
Yes apparently you can code fluff paper badly. Whoever updated it to the supermatter version did the update in the map file for some reason. Fixes #60171.
A Charlie station fluff paper about the Supermatter is no longer misnamed "singularity generator". THERE WAS NEVER SUCH A THING AS A SINGULARITY GENERATOR. OCEANIA HAD ALWAYS BEEN AT WAR WITH EASTASIA.
2021-07-16 19:56:30 -03:00
Rohesie
2c5a357035 Reverts Entered() passing dir instead of old loc (#59910) 2021-07-01 17:06:42 -07:00
Rohesie
e03cd1aada Refactors move procs to support multitle objects (#59658)
Enter(), Entered(), Exit() and Exited() all passed the old loc forward, but everything except a single a case cared about the direction of the movement more than about the specific source.
Since moving multi-tile objects will have multiple sources of movement but a single direction, this change makes it easier to track their movement.

Cleaned up a lot of code around and made proc inputs compatible.

I'll add opacity support for multi-tile objects in a different PR after this is merged, as this has grown large enough and I don't want to compromise the reviewability.

Tested this locally and as expected it didn't impair movement nor produced any runtimes.
2021-06-20 14:55:37 -07:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
Kylerace
e13fe75590 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
2021-05-24 15:28:02 -04:00
Celotajs
190d0a0384 Replace alert usage with tgui_alert (#58419)
Pretty much every alert() call is replaced with tgui_alert, except one I replaced with tgalert as a fallback. If tgui_alert exists, why not use it?
2021-05-20 22:43:27 +12:00
Kokonut
f07f847706 Tool Resprite (#58616) 2021-04-24 14:04:47 -07:00
Fikou
28f4ebd5f8 you can no longer sentience potion human mobs (#57761) 2021-03-17 16:22:16 -07:00
cacogen
99ca79822e Standardises Donk Co. stylisation (#57383) 2021-03-04 13:12:47 -08:00
Fikou
60424d0e0e adds a bitflag for no random pixel shift on dropping, adds turf_flags var to replace usage of flags_1 on turfs (#57263)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-01 01:23:38 -08:00
Timberpoes
890615856e Fully implements the ID Card design document (#56910)
Co-authored-by: Rohesie <rohesie@gmail.com>
2021-02-28 19:26:45 -08: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
Timberpoes
e3971aa9a3 Fixes Doctor Hilbert breaking crew monitors. (#56364) 2021-01-25 00:21:24 -08:00
TiviPlus
b4a93a3cdf Optimized Getallcontents (#55964)
Optimized Getallcontents, split up it's component procs
2021-01-07 14:36:16 -08:00
TemporalOroboros
edd6500d78 /obj/screen --> /atom/movable/screen (#54403)
Repaths screen objects to /atom/movable
2020-11-08 23:07:15 -03:00
Jared-Fogle
477d97647e Move death(), gib(), and dust() from /mob to /mob/living (#54810)
These have no reason to exist on /mob, where they noop for any nonliving.
2020-11-08 10:32:04 -05:00
Rohesie
c07df08690 Standardizes attack chain signal returns and fixes a tk bug (#54475)
The attack chain is a bit of a mess, and the introduction of signals hasn't helped in simplifying it.

In order to take a step into untangling this, I re-ordered the attack signals to no longer be by source type and instead to be grouped more modularly, as they are all members of the attack chain and function similarly. They all share the trait of potentially ending the attack chain via a return, but had several different names for it. I joined it into one.

Additionally, fixed a tk bug reported by @Timberpoes by adding a signal return check at the base of /mob/proc/RangedAttack

Lastly, removed the async call of /datum/mutation/human/telekinesis/proc/on_ranged_attack, which was added as a lazy patch to appease the linter complaining about a sleep on a signal handler (namely in /obj/singularity/attack_tk). Fixed the problem using timers.

Also cleaned some code here and there.
2020-10-21 05:42:38 +01:00
Timberpoes
1415b3da4b Hilbert's Hotel orb now has a bunch of checks to prevent users pulling shenanigans (#54229)
Hilbert's Hotel now does some basic level of sanity checking after the input to cut down on a number of shenanigans.

The following are all the new changes:

    Hilbert's cannot be activated via telekinesis. It must be activated by direct player attack.
    If the item isn't adjacent to the target after their input, it aborts.
    If the player attempting to enter the hotel is incapacitated after their input, it aborts.
    If the user no longer has the item in their possession after their input, it aborts even if there is a different target.
    If the user is also the target, it will attempt to drop the item normally. If the item fails to drop, it may be teleported to the hotel with the user. The item can fail to drop when it is in the user's possession but not in their hands, or when it has TRAIT_NODROP.
    When the item enters a hotel room created by itself, it will now recursively check for the first mob in its loc stack. It will gib this mob before teleporting away.
    This prevents the warp-whistle effect where a user could put the item in their backpack at INCREDIBLY low risk to themselves (0.135685% chance of anything bad happening) to enter a hotel room and have the orb warped away at random. They could then immediately leave for a free warp whistle effect.
2020-10-16 14:40:37 -03:00
ZeWaka
9629feed35 Converts A && A.B into A?.B (#54342)
Implements the ?. operator, replacing code like A && A.B with A?.B

BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.
2020-10-13 16:43:53 -03:00
Rohesie
af65c90125 Mobility refactor: no more update_mobility() (#54183)
This is a pretty big change all around. The gist of it is that it moves the mobility_flags into traits or variables that can track the sources, and to which we can append code to react to the events, be it via signals or via on_event-like procs.

For example, MOBILITY_STAND could mean, depending on context, that the mob is either already standing or that it may be able to stand, and thus is lying down.

There was a lot of snowflakery and redefinitions on top of redefinitions, so this is bound to create bugs I'm willing to fix as I learn them.

The end-goal is for every living mob to use the same mobility system, for the traits to mean the same among them, and for no place to just mass-change settings without a way to trace it, such as with mobility_flags = NONE and mobility_flags = ALL

Fixes AIs being able to strip nearby people. They've lost their hands usage.
2020-10-09 16:04:30 -07:00
Dennok
8b72ef9aae Completely FIX Hilbert's Hotel and its associated ruin to the game. (#53830)
Reverts the removal in #53790.
Broken in #53586.

Because turfNumber++ must be incremented on turf, not on every ATOM it 
EVERY TURF, and anyway it don't trigger since first turfs don't have 
atoms in it.

Fix #53794, Hilbert's Hotel peephole runtime.
Fix #53795, hhmysteryRoomNumber generates only once.
2020-10-01 18:32:32 -07: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
9c95813da4 Rebalances space loot and space exploration (#53916) 2020-09-25 04:53:43 -07:00
Timberpoes
d95fc6a069 Completely removes Hilbert's Hotel and its associated ruin from the game. (#53790)
The Hotel is a runtime machine. When it swaps rooms, its turfs runtime. When people are actively using it, things in it constantly runtime. It's half broken, half buggy. Turfs don't remember contents. Sometimes blank rooms spawn. Sometimes nothing at all.

It's not worth the time and effort to fix or maintain it.

I'm opening this PR to completely remove it.
2020-09-18 22:13:31 -04:00
ArcaneMusic
d836946e8e Arcane finishes the fight and adds all the missing belt sprites and a worn sprite Admin Tool. (#53305) 2020-09-16 16:11:23 -03:00
TiviPlus
f64085240d Fix sleep lint and use tabs in hilberthotel.dm (#53586) 2020-09-10 18:21:11 -07:00
TemporalOroboros
6e950daccc Defines damage flags. (#53158) 2020-08-24 08:20:33 -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
TiviPlus
b4fe4f717b Refactors area stuff (#52751)
-bitfielded a bunch of bools on /area, I left some untouched cus they get called a lot
-Unused vars
-Fixed a var pretending to be a fake bool
-Probably more
2020-08-10 16:31:59 -03: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
Aleksej Komarov
0cf00a2645 tgui 4.0 (#52085)
* tgui 4.0 hyper squash

* Upgrade dependencies
2020-07-16 20:13:04 +02: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
Fikou
5c88d587b4 removes king goat (#51366)
* Revert "Remodels king goat ruin (#50813)"

This reverts commit 26ffe3d539.

* numba 1

* bye

* bye 2

* bye 3

* fuck bitches get money

* hey this was actually a good change

* goat sounds

* fuck

* h

* waaaaaaaaagh
2020-05-31 17:38:07 +02: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
LemonInTheDark
1614501d23 Datum view and some other things (#51208)
* Datumizes all uses of change_view

* Cleanup and helper procs

* tweaks values to match the format, hint hint, (value - 0.5) works just fine

* And there's the rest

* woop, braindamage

* and one more

* fuck you menu file

* woops

* we should apply that

* fixes tooltip drift, thank you goon coders

* you can shake but you can't zoom
2020-05-25 01:53:51 +08:00
Qustinnus
30d414652c Nerfs the cybersun hardsuit and moves it out of the uplink (#50721)
* nerf

* nerf this

* description
2020-04-28 13:39:04 -03:00
spookydonut
f60c57c14a Merge pull request #50541 from EgorDinamit/fluffwrench
Small fix for Forgottenship ruin.
2020-04-24 00:53:22 +08:00
actioninja
b5dfd8880d id to component name 2020-04-19 19:36:35 +03:00
EgorDinamit
1fe025bb25 deconstructible = FALSE 2020-04-18 20:22:15 +04:00
EgorDinamit
3dc4ae7bc7 [Ready] Forgottenship Ruin - rebalance, config update, uplink item. (#50529)
* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update code/modules/ruins/spaceruin_code/forgottenship.dm

Co-Authored-By: TiviPlus <57223640+TiviPlus@users.noreply.github.com>

* Lowered Cybersun hardsuit armour values.

* Upgrading energy armour value.

* Now captain isn't male-only.

* Turrets

shot_delay changed from 0.8 seconds to 1.0 second.

* Adds 3 encryption keys for cyborgs and AIs to use

* Syndi-captain gets loud-voice headset.

* Policy config

* Define space syndies

* Added Robotics access for syndies

It's really useful for when they create cyborgs.

* Adds special version of medivend instead of normal one

* Replaces basic syndi-vend with special one

* Update forgottenship.dm

* Cybersun hardsuit doesn't slow you down as said in uplink desc.

* NPC + Area sounds.

Elite Assault Officer projectile sound changed from pulse.ogg to laser.ogg.
Added ambient sounds for all areas.

* Good day sir

Lowered the amount of ores you get.

* assignedrole

Let admins know that this particular shitter is the cybersun captain!

* Weight'n'Cost of ruins fixed in another PR

* Update code/modules/uplink/uplink_items.dm

Co-Authored-By: Bobbahbrown <bobbahbrown@gmail.com>

* Cost/Weight of ALL space ruins changed

* Thanks to fikou

* Only cap's spawner leaves empty-sleeper now

* if(policy)

* Revert "Cost/Weight of ALL space ruins changed"

This reverts commit fa343547f0dcf225710895f50ac2bbf32dc07b5d.

* Fixup

* Minor fix in attempt to fix some stuff

* Update code/modules/ruins/spaceruin_code/forgottenship.dm

Thanks trollbreeder.

Co-Authored-By: trollbreeder <trollbreeder@users.noreply.github.com>

* Update code/modules/ruins/spaceruin_code/forgottenship.dm

Co-Authored-By: trollbreeder <trollbreeder@users.noreply.github.com>

* [Grammar] THE captain!

Co-Authored-By: trollbreeder <trollbreeder@users.noreply.github.com>

* grammar review man

Co-Authored-By: trollbreeder <trollbreeder@users.noreply.github.com>

* "A" vs "The"

Co-Authored-By: trollbreeder <trollbreeder@users.noreply.github.com>

* [Grammar] "an"

Co-Authored-By: trollbreeder <trollbreeder@users.noreply.github.com>

* Update uplink_items.dm

* Update code/modules/ruins/spaceruin_code/forgottenship.dm

Co-Authored-By: trollbreeder <trollbreeder@users.noreply.github.com>

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: trollbreeder <trollbreeder@users.noreply.github.com>
2020-04-18 11:16:27 +02:00
Dennok
95c6d579b7 Fix /turf/open/space/bluespace spark crash (#50229) 2020-03-28 00:40:04 -07:00
EgorDinamit
da3cdd8169 [Ready] Syndicate Forgotten Ship ruin. Balance+Bug fix. (#50120)
* Balance+Bug fix.

* Update forgottenship.dmm

* Update forgottenship.dmm

* Removes rogue table

* Give uranium to plebs.

* Beakers+Few chameleon stuff

* Fluff text rebalance. Allow people to leave the ship as long as it is protected.

* Grammar fix, I guess

* Le grammar

* Replaced interrogation room with medbay. Added tactical medkit(1) to med-vendor and 5 basic medkits to the same vendor. Additional ores, loot.

* Surgery disk update

* O2 canisters to maints area

* GPS signal

* Update code/game/objects/structures/ghost_role_spawners.dm

Co-Authored-By: Rohesie <rohesie@gmail.com>

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-03-21 16:59:22 -03:00