Commit Graph

2215 Commits

Author SHA1 Message Date
Ghom
7bc81e5831 Refactors how movetypes are added and removed, No timers this time. (#55444) 2020-12-28 17:57:51 -08:00
Timberpoes
a8f683c672 Fixes BRPED/rigged cell exploit and allows it to booby trap BRPEDs instead (#55447)
BRPEDs can teleport rigged power cells. Through cameras. These rigged power cells will then pretty much immediately explode. This is a tad imbalanced.

Behaviour modified. Attempting to use a BRPED on a machine and having it attempt to swap over a rigged cell will cause the rigged cell to immediately go to maximum charge and explode.

Adds some logging to accompany it.
Why It's Good For The Game

Blowing things up from across the cosmos is bad.

Rigging BRPEDs to be able to explode when some poor sucker uses it to change over a power cell is cool.
2020-12-29 14:55:48 +13:00
Timberpoes
b5332ee4db Deadchat plays everything - A simple way for admins to let deadchat control things. (#55314)
* Deadchat plays things

* Pocket lint

* View those variables

* Arr var

* Arrr save changes and don't code while drunk

* Loog dot exe

* Big ol' changes
2020-12-26 21:03:47 +01:00
LemonInTheDark
69f28712b9 Makes the supermatter crystal immune to radiation. Not sure how I missed this (#55710) 2020-12-25 13:12:26 -08:00
Arkatos1
f483ed1157 WireArt: Fixed and improved (#55622)
Cyborg's pipe cleaner is now using a radial menu for choosing it's colors instead of a clumsy input one.

RCL now properly updates it's pipe cleaner holder's color, so you can actually see the color when using RCL radial menu.

RCL is now able to put cables down on floors seamlessly, as there is no reason to restrict it to just a plating and catwalks anymore due to the fact that pipe cleaner coils no longer function as a power carriers, but are merely visual entities for players to play with.

And lastly, pipe cleaners now use color defines and are setting its color directly instead of having redundant variable do it for them, which was needlessly complicating it.
2020-12-24 01:05:05 -08:00
coiax
78b415db20 Refactor supermatter proximity effects (#55653)
- Psychologists are no longer mistakenly told they have headaches
when near the supermatter.
- Immunity to supermatter hallucinations is now provided by a new trait
  `TRAIT_SUPERMATTER_MADNESS_IMMUNE`, provided by mesons, and being the
  Psychologist.
- The ability for Psychologists to cause the supermatter to act slightly
  differently (by turning pink, and having a higher minimum healing
  temperature) is now a trait, `TRAIT_SUPERMATTER_SOOTHER`, which
  currently only Psychologists get.
2020-12-22 16:12:37 -08:00
TemporalOroboros
863977e5fa Makes reagent updates more event based, also makes plasma boil properly. (#54790)
Converts most on_reagent_change calls to signals.
Converts on_reagent_change to a signal handler.
Expands the reagent exposure signals
Add a setter proc and signal for reagent temperature
Fixes adjust_thermal_energy not sending a temperature change event
Makes min_temp and max_temp actually do something with adjust_thermal_energy
2020-12-22 19:20:00 -03:00
Azarak
9e23c3e5ee aaaaa (#55561)
Light fixtures now use different variants of overlays in order to be non-unique and save up on instantiating a TON of overlay objects. Also, fixed the GC for them
2020-12-22 13:51:15 -08:00
Mickyan
7ac015a218 Tweaks lighting, adds preset lights for better mood lighting (#55513)
Tweaks existing lighting and adds some presets for mapping

Current list of presets is as follows:
Main Tube Lights: normal, cold and warm with a subtype each that disables night lighting
Red & blacklight (purple) for tube & small lightbulb
Why It's Good For The Game

Better support for more varied and interesting lighting. I made sure that the new presets are subtle and bright enough to not be distracting or made it harder to see

Changes to currently mapped lighting should be mostly unnoticeable, standard tube lights have a very faint greenish tint typical of fluorescent lights, while small lightbulbs have an orange tint reminiscent of tungsten lightbulbs

For mappers, I would suggest using types that disable nightlighting in work areas while keeping night lighting for hallways and other service/living areas.
Normal lights for hallways, cold lighting for medbay and science, warm lighting for bar, library and dorms, red lights for maintenance, maybe blacklight for server rooms etc.
2020-12-22 14:24:54 +13:00
Jared-Fogle
38fb0ad6fe Make singularity dissipation use delta time (#55612)
About The Pull Request

Converts singularity's dissipation code to use delta time instead of assuming it'll always be the same.

Numbers were based on the previous code given a delta_time of 2.
2020-12-21 10:28:52 +13:00
tralezab
ade6d47ed1 Refactors Beams to use signals: Revived from 2019 edition! BONUS: Medbeams are also refactored to use signals (#55193)
Huge removal of dead vars, bad timers, and other sloppy jitteriness from beams. They go from checking movement to waiting for a signal.
VARIABLE KILL LIST:

sleep_time: signals baby
finished: signals BAYBEEE
target_oldloc: not only not typecasted as a turf or named as a turf, it was unused. when are we going to use this? the beam starts from the origin!
origin_oldloc: bad name, not typecasted. renamed to originturf
static_beam: how are you an unused variable and still get replaced by signals like really
timing_id: signallllss bbbaaaabbyy
recalculating: you get the drill by now signals baby
base_icon: unused, seemingly replaced by visuals I think
2020-12-18 13:52:55 -08:00
Jared-Fogle
40a44b63ab Nar'Sie is now a point of interest (#55540)
Fixes a regression from the singularity rewrite that made Nar'Sie its own object.
2020-12-17 01:45:48 -08:00
Ghilker
243935da88 eh (#55529)
Fixes the supermatter not collecting unused/untouched gas type generated for percentage checking
2020-12-15 10:09:13 -08:00
ArcaneMusic
e09a9032da Crates and bountes are now defined by crate's value and paygrades. Civilian bounty payout is higher and uncheesable. (#55413)
Does a value-wise refactor of crates and bounties in order to scale the value of these imports and exports to the value of crate exports (500 credits each). Then, I have adjusted the value of crate exports to 200 credits down from 500 to place the most standard unit of profit within cargo to a scale within that of roundstart paygrades currently on station. (350-1400 credits).

This effectively balances one of the biggest disparities left within the in-game economy, which is that cargo's price scales have really never been re-balanced with the considerations of on station prices, and have been still to the same scale as when they were based on cargo points 3 years ago. While admittedly some prices in vendors were scale to those original cargo values, so many of them weren't that it warranted a massive rebalance PR in order to places the scale of these items within an appropriate range of their intended user's cost values.
2020-12-10 23:43:46 +00:00
Jared-Fogle
0a77d27a1b Replace direct poi_list manipulation with element (#55416)
Replaces GLOB.poi_list |= src and GLOB.poi_list -= src with an element that handles it directly.

More consistent code, especially when a lot of code couldn't decide how to add/remove (some |=, some -=, some .Remove, etc).
2020-12-10 23:30:25 +00:00
Jared-Fogle
7d3fd4355f Everything that uses maptext now uses the class that makes it actually readable (#55420)
Adds a MAPTEXT macro that wraps the given text in the maptext class, the thing we use for Runechat to make it so you can actually read it. Everything that sets maptext now uses this.
2020-12-10 23:25:46 +00:00
LemonInTheDark
92f509ea80 Revert "Refactors how movetype flags are added and removed and the floating animation (#54963)" (#55432)
This reverts commit b8425c003a.
2020-12-09 19:30:28 -08:00
Ghom
b8425c003a Refactors how movetype flags are added and removed and the floating animation (#54963)
I wanted to refactor how movetype flags are added and removed into traits to prevent multiple sources of specific movement types from conflicting one other. I ended up also having to refactor the floating animation loop (the one that bobs up and down) code in the process.
Why It's Good For The Game

A way to avoid conflict from multiple sources of movement types.
This also stops melee attacks, jitteriness and update_transform() from temporarily disabling the floating movetype bitflag altogether until the next life tick.

Tested, but i'm pretty sure improvements could be made.
Changelog

cl
fix: jitteriness, melee attack animations and resting/standing up should no longer momentarily remove the floating movement type.
/cl
2020-12-10 09:28:32 +13:00
Jared-Fogle
f00e379939 Singularity component (#55096)
Adds singularity component
2020-12-08 10:58:03 +01: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
Coffee
053de0e224 Adds N2 Canisters to the Delta Supermatter (#55205)
* Does the Thing

* Removes delta rad collector subtype

Co-authored-by: Coffee <crashkray@gmail.coom>
2020-11-28 21:16:14 +01:00
TemporalOroboros
9f694d82ea Fixes cyborgs in general replenishing stack modules from external sources (#54935)
* Cyborg stack fix

- Makes cyborgs capable of recycling floor tiles again

* Touches up module code

- Makes module code slightly more OOP-compliant
- Speeds up module creation by an imperceptable amount
- Reworks how borg modules handle stacks
2020-11-26 00:45:52 -08:00
Coffee
0907752ebd Fixes lightbulb injections (#55132)
Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-11-24 13:27:55 -08:00
Bond
a29c2f6754 Makes APCs not cause runtimes when placed in space (#55045) 2020-11-24 18:17:08 +08:00
zxaber
d8c382a0ed Cell chargers now pull from the grid's surplus rather than their room's APC cell (#54989)
About The Pull Request

As the title says.

    Creates a new proc, use_power_from_net() that attempts to pull power from the grid (by adding the amount needed to the APC's powernet load), and returns the amount gathered if there was enough surplus to do so. This bypasses the APC's internal cell for power drawn this way.

    Changes cell chargers to use this new proc for charging a cell. The charger machine still uses some power from the APC, set to 1% of it's max cell charging rate, for machine-related power costs. I'm not deadset on that number, I just needed to start with something. To be clear, this 1% is to simulate running the cell charger's circuitry; all of the power for the cell it's charging is 1-to-1 coming from the powernet.

    This does not subvert the original PR's purpose; cells are still drawing as much power from the grid as they charge with.

Why It's Good For The Game

Fixes cell chargers breaking rooms after the prior cell charger fix. The load is now on the grid, and it being surplus means that it (probably) won't actually powersink anything.

Fixes #54919 by taking a different approach that entirely avoids the issue.
2020-11-23 11:35:58 +01:00
zxaber
185e85f32b Notification support in modular computer apps and CIMS (#54724)
Allows modPC programs to send alerts, and adds a proc in the computer object to handle playing the sound effect and sending a message to visible users. These notifications can be muted on a per-program basis. Programs can also set themselves to highlighted in the NTOS Main menu; this is intended to be used along side alerts, but really can be used any time a program wishes to tell the user there is new information.

NT CIMS (SM monitor) now plays an alert during SM delaminations if the app is closed. The app must have had an SM selected before closing, or it will not send alerts. Notifications are sent when the SM makes a radio alert. If the app is currently the active program, the app will instead send a notification just once, when the SM begins delamination, so as to not annoy engineers that are already aware of the issue.
2020-11-18 09:43:19 +02: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
Ghom
91bfedcd16 Refactored 'IsAdvancedToolUser' into a macro plus relative trait. Tweaked 'can_hold_items'. (#54665)
The PR aims to allow advanced tool users to be defined by traits rather than a hardcoded proc.
Also necessary for the CanUseTopic refactor I'm working on, which will be PRed separately for atomization purposes.
This PR also fixes an inconsistency with can_hold_items (since monkeys can actually hold items).
2020-11-10 15:15:31 -03:00
TemporalOroboros
4b4363be15 Fixes a few bugs with greyscale stacks. (#54858)
Fixes greyscale floor tiles merging regardless of their materials.
    Fixes greyscale floor tiles voiding materials when splitting the stack.
    Fixes greyscale floor tile stacks being created with no mats_per_unit and only enough custom materials for a single unit.
    Fixes greyscale tile flooring being created with the wrong amount of materials.
    Fixes greyscale tile flooring not producing floor tiles/producing floor tiles with 0 units.
2020-11-10 14:13:01 -03:00
ArcaneMusic
52cb4a401d Cell chargers now respect the law of conservation of energy. (#54886)
## About The Pull Request

Hopefully I can make this PR as knowledge filled as possible, so sit down and buckle up, because we're about to talk about POWER USE.

So, machines use power. The station uses power. Without power, key, critical aspects of the game don't function, and keeping the station's lifeblood pumped with electricity is the primary goal of the engineering department. Cool. So there's currently 2 methods of "power use" that machines can use, that is, through the passive use of power (Assigned by the `idle_power_usage` and `active_power_usage` variables), or through the `use_power()` proc. What's interesting, is that neither proc actually draws directly from the cell of the APC, which is sort of assumed by a proc called `use_power()`, after all. Where the passive power draw aspect of an APC is done automatically as machines are processed, and then applied to the APC seperately, taking power per cycle, use_power just applies a temporary blip of power usage to one of the APC's power tracks (Equipment, Lighting, or Enviroment). One would assume then that this temporary power drain would apply for long enough that it would apply the intended cost to the cell, and then turn off.

But I'm making this PR, right?

So the most egregious issue this brings is in terms of the cell recharger. If you place a power cell into a cell recharger, the recharger calls use_power every processing tick in order to reduce the APC cell by an equivalent amount to what the cell is intending to gain in charge. After all, you're just moving the charge from the APC to the power cell, plus the processing charge required by the cell_charger. However, lets look a bit closer at how use_power actually works. For this example we'll use a default, unupgraded cell recharger attempting to put it's default 250 watts into an empty bluespace cell.
Because power is heavily linked to the area that the machinery is placed in, we snag the area, determine the power channel, and call a use power proc on the area. The area use power proc simply adds that 250 watts, or rather joules into the equipment power channel of the APC, a part of power usage. All of this is parroted over to the APC's processing side, where the actual cost to the power cell is calcualted as follows:
`var/cellused = min(cell.charge, GLOB.CELLRATE * lastused_total)	// clamp deduction to a max, amount left in cell
		cell.use(cellused)`
So that number, the 250 joules of power we're calling to the cell, is actually being multiplied by a global cellrate, which is applied to every power drain on the station, actually charging the APC cell a total of 0.5 kj.
Based on some rumentary math and some experimentation, I filled a full bluespace power cell with 40Mj of power using 351 Kj of power from a standard, stock APC cell with no other drain except the 5 joules of power draw from the cell recharger.

So: What does this mean?

- Power draw is completely fucking busted (We knew this).
- Using two power cells, an APC, and an inducer, you can create infinite energy, anywhere, at zero cost to the station.
- We really need to make cell recharging a direct power draw.

Thankfully, that last one actually fits the portfolio of being a fix!
This adds a new proc to machines called `directly_use_power`. It does what it says on the tin, directly charges the APC for instances where power is going 1-1 from a power cell to another cell, in order to prevent infinite energy exploits.

## Why It's Good For The Game

Power is all kinds of unbalanced. Attempting to enforce the concept that a single unit of power is equal to itself is probably a good step in the right direction and in all likelyhood appears to have been the original intent with cell chargers in the first place.

I'm self-aware enough to see that this has ramifications beyond just fixing an issue within the cell charger alone, so if maintainers want to close this until december that's perfectly fine, but this is one of those things that could really easily snap basic station balance in twain.
2020-11-10 09:33:19 -05:00
TemporalOroboros
edd6500d78 /obj/screen --> /atom/movable/screen (#54403)
Repaths screen objects to /atom/movable
2020-11-08 23:07:15 -03:00
Rohesie
c55bb1b6c8 Basepixels (#54652) 2020-10-28 20:31:13 -07:00
Ghom
247488d2fe Converting the EMP protection component into an element. (#54617) 2020-10-27 21:48:22 +08:00
Azarak
cac3e6ec6e Increases the broken light spark cooldown 6 folds (#54579)
Whenever you stop to do something, and there's a broken light around, you would notice it spark, and if you stay, it sparks over and over again, becoming less of a nice rare occurance to something more annoying. This was very apparent during a shift yesterday on Manuel, where the entire station had lights broken, but they kept sparking over and over again and it never quite felt like we're in darkness.
2020-10-25 12:09:10 -03:00
Ghilker
578d4493e1 Crystal invasion more rare (#54504)
This PR makes crystal invasion much rarer and confine it between 4500 and 5000 MeV
2020-10-21 16:10:28 -03: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
Qustinnus
74755a5a3a Audio falloff re-work, and increased audio range. (#54362)
imo; the ss13 audio-scape is quite barren, you can only hear most things if you can see them, which in my opinion doesn't make much sense. This changes that so you can hear further away, but falloff is much higher, so in reality you will only hear things relatively quietly when they're out of sight.

This PR increases the hearing distance of most sound by 9, excluding sounds such as antag items that are meant to be used stealthily

This PR also replaces Byond's inbuilt falloff system with something I made, (And thanks to potato for helping me throw together a formula for it). This fall-off system makes sound fall off more naturally, with sounds being full volume within a certain range, and then softly falling off until they are completely quiet. This makes for a smoother transition between "This sound is full volume" and "I dont hear this sound".

Co-authored-by: ff <ff>
2020-10-20 17:14:16 -07: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
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
Qustinnus
1df07cbae1 Adds a bunch of looping audio to computers, grav-gen and telecomms. (#54324) 2020-10-12 13:37:56 -07:00
Timberpoes
d5402dc459 Yellow slime core nerfs and adjustments. (#54198)
Yellow slime extract can no longer turn into a self-charging yellow slime core. This functionality has been completely removed.

Hypercharged yellow slime cores no longer self-charge.
They now have a capacity of 50,000 (up from their previous 20,000). This is 10,000 more than a bluespace power cell.
Their recharge rate is 2500. This is relatively slow for the power capacity, as hyper and bluespace cells charge at 10% of their capacity respectively and this is 5%.

Motorised wheelchairs have had their power usage reduced to 5% of their previous value since they were basically only usable with rechargable cells before
2020-10-07 15:42:02 -03:00
Ghilker
1faa90834a Making holes in the SM chamber will provide a lot of +*=FUN=*+ (#53725)
Making a hole in the supermatter chamber to vent it and so to slow down the delamination will instead make the delamination way faster, more so if the SM power is very high and the power level is high too.

Fix an old unintended feature where you could just vent to space the SM chamber to slow down or even stop a delamination (sometimes you could just make a hole in the chamber and it would stabilize while delaminating), the SM is easily fixable just by looking at the pipe and the meters, no need to vent to space. (Lemons note, in some cases a vent to space is needed,  but it should not be a long term thing)
2020-10-06 01:12:08 -07:00
Rohesie
db54913fe6 Mobility refactor: UI, pull and lying down edition (#54078) 2020-10-03 17:23:21 -07:00
spookydonut
cfd08435d5 Fix incorrect Initialize arguments again (#54123)
Fixes #54013 because loc is not the second arg
2020-10-01 21:49:20 -07:00
Ghilker
1c6911cab3 Crystal invasion no longer random event but delamination event (#53921)
This PR makes the crystal invasion event a delamination event only, so no more random events (can still be admin triggered).
The chance for the delamination to trigger the event depends on the power of the SM, the closer it is to the tesla delamination (near 5000) the higher the chance.
2020-10-01 06:32:54 +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
wesoda25
23eca95c3d Scales ethereal power capacity and interactions upwards (#53984)
Basically, all ethereal charge capacity and interactions have been scaled upwards by 20x.

Power wise, ethereals now hold up to 3000, with the max safe threshold being 2000. For reference, upgraded powercells can hold 2500, with high capacity holding 10K).

All appropriate values have been tweaked to match this change. There shouldn't be ANY sort of noticeable difference in game, aside from power sources depleting faster, and a few values which I decided to tweak for balance reasons. They are: power cell draining time is 1.5 seconds longer, and light draining time is 0.5 shorter. Also, draining cells has less of a punishment multiplier upon the cell now, (originally, the the cell lost 33x as much as you received. now its 12x). (to avoid returning to this in why its good, I did this because now that ethereals are capable of holding more, I can afford to have less of a punishment, while still maintaining a reasonable level of punishment).

Also some minor code and grammar improvements.
2020-09-29 06:24:12 -03:00
spookydonut
4157b13132 Fixes incorrect Initialize() arguments (#54013) 2020-09-28 19:02:46 -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
wesoda25
90e2be2623 Replaces some numbers with defines + grammar stuff in ethereal power draining code (#53924) 2020-09-25 08:48:31 -03:00